summaryrefslogtreecommitdiff
path: root/gsk/gskglrenderer.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2016-12-01 01:38:20 +0100
committerBenjamin Otte <otte@redhat.com>2016-12-05 15:02:47 +0100
commitca78f5d3cbdd9478ef1206b2c7f1c9472e28796d (patch)
tree3a959ae1e8396436010d474da2576bd448f14551 /gsk/gskglrenderer.c
parent60567db486649746978850797e548a099df5aa0a (diff)
downloadgtk+-ca78f5d3cbdd9478ef1206b2c7f1c9472e28796d.tar.gz
gdk: Make gdk_window_begin_draw_frame() take a draw context
... instead of a gl context. This requires some refactoring in the way we mark the shared context as drawing: We now call begin_frame/end_frame() on it and ignore the call on the main context. Unfortunately we need to do this check in all vfuncs, which sucks. But I haven't found a better way.
Diffstat (limited to 'gsk/gskglrenderer.c')
-rw-r--r--gsk/gskglrenderer.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gsk/gskglrenderer.c b/gsk/gskglrenderer.c
index e021b358fa..5d0bb12c63 100644
--- a/gsk/gskglrenderer.c
+++ b/gsk/gskglrenderer.c
@@ -292,8 +292,6 @@ gsk_gl_renderer_realize (GskRenderer *renderer,
if (!gsk_gl_renderer_create_programs (self, error))
return FALSE;
- gsk_renderer_set_gl_context (renderer, self->gl_context);
-
return TRUE;
}
@@ -320,8 +318,6 @@ gsk_gl_renderer_unrealize (GskRenderer *renderer)
if (self->gl_context == gdk_gl_context_get_current ())
gdk_gl_context_clear_current ();
-
- gsk_renderer_set_gl_context (renderer, NULL);
}
static GdkDrawingContext *
@@ -341,9 +337,9 @@ gsk_gl_renderer_begin_draw_frame (GskRenderer *renderer,
gdk_window_get_height (window)
});
- result = gdk_window_begin_draw_frame (window,
- self->gl_context,
- region);
+ return gdk_window_begin_draw_frame (window,
+ GDK_DRAW_CONTEXT (self->gl_context),
+ region);
cairo_region_destroy (whole_window);