summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-12-29 11:59:37 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-12-29 11:59:37 +0000
commitf53936407bd68f3d36ab525b4e0531fad58098e3 (patch)
tree3b4ace00e65440228b4a5f2c8afdbb26c756c334
parentc9f7f10bc528ac783f4e89bdb36fc56ccdcd0088 (diff)
sna: Reset the source counter upon dirtying the shadow pixmap
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c4
-rw-r--r--src/sna/sna_render.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 9c04e1dc..04382e44 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -783,6 +783,7 @@ done:
list_move(&priv->list, &sna->dirty_pixmaps);
}
+ priv->source_count = SOURCE_BIAS;
priv->gpu = false;
return true;
}
@@ -1063,6 +1064,7 @@ done:
if (dx | dy)
RegionTranslate(region, -dx, -dy);
+ priv->source_count = SOURCE_BIAS;
priv->gpu = false;
return true;
}
@@ -1867,6 +1869,7 @@ sna_put_zpixmap_blt(DrawablePtr drawable, GCPtr gc, RegionPtr region,
}
if (priv->flush)
list_move(&priv->list, &sna->dirty_pixmaps);
+ priv->source_count = SOURCE_BIAS;
blt:
get_drawable_deltas(drawable, pixmap, &dx, &dy);
@@ -9204,6 +9207,7 @@ sna_pixmap_free_gpu(struct sna *sna, struct sna_pixmap *priv)
pixmap->drawable.height);
sna_pixmap_destroy_gpu_bo(sna, priv);
+ priv->source_count = SOURCE_BIAS;
priv->gpu = false;
return true;
}
diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c
index c859244f..e7c3df44 100644
--- a/src/sna/sna_render.c
+++ b/src/sna/sna_render.c
@@ -337,7 +337,7 @@ move_to_gpu(PixmapPtr pixmap, const BoxRec *box)
count = SOURCE_BIAS;
priv = sna_pixmap(pixmap);
if (priv)
- count = ++priv->source_count;
+ count = priv->source_count++;
DBG(("%s: migrate box (%d, %d), (%d, %d)? source count=%d, fraction=%d/%d [%d]\n",
__FUNCTION__,
@@ -346,7 +346,7 @@ move_to_gpu(PixmapPtr pixmap, const BoxRec *box)
pixmap->drawable.width * pixmap->drawable.height,
pixmap->drawable.width * pixmap->drawable.height / (w*h)));
- return count*w*h >= pixmap->drawable.width * pixmap->drawable.height;
+ return count*w*h > pixmap->drawable.width * pixmap->drawable.height;
}
static Bool
pan> 2012-10-13UAPI: (Scripted) Disintegrate include/linuxDavid Howells1-81/+1 2012-07-24genetlink: define lockdep_genl_is_held() when CONFIG_LOCKDEPWANG Cong1-1/+1 2012-05-29genetlink: Build a generic netlink family module aliasNeil Horman1-0/+3 2011-12-03genetlink: Add rcu_dereference_genl and genl_dereference.Jesse Gross1-0/+21 2011-12-03genetlink: Add lockdep_genl_is_held().Pravin B Shelar1-0/+3 2010-04-03netlink: Export genl_lock() API for use by modulesJames Chapman1-0/+8 2009-01-30headers_check fix: linux/genetlink.hJaswinder Singh Rajput1-0/+1 2007-07-18[GENETLINK]: Dynamic multicast groups.Johannes Berg1-0/+13 2006-12-06[GENETLINK]: Move command capabilities to flags.Jamal Hadi Salim1-3/+3 2006-09-22[GENL]: Provide more information to userspace about registered genl familiesThomas Graf1-0/+18