mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
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
This commit is contained in:
parent
b0953b92ba
commit
d9ffbf0576
@ -807,36 +807,7 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
|
|||||||
{
|
{
|
||||||
CLUTTER_NOTE (CLIPPING, "Unclipped stage paint\n");
|
CLUTTER_NOTE (CLIPPING, "Unclipped stage paint\n");
|
||||||
|
|
||||||
/* If we are trying to debug redraw issues then we want to pass
|
paint_stage (stage_cogl, view, redraw_clip);
|
||||||
* 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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cairo_region_get_extents (redraw_clip, &redraw_rect);
|
cairo_region_get_extents (redraw_clip, &redraw_rect);
|
||||||
|
Loading…
Reference in New Issue
Block a user