widget: Position changes don't require a redraw
authorBenjamin Otte <otte@redhat.com>
Sun, 22 Apr 2018 00:46:00 +0000 (02:46 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 22 Apr 2018 00:57:47 +0000 (02:57 +0200)
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.

gtk/gtkwidget.c

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