diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-24 12:17:53 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-24 12:17:53 +0000 |
commit | f8c91f229a9ca18fc58b0cabbea595d26627db8b (patch) | |
tree | 1ca151c1bbd6fdb8fa2b02e51c5479b67e963da0 | |
parent | cc21d3fa045209861564cf240a9a082e0bdb63f8 (diff) |
sna: We can always compare the box to be subtracted against the dirty extents
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_damage.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/sna/sna_damage.c b/src/sna/sna_damage.c index 8b5ca7b1..cc4bf6ae 100644 --- a/src/sna/sna_damage.c +++ b/src/sna/sna_damage.c @@ -962,13 +962,13 @@ static struct sna_damage *__sna_damage_subtract(struct sna_damage *damage, if (!sna_damage_maybe_contains_box(damage, ®ion->extents)) return damage; - if (damage->mode != DAMAGE_SUBTRACT) { - if (region_is_singular(region) && - box_contains(®ion->extents, &damage->extents)) { - __sna_damage_destroy(damage); - return NULL; - } + if (region_is_singular(region) && + box_contains(®ion->extents, &damage->extents)) { + __sna_damage_destroy(damage); + return NULL; + } + if (damage->mode != DAMAGE_SUBTRACT) { if (damage->dirty) __sna_damage_reduce(damage); @@ -1041,12 +1041,12 @@ inline static struct sna_damage *__sna_damage_subtract_box(struct sna_damage *da if (!sna_damage_maybe_contains_box(damage, box)) return damage; - if (damage->mode != DAMAGE_SUBTRACT) { - if (box_contains(box, &damage->extents)) { - __sna_damage_destroy(damage); - return NULL; - } + if (box_contains(box, &damage->extents)) { + __sna_damage_destroy(damage); + return NULL; + } + if (damage->mode != DAMAGE_SUBTRACT) { if (damage->dirty) __sna_damage_reduce(damage); |