summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--glamor/glamor_largepixmap.c9
-rw-r--r--glamor/glamor_render.c9
2 files changed, 17 insertions, 1 deletions
diff --git a/glamor/glamor_largepixmap.c b/glamor/glamor_largepixmap.c
index 391f376e9..da3fb6150 100644
--- a/glamor/glamor_largepixmap.c
+++ b/glamor/glamor_largepixmap.c
@@ -1055,6 +1055,15 @@ glamor_composite_largepixmap_region(CARD8 op,
int source_repeat_type = 0, mask_repeat_type = 0;
int ok = TRUE;
+ if (source_pixmap == dest_pixmap) {
+ glamor_fallback("source and dest pixmaps are the same\n");
+ return FALSE;
+ }
+ if (mask_pixmap == dest_pixmap) {
+ glamor_fallback("mask and dest pixmaps are the same\n");
+ return FALSE;
+ }
+
if (source->repeat)
source_repeat_type = source->repeatType;
else
diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c
index efca36744..05eee913e 100644
--- a/glamor/glamor_render.c
+++ b/glamor/glamor_render.c
@@ -1481,7 +1481,14 @@ glamor_composite_clipped_region(CARD8 op,
}
}
- /*XXXXX, self copy? */
+ if (temp_src_pixmap == dest_pixmap) {
+ glamor_fallback("source and dest pixmaps are the same\n");
+ goto out;
+ }
+ if (temp_mask_pixmap == dest_pixmap) {
+ glamor_fallback("mask and dest pixmaps are the same\n");
+ goto out;
+ }
x_dest += dest->pDrawable->x;
y_dest += dest->pDrawable->y;