mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +00:00
vulkan: Round damage rectangles properly
We need to round outwards and a 1x1 rectangle with offset 0.5,0.5 should end up as a 3x3 rectangle with offset 0,0 when rounded, not as a 2x2 rectangle.
This commit is contained in:
parent
b1995d0d77
commit
4e77667ab8
@ -714,8 +714,8 @@ gdk_vulkan_context_end_frame (GdkDrawContext *draw_context,
|
||||
.layer = 0,
|
||||
.offset.x = (int) floor (r.x * scale),
|
||||
.offset.y = (int) floor (r.y * scale),
|
||||
.extent.width = (int) ceil (r.width * scale),
|
||||
.extent.height = (int) ceil (r.height * scale),
|
||||
.extent.width = (int) ceil ((r.x + r.width) * scale) - floor (r.x * scale),
|
||||
.extent.height = (int) ceil ((r.y + r.height) * scale) - floor (r.y * scale),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user