mirror of
https://github.com/brl/mutter.git
synced 2024-11-10 07:56:14 -05:00
window-actor: Use surface coordinates for the fast path in get_image()
shaped_texture requires the clip to be in surface coordinates. Scale it accordingly. https://gitlab.gnome.org/GNOME/mutter/merge_requests/758
This commit is contained in:
parent
cd70595b50
commit
b5775e3d85
@ -2182,9 +2182,21 @@ meta_window_actor_get_image (MetaWindowActor *self,
|
||||
if (clutter_actor_get_n_children (actor) == 1)
|
||||
{
|
||||
MetaShapedTexture *stex;
|
||||
MetaRectangle surface_clip;
|
||||
int geometry_scale;
|
||||
|
||||
geometry_scale =
|
||||
meta_window_actor_get_geometry_scale (self);
|
||||
|
||||
surface_clip = (MetaRectangle) {
|
||||
.x = clip->x / geometry_scale,
|
||||
.y = clip->y / geometry_scale,
|
||||
.width = clip->width / geometry_scale,
|
||||
.height = clip->height / geometry_scale,
|
||||
};
|
||||
|
||||
stex = meta_surface_actor_get_texture (priv->surface);
|
||||
return meta_shaped_texture_get_image (stex, clip);
|
||||
return meta_shaped_texture_get_image (stex, &surface_clip);
|
||||
}
|
||||
|
||||
clutter_actor_get_size (actor, &width, &height);
|
||||
|
Loading…
Reference in New Issue
Block a user