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);
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__));
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)) {
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;