diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2016-07-27 16:23:44 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2016-10-18 11:49:10 +0100 |
commit | 3d90a070d586fa80fb3265a044ee0c5dcc546c55 (patch) | |
tree | 798cbbb4ac23e72d8db6aa7748ef25eb45b36879 /gsk/gskrenderer.h | |
parent | ab8420ec5288dbe8f533234676f193355912fdb9 (diff) | |
download | gtk+-3d90a070d586fa80fb3265a044ee0c5dcc546c55.tar.gz |
gsk: Tie render nodes to renderers
Render nodes need access to rendering information like scaling factors.
If we keep render nodes separate from renderers until we submit a nodes
tree for rendering we're going to have to duplicate all that information
in a way that makes the API more complicated and fuzzier on its
semantics.
By having GskRenderer create GskRenderNode instances we can tie nodes
and renderers together; since higher layers will also have access to
the renderer instance, this does not add any burden to callers.
Additionally, if memory measurements indicate that we are spending too
much time in the allocation of new render nodes, we can now easily
implement a free-list or a renderer-specific allocator without breaking
the API.
Diffstat (limited to 'gsk/gskrenderer.h')
-rw-r--r-- | gsk/gskrenderer.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gsk/gskrenderer.h b/gsk/gskrenderer.h index ec1d3aacc2..7928917622 100644 --- a/gsk/gskrenderer.h +++ b/gsk/gskrenderer.h @@ -96,6 +96,10 @@ GDK_AVAILABLE_IN_3_22 gboolean gsk_renderer_realize (GskRenderer *renderer); GDK_AVAILABLE_IN_3_22 void gsk_renderer_unrealize (GskRenderer *renderer); + +GDK_AVAILABLE_IN_3_22 +GskRenderNode * gsk_renderer_create_render_node (GskRenderer *renderer); + GDK_AVAILABLE_IN_3_22 void gsk_renderer_render (GskRenderer *renderer, GskRenderNode *root, |