diff --git a/glamor/glamor_prepare.c b/glamor/glamor_prepare.c index 9bfc557e1..833291c58 100644 --- a/glamor/glamor_prepare.c +++ b/glamor/glamor_prepare.c @@ -220,8 +220,22 @@ glamor_prepare_access_picture_box(PicturePtr picture, glamor_access_t access, { if (!picture || !picture->pDrawable) return TRUE; - return glamor_prepare_access_box(picture->pDrawable, access, - x, y, w, h); + + /* If a transform is set, we don't know what the bounds is on the + * source, so just prepare the whole pixmap. XXX: We could + * potentially work out where in the source would be sampled based + * on the transform, and we don't need do do this for destination + * pixmaps at all. + */ + if (picture->transform) { + return glamor_prepare_access_box(picture->pDrawable, access, + 0, 0, + picture->pDrawable->width, + picture->pDrawable->height); + } else { + return glamor_prepare_access_box(picture->pDrawable, access, + x, y, w, h); + } } void