diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-19 00:41:08 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-19 00:45:09 +0000 |
commit | 35f81005f91d294e61bb4ced7cbddd1a76ccb324 (patch) | |
tree | 3372db891b6d6c7d311221320ad97469261c5102 | |
parent | 36e691ea900d7979950c19714e15c5887d3ea039 (diff) |
sna/damage: Always mark the damage as dirty when recording new boxes
A few of the create_elts() routines missed marking the damage as dirty
so that if only part of the emebbed box was used (i.e. the damage
contained less than 8 rectangles that needed to included in the damage
region) then those were being ignored during migration and testing.
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=44682
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_damage.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sna/sna_damage.c b/src/sna/sna_damage.c index eda52c01..490e7a94 100644 --- a/src/sna/sna_damage.c +++ b/src/sna/sna_damage.c @@ -141,12 +141,12 @@ static const char *_debug_describe_damage(char *buf, int max, damage->mode == DAMAGE_SUBTRACT ? '-' : '+'); } else damage_str[0] = '\0'; - snprintf(buf, max, "[[(%d, %d), (%d, %d)]: %s %s]", + snprintf(buf, max, "[[(%d, %d), (%d, %d)]: %s %s]%c", damage->extents.x1, damage->extents.y1, damage->extents.x2, damage->extents.y2, _debug_describe_region(region_str, str_max, &damage->region), - damage_str); + damage_str, damage->dirty ? '*' : ' '); } return buf; @@ -257,6 +257,7 @@ _sna_damage_create_elt_from_boxes(struct sna_damage *damage, DBG((" %s: prev=(remain %d)\n", __FUNCTION__, damage->remain)); + damage->dirty = true; n = count; if (n > damage->remain) n = damage->remain; @@ -303,6 +304,7 @@ _sna_damage_create_elt_from_rectangles(struct sna_damage *damage, DBG((" %s: prev=(remain %d), count=%d\n", __FUNCTION__, damage->remain, count)); + damage->dirty = true; n = count; if (n > damage->remain) n = damage->remain; @@ -349,6 +351,7 @@ _sna_damage_create_elt_from_points(struct sna_damage *damage, DBG((" %s: prev=(remain %d), count=%d\n", __FUNCTION__, damage->remain, count)); + damage->dirty = true; n = count; if (n > damage->remain) n = damage->remain; |