diff options
author | Benjamin Otte <otte@redhat.com> | 2016-12-01 01:38:20 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2016-12-05 15:02:47 +0100 |
commit | ca78f5d3cbdd9478ef1206b2c7f1c9472e28796d (patch) | |
tree | 3a959ae1e8396436010d474da2576bd448f14551 /gdk/gdkdrawcontextprivate.h | |
parent | 60567db486649746978850797e548a099df5aa0a (diff) | |
download | gtk+-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 'gdk/gdkdrawcontextprivate.h')
-rw-r--r-- | gdk/gdkdrawcontextprivate.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdk/gdkdrawcontextprivate.h b/gdk/gdkdrawcontextprivate.h index da1f25333e..0223787a1d 100644 --- a/gdk/gdkdrawcontextprivate.h +++ b/gdk/gdkdrawcontextprivate.h @@ -39,8 +39,21 @@ struct _GdkDrawContext struct _GdkDrawContextClass { GObjectClass parent_class; + + void (* begin_frame) (GdkDrawContext *context, + cairo_region_t *update_area); + void (* end_frame) (GdkDrawContext *context, + cairo_region_t *painted, + cairo_region_t *damage); }; +gboolean gdk_draw_context_is_drawing (GdkDrawContext *context); +void gdk_draw_context_begin_frame (GdkDrawContext *context, + cairo_region_t *region); +void gdk_draw_context_end_frame (GdkDrawContext *context, + cairo_region_t *painted, + cairo_region_t *damage); + G_END_DECLS #endif /* __GDK__DRAW_CONTEXT_PRIVATE__ */ |