sna: Attempt to reduce all-damage on the CPU

As we now treat CPU all-damaged as a special case for deciding when and
where to migrate, look out for that condition after adding damage.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-07-03 11:48:15 +01:00
parent 3a41248195
commit dbe3a5ca1e
1 changed files with 3 additions and 3 deletions

View File

@ -1869,10 +1869,10 @@ done:
assert(!DAMAGE_IS_ALL(priv->cpu_damage));
assert_pixmap_contains_box(pixmap, RegionExtents(region));
sna_damage_add(&priv->cpu_damage, region);
if (priv->gpu_bo &&
sna_damage_is_all(&priv->cpu_damage,
sna_damage_reduce_all(&priv->cpu_damage,
pixmap->drawable.width,
pixmap->drawable.height)) {
pixmap->drawable.height);
if (priv->gpu_bo && DAMAGE_IS_ALL(priv->cpu_damage)) {
DBG(("%s: replaced entire pixmap\n", __FUNCTION__));
sna_pixmap_free_gpu(sna, priv);
priv->undamaged = false;