summaryrefslogtreecommitdiff
path: root/src/compositor/meta-shaped-texture.c
diff options
context:
space:
mode:
authorAdel Gadllah <adel.gadllah@gmail.com>2012-02-21 16:42:39 +0100
committerAdel Gadllah <adel.gadllah@gmail.com>2012-02-21 18:09:25 +0100
commit3cb912aee2b1d98ac5e14817fc9b8039d37cd3ae (patch)
treeb7daebe806e25b2b247d0dc1a3b5f1ae8022b342 /src/compositor/meta-shaped-texture.c
parent7df823132c4fe229503ccf216a6be71895635519 (diff)
downloadmutter-3cb912aee2b1d98ac5e14817fc9b8039d37cd3ae.tar.gz
MetaShapedTexture: Implement get_paint_volume
Add a get_paint_volume implementation to MetaShapedTexture.
Diffstat (limited to 'src/compositor/meta-shaped-texture.c')
-rw-r--r--src/compositor/meta-shaped-texture.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c
index f8018ed08..9f3567b14 100644
--- a/src/compositor/meta-shaped-texture.c
+++ b/src/compositor/meta-shaped-texture.c
@@ -54,6 +54,8 @@ static void meta_shaped_texture_get_preferred_height (ClutterActor *self,
static void meta_shaped_texture_dirty_mask (MetaShapedTexture *stex);
+static gboolean meta_shaped_texture_get_paint_volume (ClutterActor *self, ClutterPaintVolume *volume);
+
G_DEFINE_TYPE (MetaShapedTexture, meta_shaped_texture,
CLUTTER_TYPE_ACTOR);
@@ -94,6 +96,7 @@ meta_shaped_texture_class_init (MetaShapedTextureClass *klass)
actor_class->get_preferred_height = meta_shaped_texture_get_preferred_height;
actor_class->paint = meta_shaped_texture_paint;
actor_class->pick = meta_shaped_texture_pick;
+ actor_class->get_paint_volume = meta_shaped_texture_get_paint_volume;
g_type_class_add_private (klass, sizeof (MetaShapedTexturePrivate));
}
@@ -552,6 +555,13 @@ meta_shaped_texture_get_preferred_height (ClutterActor *self,
*natural_height_p = priv->tex_height;
}
+static gboolean
+meta_shaped_texture_get_paint_volume (ClutterActor *self,
+ ClutterPaintVolume *volume)
+{
+ return clutter_paint_volume_set_from_allocation (volume, self);
+}
+
ClutterActor *
meta_shaped_texture_new (void)
{