st: Report correct paint volumes during transitions
StWidget reports a paint volume large enough to paint the current theme node. As CSS transitions also paint the previous theme node, the reported paint volume may be incorrect, resulting in screen artifacts when painting outside the reported volume. Add st_theme_node_transition_get_paint_box() to calculate an allocation large enough to paint both theme nodes, and use it to report the correct paint volume during transitions. https://bugzilla.gnome.org/show_bug.cgi?id=640085
This commit is contained in:
@ -686,15 +686,23 @@ st_widget_get_paint_volume (ClutterActor *self, ClutterPaintVolume *volume)
|
||||
{
|
||||
ClutterActorBox paint_box, alloc_box;
|
||||
StThemeNode *theme_node;
|
||||
StWidgetPrivate *priv;
|
||||
ClutterVertex origin;
|
||||
|
||||
/* Setting the paint volume does not make sense when we don't have any allocation */
|
||||
if (!clutter_actor_has_allocation (self))
|
||||
return FALSE;
|
||||
|
||||
priv = ST_WIDGET(self)->priv;
|
||||
|
||||
theme_node = st_widget_get_theme_node (ST_WIDGET(self));
|
||||
clutter_actor_get_allocation_box (self, &alloc_box);
|
||||
st_theme_node_get_paint_box (theme_node, &alloc_box, &paint_box);
|
||||
|
||||
if (priv->transition_animation)
|
||||
st_theme_node_transition_get_paint_box (priv->transition_animation,
|
||||
&alloc_box, &paint_box);
|
||||
else
|
||||
st_theme_node_get_paint_box (theme_node, &alloc_box, &paint_box);
|
||||
|
||||
origin.x = paint_box.x1 - alloc_box.x1;
|
||||
origin.y = paint_box.y1 - alloc_box.y1;
|
||||
|
Reference in New Issue
Block a user