Revert "window-actor: Complete the removal of update_shape"

This reverts commit 640102c03b.
This commit is contained in:
Jasper St. Pierre 2014-02-26 20:52:44 -05:00
parent 98c4b82907
commit eb75306f8a

View File

@ -94,6 +94,7 @@ struct _MetaWindowActorPrivate
guint needs_frame_drawn : 1; guint needs_frame_drawn : 1;
guint repaint_scheduled : 1; guint repaint_scheduled : 1;
guint needs_reshape : 1;
guint recompute_focused_shadow : 1; guint recompute_focused_shadow : 1;
guint recompute_unfocused_shadow : 1; guint recompute_unfocused_shadow : 1;
@ -142,6 +143,8 @@ static gboolean meta_window_actor_has_shadow (MetaWindowActor *self);
static void meta_window_actor_handle_updates (MetaWindowActor *self); static void meta_window_actor_handle_updates (MetaWindowActor *self);
static void check_needs_reshape (MetaWindowActor *self);
static void do_send_frame_drawn (MetaWindowActor *self, FrameData *frame); static void do_send_frame_drawn (MetaWindowActor *self, FrameData *frame);
static void do_send_frame_timings (MetaWindowActor *self, static void do_send_frame_timings (MetaWindowActor *self,
FrameData *frame, FrameData *frame,
@ -234,6 +237,7 @@ surface_allocation_changed_notify (ClutterActor *actor,
MetaWindowActor *self) MetaWindowActor *self)
{ {
meta_window_actor_sync_actor_geometry (self, FALSE); meta_window_actor_sync_actor_geometry (self, FALSE);
meta_window_actor_update_shape (self);
} }
static void static void
@ -342,6 +346,8 @@ set_surface (MetaWindowActor *self,
/* If the previous surface actor was frozen, start out /* If the previous surface actor was frozen, start out
* frozen as well... */ * frozen as well... */
meta_surface_actor_set_frozen (priv->surface, priv->freeze_count > 0); meta_surface_actor_set_frozen (priv->surface, priv->freeze_count > 0);
meta_window_actor_update_shape (self);
} }
} }
@ -1830,6 +1836,38 @@ meta_window_actor_update_opaque_region (MetaWindowActor *self)
cairo_region_destroy (opaque_region); cairo_region_destroy (opaque_region);
} }
static void
check_needs_reshape (MetaWindowActor *self)
{
MetaWindowActorPrivate *priv = self->priv;
if (!priv->needs_reshape)
return;
meta_window_actor_update_shape_region (self);
if (priv->window->client_type == META_WINDOW_CLIENT_TYPE_X11)
{
meta_window_actor_update_input_region (self);
meta_window_actor_update_opaque_region (self);
}
priv->needs_reshape = FALSE;
}
void
meta_window_actor_update_shape (MetaWindowActor *self)
{
MetaWindowActorPrivate *priv = self->priv;
priv->needs_reshape = TRUE;
if (is_frozen (self))
return;
clutter_actor_queue_redraw (CLUTTER_ACTOR (priv->surface));
}
static void static void
meta_window_actor_handle_updates (MetaWindowActor *self) meta_window_actor_handle_updates (MetaWindowActor *self)
{ {
@ -1850,6 +1888,7 @@ meta_window_actor_handle_updates (MetaWindowActor *self)
if (!meta_surface_actor_is_visible (priv->surface)) if (!meta_surface_actor_is_visible (priv->surface))
return; return;
check_needs_reshape (self);
check_needs_shadow (self); check_needs_shadow (self);
} }