sna: We can always compare the box to be subtracted against the dirty extents
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
cc21d3fa04
commit
f8c91f229a
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue