mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +00:00
Merge branch 'wip/otte/for-matthiasc' into 'main'
vulkan: Round damage rectangles properly See merge request GNOME/gtk!7602
This commit is contained in:
commit
03c99ebc99
@ -718,8 +718,8 @@ gdk_gl_context_real_end_frame (GdkDrawContext *draw_context,
|
||||
cairo_region_get_rectangle (painted, i, &rect);
|
||||
rects[j++] = (int) floor (rect.x * scale);
|
||||
rects[j++] = (int) floor ((surface_height - rect.height - rect.y) * scale);
|
||||
rects[j++] = (int) ceil (rect.width * scale);
|
||||
rects[j++] = (int) ceil (rect.height * scale);
|
||||
rects[j++] = (int) ceil ((rect.x + rect.width) * scale) - floor (rect.x * scale);
|
||||
rects[j++] = (int) ceil ((surface_height - rect.y) * scale) - floor ((surface_height - rect.height - rect.y) * scale);
|
||||
}
|
||||
priv->eglSwapBuffersWithDamage (gdk_display_get_egl_display (display), egl_surface, rects, n_rects);
|
||||
g_free (heap_rects);
|
||||
|
@ -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