mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
clutter/stage-cogl: Don't push scissor clip with one clip rectangle
While this is meant as an optimzation to only use the scissor clip and not the stencil buffer if there's only one clip rectangle, it's not needed since this optimization is going to be applied to region clips anyway inside _cogl_clip_stack_gl_flush() (see cogl-clip-stack-gl.c). So remove the unnecessary optimization here and rely on cogl-clip-stack to do it for us. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1113
This commit is contained in:
parent
8c52b431bb
commit
3fed768db4
@ -725,29 +725,7 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
|
||||
}
|
||||
else if (use_clipped_redraw)
|
||||
{
|
||||
cairo_rectangle_int_t clip_rect;
|
||||
|
||||
if (cairo_region_num_rectangles (fb_clip_region) == 1)
|
||||
{
|
||||
cairo_region_get_extents (fb_clip_region, &clip_rect);
|
||||
|
||||
CLUTTER_NOTE (CLIPPING,
|
||||
"Stage clip pushed: x=%d, y=%d, width=%d, height=%d\n",
|
||||
clip_rect.x,
|
||||
clip_rect.y,
|
||||
clip_rect.width,
|
||||
clip_rect.height);
|
||||
|
||||
cogl_framebuffer_push_scissor_clip (fb,
|
||||
clip_rect.x,
|
||||
clip_rect.y,
|
||||
clip_rect.width,
|
||||
clip_rect.height);
|
||||
}
|
||||
else
|
||||
{
|
||||
cogl_framebuffer_push_region_clip (fb, fb_clip_region);
|
||||
}
|
||||
cogl_framebuffer_push_region_clip (fb, fb_clip_region);
|
||||
|
||||
paint_stage (stage_cogl, view, redraw_clip);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user