shaped-texture: Add get_width()
/get_height()
API
Add an API to retrieve the content size of a shaped texture. https://gitlab.gnome.org/GNOME/mutter/merge_requests/1022
This commit is contained in:
parent
840c50b00d
commit
ebc07871eb
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user