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 <zhigang.gong@gmail.com>
This commit is contained in:
Zhigang Gong 2011-07-01 23:48:21 +08:00 committed by Zhigang Gong
parent cb3b34ec53
commit da66a76f27

View File

@ -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 ||