summaryrefslogtreecommitdiff
path: root/src/sna/sna_blt.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-07-18 10:51:42 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-07-19 14:04:37 +0100
commit1b37a167d9caa7868427cb88b2480f3b64e96cc9 (patch)
treecd41630f2db98b8d44ca02295829d66034b22857 /src/sna/sna_blt.c
parent2d62f7c483a999c24c744c0d257c8524f6fd5d32 (diff)
sna: Only IGNORE_CPU for blt composite operations if the size is known
Some operations we do not know the true extents and so check the whole drawable when considering placement. In this case, the drawing may only partially cover the drawable and so we can not simply ignore existing CPU damage. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_blt.c')
-rw-r--r--src/sna/sna_blt.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/sna/sna_blt.c b/src/sna/sna_blt.c
index 1df23def..b071683f 100644
--- a/src/sna/sna_blt.c
+++ b/src/sna/sna_blt.c
@@ -2031,9 +2031,7 @@ clear:
hint = 0;
if (can_render(sna)) {
hint |= PREFER_GPU;
- if (sna_pixmap(tmp->dst.pixmap)->gpu_bo)
- hint |= FORCE_GPU;
- if (dst->pCompositeClip->data == NULL)
+ if (dst->pCompositeClip->data == NULL && (width | height))
hint |= IGNORE_CPU;
}
tmp->dst.bo = sna_drawable_use_bo(dst->pDrawable, hint,
@@ -2081,9 +2079,7 @@ fill:
hint = 0;
if (can_render(sna)) {
hint |= PREFER_GPU;
- if (sna_pixmap(tmp->dst.pixmap)->gpu_bo)
- hint |= FORCE_GPU;
- if (dst->pCompositeClip->data == NULL)
+ if (dst->pCompositeClip->data == NULL && (width | height))
hint |= IGNORE_CPU;
}
tmp->dst.bo = sna_drawable_use_bo(dst->pDrawable, hint,
@@ -2232,7 +2228,7 @@ fill:
hint = 0;
if (bo || can_render(sna)) {
hint |= PREFER_GPU;
- if (dst->pCompositeClip->data == NULL)
+ if (dst->pCompositeClip->data == NULL && (width | height))
hint |= IGNORE_CPU;
if (bo)
hint |= FORCE_GPU;