diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2016-08-25 11:31:56 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2016-10-18 11:49:16 +0100 |
commit | dace0791a9bab4a5d1a69e4bde87973814ca217a (patch) | |
tree | bcf8e20b5813fdf1ed613ec1d3a13682a20786d5 /gsk/gskrenderer.h | |
parent | a9bbb020aac9f20d7366b29219ada2e77349642a (diff) | |
download | gtk+-dace0791a9bab4a5d1a69e4bde87973814ca217a.tar.gz |
gsk: Add the ability to create fallback renderers
While porting GTK to GskRenderer we noticed that the current fallback
code for widgets using Cairo to draw is not enough to cover all the
possible cases.
For instance, if a container widget still uses GtkWidget::draw to render
its children, and at least one of them has been ported to using render
nodes instead, the container won't know how to draw it.
For this reason we want to provide to layers above GSK the ability to
create a "fallback" renderer instance, created using a "parent"
GskRenderer instance, but using a Cairo context as the rendering target
instead of a GdkDrawingContext.
GTK will use this inside the gtk_widget_draw() implementation, if a
widget implements GtkWidgetClass.get_render_node().
Diffstat (limited to 'gsk/gskrenderer.h')
-rw-r--r-- | gsk/gskrenderer.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gsk/gskrenderer.h b/gsk/gskrenderer.h index 33dd958b7b..4c8fc58892 100644 --- a/gsk/gskrenderer.h +++ b/gsk/gskrenderer.h @@ -71,6 +71,11 @@ GDK_AVAILABLE_IN_3_22 GskRenderNode * gsk_renderer_create_render_node (GskRenderer *renderer); GDK_AVAILABLE_IN_3_22 +GskRenderer * gsk_renderer_create_fallback (GskRenderer *renderer, + const graphene_rect_t *viewport, + cairo_t *cr); + +GDK_AVAILABLE_IN_3_22 void gsk_renderer_render (GskRenderer *renderer, GskRenderNode *root, GdkDrawingContext *context); |