[mutter] clutter/stage-cogl: Don't clip when clipped redraws are disabled
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter/stage-cogl: Don't clip when clipped redraws are disabled
- Date: Wed, 13 May 2020 11:36:29 +0000 (UTC)
commit d9ffbf0576316ed258b96abad5d4208731cbfd9f
Author: Jonas Dreßler <verdre v0yd nl>
Date: Fri Mar 6 11:50:19 2020 +0100
clutter/stage-cogl: Don't clip when clipped redraws are disabled
It doesn't make sense to set the redraw clip when painting the stage if
clipped redraws are disabled. That's because when visualizing the redraw
clip and any new redraws are clipped, the old visualiziations would
remain visible, leaving multiple confusing rectangles on the screen.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1113
clutter/clutter/cogl/clutter-stage-cogl.c | 31 +------------------------------
1 file changed, 1 insertion(+), 30 deletions(-)
---
diff --git a/clutter/clutter/cogl/clutter-stage-cogl.c b/clutter/clutter/cogl/clutter-stage-cogl.c
index 43fa34c7f..7f01587d0 100644
--- a/clutter/clutter/cogl/clutter-stage-cogl.c
+++ b/clutter/clutter/cogl/clutter-stage-cogl.c
@@ -807,36 +807,7 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
{
CLUTTER_NOTE (CLIPPING, "Unclipped stage paint\n");
- /* If we are trying to debug redraw issues then we want to pass
- * the redraw_clip so it can be visualized */
- if (G_UNLIKELY (clutter_paint_debug_flags & CLUTTER_DEBUG_DISABLE_CLIPPED_REDRAWS) &&
- may_use_clipped_redraw &&
- !clip_region_empty)
- {
- cairo_rectangle_int_t clip_rect;
- cairo_rectangle_int_t scissor_rect;
-
- cairo_region_get_extents (fb_clip_region, &clip_rect);
-
- calculate_scissor_region (&clip_rect,
- subpixel_compensation,
- fb_width, fb_height,
- &scissor_rect);
-
- cogl_framebuffer_push_scissor_clip (fb,
- scissor_rect.x,
- scissor_rect.y,
- scissor_rect.width,
- scissor_rect.height);
-
- paint_stage (stage_cogl, view, redraw_clip);
-
- cogl_framebuffer_pop_clip (fb);
- }
- else
- {
- paint_stage (stage_cogl, view, redraw_clip);
- }
+ paint_stage (stage_cogl, view, redraw_clip);
}
cairo_region_get_extents (redraw_clip, &redraw_rect);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]