clutter/stage-cogl: Simplify redraw function

Spotted while adding tracing to swap buffers, we only enter
the first part of the if condition when use_clipped_redraw
is TRUE, so it's pretty safe to assume it's TRUE.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/197
This commit is contained in:
Georges Basile Stavracas Neto 2019-05-20 10:37:52 -03:00
parent 04b240b50c
commit 3e2a2cf532
No known key found for this signature in database
GPG Key ID: 886C17EE170D1385

View File

@ -907,26 +907,16 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
*/
if (use_clipped_redraw)
{
if (use_clipped_redraw && clip_region_empty)
if (clip_region_empty)
{
do_swap_buffer = FALSE;
}
else if (use_clipped_redraw)
else
{
swap_region = fb_clip_region;
g_assert (swap_region.width > 0);
do_swap_buffer = TRUE;
}
else
{
swap_region = (cairo_rectangle_int_t) {
.x = 0,
.y = 0,
.width = view_rect.width * fb_scale,
.height = view_rect.height * fb_scale,
};
do_swap_buffer = TRUE;
}
}
else
{