mirror of
https://github.com/brl/mutter.git
synced 2024-11-08 23:16:20 -05:00
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:
parent
04b240b50c
commit
3e2a2cf532
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user