widget: Position changes don't require a redraw

Well, they don't require a redraw of the widget, because the widget
itself didn't change.
They require a redraw of the parent, because that now displays the
widget in a different position.

And this means we can keep the cache of the widget's render node.

My fishbowl numbers are through the roof^W water surface. Vulkan gets
4000 now.
This commit is contained in:
Benjamin Otte 2018-04-22 02:46:00 +02:00
parent c5bcc47ce7
commit 7a09cd4cda

View File

@ -4355,8 +4355,10 @@ gtk_widget_size_allocate (GtkWidget *widget,
gtk_widget_invalidate_paintable_size (widget); gtk_widget_invalidate_paintable_size (widget);
check_clip: check_clip:
if (position_changed || size_changed || baseline_changed) if (size_changed || baseline_changed)
gtk_widget_queue_draw (widget); gtk_widget_queue_draw (widget);
else if (position_changed && priv->parent)
gtk_widget_queue_draw (priv->parent);
out: out:
if (priv->alloc_needed_on_child) if (priv->alloc_needed_on_child)