diff options
-rw-r--r-- | src/sna/gen2_render.c | 4 | ||||
-rw-r--r-- | src/sna/gen3_render.c | 2 | ||||
-rw-r--r-- | src/sna/gen4_render.c | 3 | ||||
-rw-r--r-- | src/sna/gen5_render.c | 3 | ||||
-rw-r--r-- | src/sna/gen6_render.c | 6 | ||||
-rw-r--r-- | src/sna/gen7_render.c | 6 | ||||
-rw-r--r-- | src/sna/sna_blt.c | 5 | ||||
-rw-r--r-- | src/sna/sna_render.c | 19 | ||||
-rw-r--r-- | src/sna/sna_render.h | 3 |
9 files changed, 29 insertions, 22 deletions
diff --git a/src/sna/gen2_render.c b/src/sna/gen2_render.c index ecccbbbf..31859b45 100644 --- a/src/sna/gen2_render.c +++ b/src/sna/gen2_render.c @@ -1722,7 +1722,7 @@ gen2_render_composite(struct sna *sna, src, dst, src_x, src_y, dst_x, dst_y, - width, height, tmp); + width, height, tmp, true); #endif /* Try to use the BLT engine unless it implies a @@ -1735,7 +1735,7 @@ gen2_render_composite(struct sna *sna, src_x, src_y, dst_x, dst_y, width, height, - tmp)) + tmp, false)) return true; if (gen2_composite_fallback(sna, src, mask, dst)) diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c index c44359f8..5b0894ec 100644 --- a/src/sna/gen3_render.c +++ b/src/sna/gen3_render.c @@ -2812,7 +2812,7 @@ gen3_render_composite(struct sna *sna, src_x, src_y, dst_x, dst_y, width, height, - tmp)) + tmp, false)) return true; if (gen3_composite_fallback(sna, op, src, mask, dst)) diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c index ab06295a..a56ef797 100644 --- a/src/sna/gen4_render.c +++ b/src/sna/gen4_render.c @@ -2271,7 +2271,8 @@ gen4_render_composite(struct sna *sna, src, dst, src_x, src_y, dst_x, dst_y, - width, height, tmp)) + width, height, + tmp, false)) return true; if (gen4_composite_fallback(sna, src, mask, dst)) diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c index 488ac342..71e77a47 100644 --- a/src/sna/gen5_render.c +++ b/src/sna/gen5_render.c @@ -2284,7 +2284,8 @@ gen5_render_composite(struct sna *sna, src, dst, src_x, src_y, dst_x, dst_y, - width, height, tmp)) + width, height, + tmp, false)) return true; if (gen5_composite_fallback(sna, src, mask, dst)) diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c index f8b1e711..710a35e9 100644 --- a/src/sna/gen6_render.c +++ b/src/sna/gen6_render.c @@ -2654,7 +2654,8 @@ gen6_render_composite(struct sna *sna, src, dst, src_x, src_y, dst_x, dst_y, - width, height, tmp)) + width, height, + tmp, false)) return true; if (gen6_composite_fallback(sna, src, mask, dst)) @@ -2679,7 +2680,8 @@ gen6_render_composite(struct sna *sna, src, dst, src_x, src_y, dst_x, dst_y, - width, height, tmp)) + width, height, + tmp, false)) return true; sna_render_reduce_damage(tmp, dst_x, dst_y, width, height); diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index 318cbef8..8a281e54 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -2756,7 +2756,8 @@ gen7_render_composite(struct sna *sna, src, dst, src_x, src_y, dst_x, dst_y, - width, height, tmp)) + width, height, + tmp, false)) return true; if (gen7_composite_fallback(sna, src, mask, dst)) @@ -2782,7 +2783,8 @@ gen7_render_composite(struct sna *sna, src, dst, src_x, src_y, dst_x, dst_y, - width, height, tmp)) + width, height, + tmp, false)) return true; sna_render_reduce_damage(tmp, dst_x, dst_y, width, height); diff --git a/src/sna/sna_blt.c b/src/sna/sna_blt.c index 819d24ae..98242026 100644 --- a/src/sna/sna_blt.c +++ b/src/sna/sna_blt.c @@ -1494,7 +1494,8 @@ sna_blt_composite(struct sna *sna, int16_t x, int16_t y, int16_t dst_x, int16_t dst_y, int16_t width, int16_t height, - struct sna_composite_op *tmp) + struct sna_composite_op *tmp, + bool fallback) { PictFormat src_format = src->format; PixmapPtr src_pixmap; @@ -1665,7 +1666,7 @@ clear: bo = __sna_render_pixmap_bo(sna, src_pixmap, &box, true); if (bo) ret = prepare_blt_copy(sna, tmp, bo, alpha_fixup); - if (!ret) + if (!ret && (bo == NULL || fallback)) ret = prepare_blt_put(sna, tmp, alpha_fixup); return ret; diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c index 757b2f41..0f1fa4bf 100644 --- a/src/sna/sna_render.c +++ b/src/sna/sna_render.c @@ -84,20 +84,19 @@ no_render_composite(struct sna *sna, { DBG(("%s (op=%d, mask? %d)\n", __FUNCTION__, op, mask != NULL)); + if (mask) + return false; + if (!is_gpu(dst->pDrawable) && (src->pDrawable == NULL || !is_gpu(src->pDrawable))) return false; - if (mask == NULL && - sna_blt_composite(sna, - op, src, dst, - src_x, src_y, - dst_x, dst_y, - width, height, - tmp)) - return true; - - return false; + return sna_blt_composite(sna, + op, src, dst, + src_x, src_y, + dst_x, dst_y, + width, height, + tmp, true); (void)mask_x; (void)mask_y; } diff --git a/src/sna/sna_render.h b/src/sna/sna_render.h index b079178b..442c78d4 100644 --- a/src/sna/sna_render.h +++ b/src/sna/sna_render.h @@ -569,7 +569,8 @@ bool sna_blt_composite(struct sna *sna, int16_t src_x, int16_t src_y, int16_t dst_x, int16_t dst_y, int16_t width, int16_t height, - struct sna_composite_op *tmp); + struct sna_composite_op *tmp, + bool fallback); bool sna_blt_composite__convert(struct sna *sna, int x, int y, int width, int height, |