コード例 #1
0
/**
 * meta_background_actor_set_visible_region:
 * @self: a #MetaBackgroundActor
 * @visible_region: (allow-none): the area of the actor (in allocate-relative
 *   coordinates) that is visible.
 *
 * Sets the area of the background that is unobscured by overlapping windows.
 * This is used to optimize and only paint the visible portions.
 */
LOCAL_SYMBOL void
meta_background_actor_set_visible_region (MetaBackgroundActor *self,
                                          cairo_region_t      *visible_region)
{
  MetaBackgroundActorPrivate *priv;

  g_return_if_fail (META_IS_BACKGROUND_ACTOR (self));

  priv = self->priv;

  if (priv->top_actor != NULL)
    meta_background_set_visible_region (META_BACKGROUND (priv->top_actor), visible_region);
}
コード例 #2
0
static void
meta_background_dispose (GObject *object)
{
  MetaBackground *self = META_BACKGROUND (object);
  MetaBackgroundPrivate *priv = self->priv;

  meta_background_set_visible_region (self, NULL);

  if (priv->material != COGL_INVALID_HANDLE)
    {
      cogl_handle_unref (priv->material);
      priv->material = COGL_INVALID_HANDLE;
    }

  G_OBJECT_CLASS (meta_background_parent_class)->dispose (object);
}