diff --git a/gsk/gskrenderer.c b/gsk/gskrenderer.c index cf90e382d9..3a84fc9547 100644 --- a/gsk/gskrenderer.c +++ b/gsk/gskrenderer.c @@ -135,6 +135,12 @@ gsk_renderer_real_validate_tree (GskRenderer *self, { } +static void +gsk_renderer_real_clear_tree (GskRenderer *self, + GskRenderNode *old_root) +{ +} + static void gsk_renderer_dispose (GObject *gobject) { @@ -294,6 +300,7 @@ gsk_renderer_class_init (GskRendererClass *klass) klass->resize_viewport = gsk_renderer_real_resize_viewport; klass->update = gsk_renderer_real_update; klass->validate_tree = gsk_renderer_real_validate_tree; + klass->clear_tree = gsk_renderer_real_clear_tree; klass->render = gsk_renderer_real_render; gobject_class->constructed = gsk_renderer_constructed; @@ -727,6 +734,7 @@ gsk_renderer_set_root_node (GskRenderer *renderer, if (old_root != NULL) { gsk_render_node_set_invalidate_func (old_root, NULL, NULL, NULL); + gsk_renderer_clear_tree (renderer, old_root); g_object_unref (old_root); } @@ -1135,6 +1143,13 @@ gsk_renderer_maybe_update (GskRenderer *renderer) } } +void +gsk_renderer_clear_tree (GskRenderer *renderer, + GskRenderNode *old_root) +{ + GSK_RENDERER_GET_CLASS (renderer)->clear_tree (renderer, old_root); +} + /*< private > * gsk_renderer_maybe_validate_tree: * @renderer: a #GskRenderer diff --git a/gsk/gskrendererprivate.h b/gsk/gskrendererprivate.h index 404502c5be..2237c86ed1 100644 --- a/gsk/gskrendererprivate.h +++ b/gsk/gskrendererprivate.h @@ -46,12 +46,17 @@ struct _GskRendererClass const graphene_matrix_t *projection); void (* validate_tree) (GskRenderer *renderer, GskRenderNode *root); + void (* clear_tree) (GskRenderer *renderer, + GskRenderNode *old_root); void (* clear) (GskRenderer *renderer); void (* render) (GskRenderer *renderer); }; gboolean gsk_renderer_is_realized (GskRenderer *renderer); +void gsk_renderer_clear_tree (GskRenderer *renderer, + GskRenderNode *old_root); + void gsk_renderer_maybe_resize_viewport (GskRenderer *renderer); void gsk_renderer_maybe_update (GskRenderer *renderer); void gsk_renderer_maybe_validate_tree (GskRenderer *renderer);