kms/update: Use mtk_region_get_box() instead of reconstructing the boxes
The underlying data structure of MtkRegion is pixman_region32, which gives us boxes, not rectangles. Use the new get_box() API to bypass going via rectangles to get the boxes directly. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4103>
This commit is contained in:
parent
9e3fd379d3
commit
59f40fe16c
@ -635,12 +635,11 @@ meta_kms_plane_assignment_set_fb_damage (MetaKmsPlaneAssignment *plane_assignmen
|
||||
mode_rects = g_new0 (struct drm_mode_rect, n_rectangles);
|
||||
for (i = 0; i < n_rectangles; ++i)
|
||||
{
|
||||
MtkRectangle rectangle = mtk_region_get_rectangle (region, i);
|
||||
|
||||
mode_rects[i].x1 = rectangle.x;
|
||||
mode_rects[i].y1 = rectangle.y;
|
||||
mode_rects[i].x2 = rectangle.x + rectangle.width;
|
||||
mode_rects[i].y2 = rectangle.y + rectangle.height;
|
||||
mtk_region_get_box (region, i,
|
||||
&mode_rects[i].x1,
|
||||
&mode_rects[i].y1,
|
||||
&mode_rects[i].x2,
|
||||
&mode_rects[i].y2);
|
||||
}
|
||||
|
||||
fb_damage = g_new0 (MetaKmsFbDamage, 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user