summaryrefslogtreecommitdiff
path: root/boilerplate
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-05-05 12:07:49 +0200
committerBenjamin Otte <otte@redhat.com>2010-05-05 12:30:01 +0200
commit5223b654230d3074d0bc31eb74c415e50eced365 (patch)
tree8f615dd64516f54edc5d4595d840d20d4d5306b2 /boilerplate
parente071fa2c4f62b5ead39c6c6401f39360ea4dee1f (diff)
gl: Get rid of cairo_gl_surface_glfinish() from public API
This is now done explicitly in the boilerplate code. It was not a useful public API to begin with.
Diffstat (limited to 'boilerplate')
-rw-r--r--boilerplate/cairo-boilerplate-gl.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/boilerplate/cairo-boilerplate-gl.c b/boilerplate/cairo-boilerplate-gl.c
index 37030af3..5957da49 100644
--- a/boilerplate/cairo-boilerplate-gl.c
+++ b/boilerplate/cairo-boilerplate-gl.c
@@ -234,7 +234,12 @@ _cairo_boilerplate_gl_synchronize (void *closure)
{
gl_target_closure_t *gltc = closure;
- cairo_gl_surface_glfinish (gltc->surface);
+ if (cairo_device_acquire (gltc->device))
+ return;
+
+ glFinish ();
+
+ cairo_device_release (gltc->device);
}
#if CAIRO_HAS_EGL_FUNCTIONS
@@ -312,14 +317,6 @@ _cairo_boilerplate_egl_create_surface (const char *name,
return surface;
}
-
-static void
-_cairo_boilerplate_egl_synchronize (void *closure)
-{
- egl_target_closure_t *gltc = closure;
-
- cairo_gl_surface_glfinish (gltc->surface);
-}
#endif
static const cairo_boilerplate_target_t targets[] = {
@@ -370,7 +367,7 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
_cairo_boilerplate_egl_cleanup,
- _cairo_boilerplate_egl_synchronize,
+ _cairo_boilerplate_gl_synchronize,
TRUE, FALSE, FALSE
},
#endif