sna: Tweak damage not to reduce if it will not affect the outcome of reducing to all
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
be21a09fef
commit
aff32e3e08
|
|
@ -147,14 +147,15 @@ static inline void sna_damage_reduce_all(struct sna_damage **damage,
|
|||
if (*damage == NULL)
|
||||
return;
|
||||
|
||||
if ((*damage)->dirty && (*damage = _sna_damage_reduce(*damage)) == NULL)
|
||||
return;
|
||||
|
||||
if ((*damage)->mode == DAMAGE_ADD &&
|
||||
(*damage)->extents.x1 <= 0 &&
|
||||
(*damage)->extents.y1 <= 0 &&
|
||||
(*damage)->extents.x2 >= width &&
|
||||
(*damage)->extents.y2 >= height) {
|
||||
if ((*damage)->dirty &&
|
||||
(*damage = _sna_damage_reduce(*damage)) == NULL)
|
||||
return;
|
||||
|
||||
if ((*damage)->region.data == NULL)
|
||||
*damage = _sna_damage_all(*damage, width, height);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue