mirror of
https://github.com/brl/mutter.git
synced 2024-12-22 11:02:05 +00:00
clutter-stage-cogl: Fix uninitialized variable use_clipped_redraw
I noticed my system would fall back to the slow unclipped (and uncullable) paint path whenever a window touched the left edge of the screen. Turns out that was a red herring. Just that `use_clipped_redraw` was uninitialized so clipping/culling was used randomly. So the compiler failed to notice `use_clipped_redraw` was uninitialized. Weirdly, as soon as you fix that it starts complaining that `buffer_age` might be uninitialized, which appears to be wrong. So we initialize that too, to shut up the compiler warnings/errors. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1323
This commit is contained in:
parent
3187fe8ebc
commit
f511f94aa2
@ -551,7 +551,7 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
|
||||
CoglFramebuffer *onscreen = clutter_stage_view_get_onscreen (view);
|
||||
cairo_rectangle_int_t view_rect;
|
||||
gboolean is_full_redraw;
|
||||
gboolean use_clipped_redraw;
|
||||
gboolean use_clipped_redraw = TRUE;
|
||||
gboolean can_blit_sub_buffer;
|
||||
gboolean has_buffer_age;
|
||||
gboolean swap_with_damage;
|
||||
@ -561,7 +561,7 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
|
||||
cairo_region_t *swap_region;
|
||||
float fb_scale;
|
||||
int fb_width, fb_height;
|
||||
int buffer_age;
|
||||
int buffer_age = 0;
|
||||
gboolean res;
|
||||
|
||||
clutter_stage_view_get_layout (view, &view_rect);
|
||||
|
Loading…
Reference in New Issue
Block a user