clutter/cogl/stage: Use fb size for for fallback fb clip region

When calculating the fallback framebuffer clip region, which should be
the region in framebuffer coordinates, we didn't scale the view layout
with the view framebuffer scale, meaning for any other scale than 1,
we'd draw a too small region of the view. Fix this by just using the
size of the framebuffer directly, avoiding any scale dependent
calculation all together.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
This commit is contained in:
Jonas Ådahl 2020-02-05 16:43:40 +01:00
parent 860906246e
commit adcbc2aa5f

View File

@ -788,10 +788,16 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
} }
else else
{ {
cairo_rectangle_int_t rect = { 0, 0, view_rect.width, view_rect.height }; cairo_rectangle_int_t fb_rect;
fb_clip_region = cairo_region_create_rectangle (&rect);
fb_rect = (cairo_rectangle_int_t) {
.width = fb_width,
.height = fb_height,
};
fb_clip_region = cairo_region_create_rectangle (&fb_rect);
g_clear_pointer (&redraw_clip, cairo_region_destroy); g_clear_pointer (&redraw_clip, cairo_region_destroy);
redraw_clip = cairo_region_copy (fb_clip_region); redraw_clip = cairo_region_create_rectangle (&view_rect);
} }
if (may_use_clipped_redraw && if (may_use_clipped_redraw &&