From da66a76f276eccee90855bc0cb28092c3755ed7b Mon Sep 17 00:00:00 2001 From: Zhigang Gong Date: Fri, 1 Jul 2011 23:48:21 +0800 Subject: [PATCH] Revert "glamor: Don't need to read dest if op is SRC or CLEAR." This reverts commit eb16fe0b7c8ea27b5cf9122d02e48bf585495228. As currently glamor_prepare_access/finish_access will touch the whole pixmap, not just the request region, then write only mode will not work correctly. We may need to revisit all fallback case, and convert the image to the right size before do the prepare/finish processing. Signed-off-by: Zhigang Gong --- glamor/glamor_render.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c index 72e0f83c6..30cc50739 100644 --- a/glamor/glamor_render.c +++ b/glamor/glamor_render.c @@ -1144,7 +1144,6 @@ glamor_composite(CARD8 op, PicturePtr temp_src = source, temp_mask = mask; int x_temp_src, y_temp_src, x_temp_mask, y_temp_mask; glamor_composite_rect_t rect; - glamor_access_t dest_access; x_temp_src = x_source; y_temp_src = y_source; @@ -1266,12 +1265,7 @@ fail: glUseProgramObjectARB(0); glDisable(GL_BLEND); - - if (op == PictOpSrc || op == PictOpClear) - dest_access = GLAMOR_ACCESS_WO; - else - dest_access = GLAMOR_ACCESS_RW; - if (glamor_prepare_access_picture(dest, dest_access)) { + if (glamor_prepare_access_picture(dest, GLAMOR_ACCESS_RW)) { if (glamor_prepare_access_picture(source, GLAMOR_ACCESS_RO)) { if (!mask ||