diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-06-28 10:59:23 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-06-28 11:25:47 +0100 |
commit | e979d32bb71fef7341ceb9c2b2e80c6dfa50a7b3 (patch) | |
tree | 3d0e6bff54462f663b78fd6327f036151bd63c33 /src/sna/gen4_render.c | |
parent | 541f816815e392db9e798d2f940029d82a6b2e0b (diff) |
sna/gen2+: Consider precision in render operation placement
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66297
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen4_render.c')
-rw-r--r-- | src/sna/gen4_render.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c index b27e531a..fa140cf3 100644 --- a/src/sna/gen4_render.c +++ b/src/sna/gen4_render.c @@ -1635,14 +1635,14 @@ try_blt(struct sna *sna, } static bool -check_gradient(PicturePtr picture) +check_gradient(PicturePtr picture, bool precise) { switch (picture->pSourcePict->type) { case SourcePictTypeSolidFill: case SourcePictTypeLinear: return false; default: - return true; + return precise; } } @@ -1679,13 +1679,13 @@ source_is_busy(PixmapPtr pixmap) } static bool -source_fallback(struct sna *sna, PicturePtr p, PixmapPtr pixmap) +source_fallback(struct sna *sna, PicturePtr p, PixmapPtr pixmap, bool precise) { if (sna_picture_is_solid(p, NULL)) return false; if (p->pSourcePict) - return check_gradient(p); + return check_gradient(p, precise); if (!gen4_check_repeat(p) || !gen4_check_format(p->format)) return true; @@ -1717,11 +1717,13 @@ gen4_composite_fallback(struct sna *sna, dst_pixmap = get_drawable_pixmap(dst->pDrawable); src_pixmap = src->pDrawable ? get_drawable_pixmap(src->pDrawable) : NULL; - src_fallback = source_fallback(sna, src, src_pixmap); + src_fallback = source_fallback(sna, src, src_pixmap, + dst->polyMode == PolyModePrecise); if (mask) { mask_pixmap = mask->pDrawable ? get_drawable_pixmap(mask->pDrawable) : NULL; - mask_fallback = source_fallback(sna, mask, mask_pixmap); + mask_fallback = source_fallback(sna, mask, mask_pixmap, + dst->polyMode == PolyModePrecise); } else { mask_pixmap = NULL; mask_fallback = false; |