summaryrefslogtreecommitdiff
path: root/src/sna/gen2_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-11-01 09:30:18 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-11-01 09:30:18 +0000
commit72bcd8f85c98502b13a67d9c606371afe513584c (patch)
tree99b922737b112c75ab027dddb57f5c79ceede8fd /src/sna/gen2_render.c
parent4e363906a5ef15e1eb0a387cfb6b3445ac185b9d (diff)
sna: Try to reduce ping-pong migration for intermixed render/legacy code paths
References: https://bugs.freedesktop.org/show_bug.cgi?id=56591 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen2_render.c')
-rw-r--r--src/sna/gen2_render.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/sna/gen2_render.c b/src/sna/gen2_render.c
index 50126624..024b1076 100644
--- a/src/sna/gen2_render.c
+++ b/src/sna/gen2_render.c
@@ -1614,7 +1614,6 @@ gen2_composite_fallback(struct sna *sna,
PicturePtr mask,
PicturePtr dst)
{
- struct sna_pixmap *priv;
PixmapPtr src_pixmap;
PixmapPtr mask_pixmap;
PixmapPtr dst_pixmap;
@@ -1653,8 +1652,7 @@ gen2_composite_fallback(struct sna *sna,
}
/* If anything is on the GPU, push everything out to the GPU */
- priv = sna_pixmap(dst_pixmap);
- if (priv && priv->gpu_damage && !priv->clear) {
+ if (dst_use_gpu(dst_pixmap)) {
DBG(("%s: dst is already on the GPU, try to use GPU\n",
__FUNCTION__));
return false;
@@ -1689,7 +1687,7 @@ gen2_composite_fallback(struct sna *sna,
if (too_large(dst_pixmap->drawable.width,
dst_pixmap->drawable.height) &&
- (priv == NULL || DAMAGE_IS_ALL(priv->cpu_damage))) {
+ dst_is_cpu(dst_pixmap)) {
DBG(("%s: dst is on the CPU and too large\n", __FUNCTION__));
return true;
}