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



commit adcbc2aa5fc3841c8b041f43ceb5f3166a58f374
Author: Jonas Ådahl <jadahl gmail com>
Date:   Wed Feb 5 16:43:40 2020 +0100

    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

 clutter/clutter/cogl/clutter-stage-cogl.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/clutter/clutter/cogl/clutter-stage-cogl.c b/clutter/clutter/cogl/clutter-stage-cogl.c
index 5beced17c..73a31e7be 100644
--- a/clutter/clutter/cogl/clutter-stage-cogl.c
+++ b/clutter/clutter/cogl/clutter-stage-cogl.c
@@ -788,10 +788,16 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
     }
   else
     {
-      cairo_rectangle_int_t rect = { 0, 0, view_rect.width, view_rect.height };
-      fb_clip_region = cairo_region_create_rectangle (&rect);
+      cairo_rectangle_int_t fb_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);
-      redraw_clip = cairo_region_copy (fb_clip_region);
+      redraw_clip = cairo_region_create_rectangle (&view_rect);
     }
 
   if (may_use_clipped_redraw &&


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]