mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
shaped-texture: Viewport update calculation fixes
If only a viewport destination size is set, the noop viewport has to take the buffer scale into account. If a viewport source but no viewport destination size is set, the destination size is that of the viewport source, not of the whole texture. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1786>
This commit is contained in:
parent
1d82e0f236
commit
52547cb9ea
@ -1031,8 +1031,8 @@ meta_shaped_texture_update_area (MetaShapedTexture *stex,
|
|||||||
viewport = (graphene_rect_t) {
|
viewport = (graphene_rect_t) {
|
||||||
.origin.x = 0,
|
.origin.x = 0,
|
||||||
.origin.y = 0,
|
.origin.y = 0,
|
||||||
.size.width = stex->tex_width,
|
.size.width = stex->tex_width / stex->buffer_scale,
|
||||||
.size.height = stex->tex_height,
|
.size.height = stex->tex_height / stex->buffer_scale,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1043,8 +1043,8 @@ meta_shaped_texture_update_area (MetaShapedTexture *stex,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dst_width = (float) stex->tex_width;
|
dst_width = (float) viewport.size.width;
|
||||||
dst_height = (float) stex->tex_height;
|
dst_height = (float) viewport.size.height;
|
||||||
}
|
}
|
||||||
|
|
||||||
inverted_viewport = (graphene_rect_t) {
|
inverted_viewport = (graphene_rect_t) {
|
||||||
|
Loading…
Reference in New Issue
Block a user