cogl: Rename feature OFFSCREEN_BLIT to BLIT_FRAMEBUFFER

The feature is not limited to offscreen framebuffer blits anymore since
"cogl: Allow glBlitFramebuffer between onscreen/offscreen".

https://gitlab.gnome.org/GNOME/mutter/merge_requests/615
This commit is contained in:
Pekka Paalanen 2019-05-06 15:58:33 +03:00 committed by Jonas Ådahl
parent 45289b3d65
commit 55c084e6e1
7 changed files with 7 additions and 7 deletions

View File

@ -158,7 +158,7 @@ _cogl_blit_framebuffer_begin (CoglBlitData *data)
supported. */ supported. */
if ((_cogl_texture_get_format (data->src_tex) & COGL_PREMULT_BIT) != if ((_cogl_texture_get_format (data->src_tex) & COGL_PREMULT_BIT) !=
(_cogl_texture_get_format (data->dst_tex) & COGL_PREMULT_BIT) || (_cogl_texture_get_format (data->dst_tex) & COGL_PREMULT_BIT) ||
!_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_OFFSCREEN_BLIT)) !_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_BLIT_FRAMEBUFFER))
return FALSE; return FALSE;
dst_offscreen = _cogl_offscreen_new_with_texture_full dst_offscreen = _cogl_offscreen_new_with_texture_full

View File

@ -377,7 +377,7 @@ _cogl_push_framebuffers (CoglFramebuffer *draw_buffer,
* *
* This blits a region of the color buffer of the source buffer * This blits a region of the color buffer of the source buffer
* to the destination buffer. This function should only be * to the destination buffer. This function should only be
* called if the COGL_PRIVATE_FEATURE_OFFSCREEN_BLIT feature is * called if the COGL_PRIVATE_FEATURE_BLIT_FRAMEBUFFER feature is
* advertised. * advertised.
* *
* The source and destination rectangles are defined in offscreen * The source and destination rectangles are defined in offscreen

View File

@ -1356,7 +1356,7 @@ _cogl_blit_framebuffer (CoglFramebuffer *src,
int dst_x1, dst_y1, dst_x2, dst_y2; int dst_x1, dst_y1, dst_x2, dst_y2;
g_return_if_fail (_cogl_has_private_feature g_return_if_fail (_cogl_has_private_feature
(ctx, COGL_PRIVATE_FEATURE_OFFSCREEN_BLIT)); (ctx, COGL_PRIVATE_FEATURE_BLIT_FRAMEBUFFER));
/* The buffers must use the same premult convention */ /* The buffers must use the same premult convention */
g_return_if_fail ((src->internal_format & COGL_PREMULT_BIT) == g_return_if_fail ((src->internal_format & COGL_PREMULT_BIT) ==

View File

@ -42,7 +42,7 @@ typedef enum
{ {
COGL_PRIVATE_FEATURE_TEXTURE_2D_FROM_EGL_IMAGE, COGL_PRIVATE_FEATURE_TEXTURE_2D_FROM_EGL_IMAGE,
COGL_PRIVATE_FEATURE_MESA_PACK_INVERT, COGL_PRIVATE_FEATURE_MESA_PACK_INVERT,
COGL_PRIVATE_FEATURE_OFFSCREEN_BLIT, COGL_PRIVATE_FEATURE_BLIT_FRAMEBUFFER,
COGL_PRIVATE_FEATURE_FOUR_CLIP_PLANES, COGL_PRIVATE_FEATURE_FOUR_CLIP_PLANES,
COGL_PRIVATE_FEATURE_PBOS, COGL_PRIVATE_FEATURE_PBOS,
COGL_PRIVATE_FEATURE_VBOS, COGL_PRIVATE_FEATURE_VBOS,

View File

@ -387,7 +387,7 @@ _cogl_framebuffer_gl_flush_state (CoglFramebuffer *draw_buffer,
/* NB: Currently we only take advantage of binding separate /* NB: Currently we only take advantage of binding separate
* read/write buffers for framebuffer blit purposes. */ * read/write buffers for framebuffer blit purposes. */
g_return_if_fail (_cogl_has_private_feature g_return_if_fail (_cogl_has_private_feature
(ctx, COGL_PRIVATE_FEATURE_OFFSCREEN_BLIT)); (ctx, COGL_PRIVATE_FEATURE_BLIT_FRAMEBUFFER));
_cogl_framebuffer_gl_bind (draw_buffer, GL_DRAW_FRAMEBUFFER); _cogl_framebuffer_gl_bind (draw_buffer, GL_DRAW_FRAMEBUFFER);
_cogl_framebuffer_gl_bind (read_buffer, GL_READ_FRAMEBUFFER); _cogl_framebuffer_gl_bind (read_buffer, GL_READ_FRAMEBUFFER);

View File

@ -421,7 +421,7 @@ _cogl_driver_update_features (CoglContext *ctx,
if (ctx->glBlitFramebuffer) if (ctx->glBlitFramebuffer)
COGL_FLAGS_SET (private_features, COGL_FLAGS_SET (private_features,
COGL_PRIVATE_FEATURE_OFFSCREEN_BLIT, TRUE); COGL_PRIVATE_FEATURE_BLIT_FRAMEBUFFER, TRUE);
if (ctx->glRenderbufferStorageMultisampleIMG) if (ctx->glRenderbufferStorageMultisampleIMG)
{ {

View File

@ -330,7 +330,7 @@ _cogl_driver_update_features (CoglContext *context,
if (context->glBlitFramebuffer) if (context->glBlitFramebuffer)
COGL_FLAGS_SET (private_features, COGL_FLAGS_SET (private_features,
COGL_PRIVATE_FEATURE_OFFSCREEN_BLIT, TRUE); COGL_PRIVATE_FEATURE_BLIT_FRAMEBUFFER, TRUE);
if (_cogl_check_extension ("GL_OES_element_index_uint", gl_extensions)) if (_cogl_check_extension ("GL_OES_element_index_uint", gl_extensions))
{ {