summaryrefslogtreecommitdiff
path: root/gdk/gdkglcontext.h
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2016-12-04 16:33:13 +0100
committerBenjamin Otte <otte@redhat.com>2016-12-05 15:02:47 +0100
commit8915be00d13605c90669d4d84510d823aa0c52ab (patch)
tree7c31894066f8fd53b3378af7bcab821f838c8543 /gdk/gdkglcontext.h
parent582ea50faaa7e7b9650815e9a64297b29e32efab (diff)
downloadgtk+-8915be00d13605c90669d4d84510d823aa0c52ab.tar.gz
gdkgl: Add gdk_gl_context_get_damage()
This is a way to query the damaged area of the backbuffer. The GL renderer uses this to compute the extents of that damage region (computed via buffer age) and use them to minimize the area to redraw. This changes the semantics of GL rendering to "When calling gdk_window_begin_frame() with a GL context, the area by gdk_gl_context_get_damage() needs to be redrawn and every other pixel of the backbuffer is guaranteed to be correct. After gdk_window_end_frame() on a GL-drawn window, the whole backbuffer must be correct. We can always glXBufferSwap() now because of this.
Diffstat (limited to 'gdk/gdkglcontext.h')
-rw-r--r--gdk/gdkglcontext.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdk/gdkglcontext.h b/gdk/gdkglcontext.h
index eb380c2f25..2c22fb7341 100644
--- a/gdk/gdkglcontext.h
+++ b/gdk/gdkglcontext.h
@@ -82,6 +82,9 @@ gboolean gdk_gl_context_get_use_es (GdkGLContext *
GDK_AVAILABLE_IN_3_16
gboolean gdk_gl_context_realize (GdkGLContext *context,
GError **error);
+GDK_AVAILABLE_IN_3_90
+cairo_region_t * gdk_gl_context_get_damage (GdkGLContext *context);
+
GDK_AVAILABLE_IN_3_16
void gdk_gl_context_make_current (GdkGLContext *context);
GDK_AVAILABLE_IN_3_16