void meta_surface_actor_process_damage (MetaSurfaceActor *self, int x, int y, int width, int height) { MetaSurfaceActorPrivate *priv = self->priv; if (is_frozen (self)) { /* The window is frozen due to an effect in progress: we ignore damage * here on the off chance that this will stop the corresponding * texture_from_pixmap from being update. * * needs_damage_all tracks that some unknown damage happened while the * window was frozen so that when the window becomes unfrozen we can * issue a full window update to cover any lost damage. * * It should be noted that this is an unreliable mechanism since it's * quite likely that drivers will aim to provide a zero-copy * implementation of the texture_from_pixmap extension and in those cases * any drawing done to the window is always immediately reflected in the * texture regardless of damage event handling. */ priv->needs_damage_all = TRUE; return; } META_SURFACE_ACTOR_GET_CLASS (self)->process_damage (self, x, y, width, height); }
void meta_surface_actor_process_damage (MetaSurfaceActor *self, int x, int y, int width, int height) { MetaSurfaceActorPrivate *priv = self->priv; if (is_frozen (self)) { /* The window is frozen due to an effect in progress: we ignore damage * here on the off chance that this will stop the corresponding * texture_from_pixmap from being update. * * pending_damage tracks any damage that happened while the window was * frozen so that when can apply it when the window becomes unfrozen. * * It should be noted that this is an unreliable mechanism since it's * quite likely that drivers will aim to provide a zero-copy * implementation of the texture_from_pixmap extension and in those cases * any drawing done to the window is always immediately reflected in the * texture regardless of damage event handling. */ cairo_rectangle_int_t rect = { .x = x, .y = y, .width = width, .height = height }; if (!priv->pending_damage) priv->pending_damage = cairo_region_create_rectangle (&rect); else cairo_region_union_rectangle (priv->pending_damage, &rect); return; } META_SURFACE_ACTOR_GET_CLASS (self)->process_damage (self, x, y, width, height); if (meta_surface_actor_is_visible (self)) meta_surface_actor_update_area (self, x, y, width, height); }
MetaWindow * meta_surface_actor_get_window (MetaSurfaceActor *self) { return META_SURFACE_ACTOR_GET_CLASS (self)->get_window (self); }
gboolean meta_surface_actor_is_unredirected (MetaSurfaceActor *self) { return META_SURFACE_ACTOR_GET_CLASS (self)->is_unredirected (self); }
void meta_surface_actor_set_unredirected (MetaSurfaceActor *self, gboolean unredirected) { META_SURFACE_ACTOR_GET_CLASS (self)->set_unredirected (self, unredirected); }
gboolean meta_surface_actor_should_unredirect (MetaSurfaceActor *self) { return META_SURFACE_ACTOR_GET_CLASS (self)->should_unredirect (self); }
gboolean meta_surface_actor_is_visible (MetaSurfaceActor *self) { return META_SURFACE_ACTOR_GET_CLASS (self)->is_visible (self); }
void meta_surface_actor_pre_paint (MetaSurfaceActor *self) { META_SURFACE_ACTOR_GET_CLASS (self)->pre_paint (self); }