diff --git a/src/compositor/meta-shaped-texture-private.h b/src/compositor/meta-shaped-texture-private.h index e96c6f8a8..85d94b753 100644 --- a/src/compositor/meta-shaped-texture-private.h +++ b/src/compositor/meta-shaped-texture-private.h @@ -63,4 +63,7 @@ gboolean meta_shaped_texture_update_area (MetaShapedTexture *stex, int height, cairo_rectangle_int_t *clip); +int meta_shaped_texture_get_width (MetaShapedTexture *stex); +int meta_shaped_texture_get_height (MetaShapedTexture *stex); + #endif diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c index 5847408a0..85a5143f9 100644 --- a/src/compositor/meta-shaped-texture.c +++ b/src/compositor/meta-shaped-texture.c @@ -1437,3 +1437,23 @@ meta_shaped_texture_get_buffer_scale (MetaShapedTexture *stex) return stex->buffer_scale; } + +int +meta_shaped_texture_get_width (MetaShapedTexture *stex) +{ + g_return_val_if_fail (META_IS_SHAPED_TEXTURE (stex), 0); + + ensure_size_valid (stex); + + return stex->dst_width; +} + +int +meta_shaped_texture_get_height (MetaShapedTexture *stex) +{ + g_return_val_if_fail (META_IS_SHAPED_TEXTURE (stex), 0); + + ensure_size_valid (stex); + + return stex->dst_height; +}