summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-01-03 12:19:24 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-01-03 21:35:03 +0000
commit4a68e7277104d7dccbdc4739eb5651902b9ccc20 (patch)
tree38644f62fec24fd994db3dcf8a4de5bedbac3274
parent199e357dc693cfe232464e4faa82d9223a8325d6 (diff)
sna/gen3: Prefer to use the blitter for solid fills
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/gen3_render.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c
index a4701dfb..fdd28058 100644
--- a/src/sna/gen3_render.c
+++ b/src/sna/gen3_render.c
@@ -2150,25 +2150,24 @@ gen3_composite_picture(struct sna *sna,
x, y, w, h, dst_x, dst_y);
}
-static inline Bool
+static inline bool
source_use_blt(struct sna *sna, PicturePtr picture)
{
+ /* If it is a solid, try to use the BLT paths */
if (!picture->pDrawable)
- return FALSE;
+ return picture->pSourcePict->type == SourcePictTypeSolidFill;
- /* If it is a solid, try to use the render paths */
if (picture->pDrawable->width == 1 &&
picture->pDrawable->height == 1 &&
picture->repeat)
- return FALSE;
+ return true;
- if (too_large(picture->pDrawable->width,
- picture->pDrawable->height))
- return TRUE;
+ if (too_large(picture->pDrawable->width, picture->pDrawable->height))
+ return true;
/* If we can sample directly from user-space, do so */
if (sna->kgem.has_vmap)
- return FALSE;
+ return false;
return is_cpu(picture->pDrawable);
}