[mutter/wip/carlosg/fix-second-monitor-invalidations: 6/7] clutter/cogl: Fix invalidation on non-primary monitors with no buffer age
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/fix-second-monitor-invalidations: 6/7] clutter/cogl: Fix invalidation on non-primary monitors with no buffer age
- Date: Wed, 30 Oct 2019 17:17:51 +0000 (UTC)
commit cf89e4d2cd97233eb6d859f0a7473a15b1253fa5
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Oct 29 15:54:36 2019 +0100
clutter/cogl: Fix invalidation on non-primary monitors with no buffer age
We passed the view rectangle, we however want a fb-scaled rectangle starting
at 0,0. Fixes invalidation on other than the primary monitor when those
paths are hit.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/898
clutter/clutter/cogl/clutter-stage-cogl.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/clutter/clutter/cogl/clutter-stage-cogl.c b/clutter/clutter/cogl/clutter-stage-cogl.c
index 751f26da3..78a7d8ffc 100644
--- a/clutter/clutter/cogl/clutter-stage-cogl.c
+++ b/clutter/clutter/cogl/clutter-stage-cogl.c
@@ -943,9 +943,16 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
}
else
{
+ cairo_rectangle_int_t clip;
cairo_region_t *view_region;
- view_region = cairo_region_create_rectangle (&view_rect);
+ clip = (cairo_rectangle_int_t) {
+ .x = 0,
+ .y = 0,
+ .width = ceilf (view_rect.width * fb_scale),
+ .height = ceilf (view_rect.height * fb_scale)
+ };
+ view_region = cairo_region_create_rectangle (&clip);
paint_stage (stage_cogl, view, view_region);
cairo_region_destroy (view_region);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]