mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
cogl: Make private BLIT_FRAMEBUFFER feature public
Will be a requirement for enabling shadow buffers. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1237
This commit is contained in:
parent
19550c28f9
commit
f60c485117
@ -158,7 +158,7 @@ _cogl_blit_framebuffer_begin (CoglBlitData *data)
|
||||
supported. */
|
||||
if ((_cogl_texture_get_format (data->src_tex) & COGL_PREMULT_BIT) !=
|
||||
(_cogl_texture_get_format (data->dst_tex) & COGL_PREMULT_BIT) ||
|
||||
!_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_BLIT_FRAMEBUFFER))
|
||||
!cogl_has_feature (ctx, COGL_FEATURE_ID_BLIT_FRAMEBUFFER))
|
||||
return FALSE;
|
||||
|
||||
dst_offscreen = _cogl_offscreen_new_with_texture_full
|
||||
|
@ -193,6 +193,8 @@ cogl_is_context (void *object);
|
||||
* expected to return age values other than 0.
|
||||
* @COGL_FEATURE_ID_PRESENTATION_TIME: Whether frame presentation
|
||||
* time stamps will be recorded in #CoglFrameInfo objects.
|
||||
* @COGL_FEATURE_ID_BLIT_FRAMEBUFFER: Whether blitting using
|
||||
* cogl_blit_framebuffer() is supported.
|
||||
*
|
||||
* All the capabilities that can vary between different GPUs supported
|
||||
* by Cogl. Applications that depend on any of these features should explicitly
|
||||
@ -211,6 +213,7 @@ typedef enum _CoglFeatureID
|
||||
COGL_FEATURE_ID_TEXTURE_RG,
|
||||
COGL_FEATURE_ID_BUFFER_AGE,
|
||||
COGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL,
|
||||
COGL_FEATURE_ID_BLIT_FRAMEBUFFER,
|
||||
|
||||
/*< private >*/
|
||||
_COGL_N_FEATURE_IDS /*< skip >*/
|
||||
|
@ -1292,7 +1292,7 @@ cogl_blit_framebuffer (CoglFramebuffer *src,
|
||||
int src_x1, src_y1, src_x2, src_y2;
|
||||
int dst_x1, dst_y1, dst_x2, dst_y2;
|
||||
|
||||
if (!_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_BLIT_FRAMEBUFFER))
|
||||
if (!cogl_has_feature (ctx, COGL_FEATURE_ID_BLIT_FRAMEBUFFER))
|
||||
{
|
||||
g_set_error_literal (error, COGL_SYSTEM_ERROR,
|
||||
COGL_SYSTEM_ERROR_UNSUPPORTED,
|
||||
|
@ -1509,7 +1509,7 @@ cogl_is_framebuffer (void *object);
|
||||
*
|
||||
* This blits a region of the color buffer of the source buffer
|
||||
* to the destination buffer. This function should only be
|
||||
* called if the COGL_PRIVATE_FEATURE_BLIT_FRAMEBUFFER feature is
|
||||
* called if the COGL_FEATURE_ID_BLIT_FRAMEBUFFER feature is
|
||||
* advertised.
|
||||
*
|
||||
* The source and destination rectangles are defined in offscreen
|
||||
|
@ -42,7 +42,6 @@ typedef enum
|
||||
{
|
||||
COGL_PRIVATE_FEATURE_TEXTURE_2D_FROM_EGL_IMAGE,
|
||||
COGL_PRIVATE_FEATURE_MESA_PACK_INVERT,
|
||||
COGL_PRIVATE_FEATURE_BLIT_FRAMEBUFFER,
|
||||
COGL_PRIVATE_FEATURE_PBOS,
|
||||
COGL_PRIVATE_FEATURE_EXT_PACKED_DEPTH_STENCIL,
|
||||
COGL_PRIVATE_FEATURE_OES_PACKED_DEPTH_STENCIL,
|
||||
|
@ -388,8 +388,8 @@ _cogl_framebuffer_gl_flush_state (CoglFramebuffer *draw_buffer,
|
||||
{
|
||||
/* NB: Currently we only take advantage of binding separate
|
||||
* read/write buffers for framebuffer blit purposes. */
|
||||
g_return_if_fail (_cogl_has_private_feature
|
||||
(ctx, COGL_PRIVATE_FEATURE_BLIT_FRAMEBUFFER));
|
||||
g_return_if_fail (cogl_has_feature
|
||||
(ctx, COGL_FEATURE_ID_BLIT_FRAMEBUFFER));
|
||||
|
||||
_cogl_framebuffer_gl_bind (draw_buffer, GL_DRAW_FRAMEBUFFER);
|
||||
_cogl_framebuffer_gl_bind (read_buffer, GL_READ_FRAMEBUFFER);
|
||||
|
@ -455,8 +455,8 @@ _cogl_driver_update_features (CoglContext *ctx,
|
||||
TRUE);
|
||||
|
||||
if (ctx->glBlitFramebuffer)
|
||||
COGL_FLAGS_SET (private_features,
|
||||
COGL_PRIVATE_FEATURE_BLIT_FRAMEBUFFER, TRUE);
|
||||
COGL_FLAGS_SET (ctx->features,
|
||||
COGL_FEATURE_ID_BLIT_FRAMEBUFFER, TRUE);
|
||||
|
||||
COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_PBOS, TRUE);
|
||||
|
||||
|
@ -318,8 +318,8 @@ _cogl_driver_update_features (CoglContext *context,
|
||||
COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_SAMPLER_OBJECTS, TRUE);
|
||||
|
||||
if (context->glBlitFramebuffer)
|
||||
COGL_FLAGS_SET (private_features,
|
||||
COGL_PRIVATE_FEATURE_BLIT_FRAMEBUFFER, TRUE);
|
||||
COGL_FLAGS_SET (context->features,
|
||||
COGL_FEATURE_ID_BLIT_FRAMEBUFFER, TRUE);
|
||||
|
||||
if (_cogl_check_extension ("GL_OES_element_index_uint", gl_extensions))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user