diff --git a/cogl/cogl-framebuffer-private.h b/cogl/cogl-framebuffer-private.h index 0bfc64e61..3d9cba364 100644 --- a/cogl/cogl-framebuffer-private.h +++ b/cogl/cogl-framebuffer-private.h @@ -193,6 +193,9 @@ _cogl_framebuffer_flush_journal (CoglFramebuffer *framebuffer); void _cogl_framebuffer_flush_dependency_journals (CoglFramebuffer *framebuffer); +void +_cogl_framebuffer_swap_notify (CoglFramebuffer *framebuffer); + typedef enum _CoglFramebufferFlushFlags { /* XXX: When using this, that imples you are going to manually load the diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c index ede491e37..a0c5b944d 100644 --- a/cogl/cogl-framebuffer.c +++ b/cogl/cogl-framebuffer.c @@ -313,6 +313,11 @@ _cogl_framebuffer_clear (CoglFramebuffer *framebuffer, cogl_color_get_alpha_float (color)); } +void +_cogl_framebuffer_swap_notify (CoglFramebuffer *framebuffer) +{ +} + int _cogl_framebuffer_get_width (CoglFramebuffer *framebuffer) { diff --git a/cogl/cogl.c b/cogl/cogl.c index c2cee24ae..b6c3fa535 100644 --- a/cogl/cogl.c +++ b/cogl/cogl.c @@ -1097,3 +1097,13 @@ _cogl_error_quark (void) return g_quark_from_static_string ("cogl-error-quark"); } +/* Until Cogl becomes responsible for handling swap-buffer requests + * this API is used by Clutter to notify us when it issues a + * swap-buffer on our behalf. */ +void +_cogl_swap_buffers_notify (void) +{ + _COGL_GET_CONTEXT (ctx, NO_RETVAL); + + _cogl_framebuffer_swap_notify (_cogl_get_framebuffer ()); +} diff --git a/cogl/cogl.h b/cogl/cogl.h index d6170fe16..0e8d1ad08 100644 --- a/cogl/cogl.h +++ b/cogl/cogl.h @@ -1293,6 +1293,9 @@ _cogl_driver_error_quark (void); void _cogl_onscreen_clutter_backend_set_size (int width, int height); +void +_cogl_swap_buffers_notify (void); + G_END_DECLS #undef __COGL_H_INSIDE__