mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 12:02:04 +00:00
stage-cogl: Fix buffer_age code path
Currently we where checking whether the damage_history list contains more or equal then buffer_age entries. This is wrong because we prepend our current clip to the list just before the check. Fix that to check whether we have more entries instead of more or equal. https://bugzilla.gnome.org/show_bug.cgi?id=724788
This commit is contained in:
parent
75f2b1c5c2
commit
2639395533
@ -483,11 +483,12 @@ clutter_stage_cogl_redraw (ClutterStageWindow *stage_window)
|
|||||||
|
|
||||||
stage_cogl->damage_history = g_slist_prepend (stage_cogl->damage_history, current_damage);
|
stage_cogl->damage_history = g_slist_prepend (stage_cogl->damage_history, current_damage);
|
||||||
|
|
||||||
if (age != 0 && !stage_cogl->dirty_backbuffer && g_slist_length (stage_cogl->damage_history) >= age)
|
if (age != 0 && !stage_cogl->dirty_backbuffer && g_slist_length (stage_cogl->damage_history) > age)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
GSList *tmp = NULL;
|
GSList *tmp = NULL;
|
||||||
for (tmp = stage_cogl->damage_history; tmp; tmp = tmp->next)
|
/* We skip the first entry because it is the clip_region itself */
|
||||||
|
for (tmp = stage_cogl->damage_history->next; tmp; tmp = tmp->next)
|
||||||
{
|
{
|
||||||
_clutter_util_rectangle_union (clip_region, tmp->data, clip_region);
|
_clutter_util_rectangle_union (clip_region, tmp->data, clip_region);
|
||||||
i++;
|
i++;
|
||||||
|
Loading…
Reference in New Issue
Block a user