summaryrefslogtreecommitdiff
path: root/src/sna/sna_blt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sna/sna_blt.c')
-rw-r--r--src/sna/sna_blt.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/sna/sna_blt.c b/src/sna/sna_blt.c
index c6219776..b83e6b20 100644
--- a/src/sna/sna_blt.c
+++ b/src/sna/sna_blt.c
@@ -2564,9 +2564,14 @@ fill:
src_pixmap = get_drawable_pixmap(src->pDrawable);
if (is_clear(src_pixmap)) {
- color = color_convert(sna_pixmap(src_pixmap)->clear_color,
- src->format, tmp->dst.format);
- goto fill;
+ if (src->repeat ||
+ (x >= 0 && y >= 0 &&
+ x + width < src_pixmap->drawable.width &&
+ y + height < src_pixmap->drawable.height)) {
+ color = color_convert(sna_pixmap(src_pixmap)->clear_color,
+ src->format, tmp->dst.format);
+ goto fill;
+ }
}
alpha_fixup = 0;