sna: Add a few missing checks for all-damaged
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
30f521c717
commit
96d1fe314c
|
|
@ -2853,7 +2853,8 @@ move_to_cpu:
|
|||
goto done;
|
||||
}
|
||||
} else {
|
||||
if (sna_damage_contains_box__no_reduce(priv->cpu_damage,
|
||||
if (DAMAGE_IS_ALL(priv->cpu_damage) ||
|
||||
sna_damage_contains_box__no_reduce(priv->cpu_damage,
|
||||
®ion->extents)) {
|
||||
assert(sna_damage_contains_box(&priv->gpu_damage, ®ion->extents) == PIXMAN_REGION_OUT);
|
||||
assert(sna_damage_contains_box(&priv->cpu_damage, ®ion->extents) == PIXMAN_REGION_IN);
|
||||
|
|
@ -3623,7 +3624,8 @@ create_gpu_bo:
|
|||
goto use_gpu_bo;
|
||||
}
|
||||
|
||||
if (sna_damage_contains_box__no_reduce(priv->gpu_damage,
|
||||
if (DAMAGE_IS_ALL(priv->gpu_damage) ||
|
||||
sna_damage_contains_box__no_reduce(priv->gpu_damage,
|
||||
®ion.extents)) {
|
||||
DBG(("%s: region wholly contained within GPU damage\n",
|
||||
__FUNCTION__));
|
||||
|
|
@ -3829,6 +3831,7 @@ cpu_fail:
|
|||
sna_damage_destroy(&priv->gpu_damage);
|
||||
*damage = NULL;
|
||||
} else {
|
||||
assert(!DAMAGE_IS_ALL(priv->cpu_damage));
|
||||
if (priv->cpu_damage &&
|
||||
sna_damage_contains_box__no_reduce(priv->cpu_damage,
|
||||
®ion.extents)) {
|
||||
|
|
@ -4712,8 +4715,9 @@ try_upload__blt(PixmapPtr pixmap, RegionRec *region,
|
|||
assert(priv->gpu_bo->proxy == NULL);
|
||||
|
||||
if (priv->cpu_damage &&
|
||||
sna_damage_contains_box__no_reduce(priv->cpu_damage,
|
||||
®ion->extents) &&
|
||||
(DAMAGE_IS_ALL(priv->cpu_damage) ||
|
||||
sna_damage_contains_box__no_reduce(priv->cpu_damage,
|
||||
®ion->extents)) &&
|
||||
!box_inplace(pixmap, ®ion->extents)) {
|
||||
DBG(("%s: no, damage on CPU and too small\n", __FUNCTION__));
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue