Commit da66a76f authored by Zhigang Gong's avatar Zhigang Gong Committed by Zhigang Gong

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's avatarZhigang Gong <zhigang.gong@gmail.com>
parent cb3b34ec
...@@ -1144,7 +1144,6 @@ glamor_composite(CARD8 op, ...@@ -1144,7 +1144,6 @@ glamor_composite(CARD8 op,
PicturePtr temp_src = source, temp_mask = mask; PicturePtr temp_src = source, temp_mask = mask;
int x_temp_src, y_temp_src, x_temp_mask, y_temp_mask; int x_temp_src, y_temp_src, x_temp_mask, y_temp_mask;
glamor_composite_rect_t rect; glamor_composite_rect_t rect;
glamor_access_t dest_access;
x_temp_src = x_source; x_temp_src = x_source;
y_temp_src = y_source; y_temp_src = y_source;
...@@ -1266,12 +1265,7 @@ fail: ...@@ -1266,12 +1265,7 @@ fail:
glUseProgramObjectARB(0); glUseProgramObjectARB(0);
glDisable(GL_BLEND); glDisable(GL_BLEND);
if (glamor_prepare_access_picture(dest, GLAMOR_ACCESS_RW)) {
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(source, GLAMOR_ACCESS_RO)) if (glamor_prepare_access_picture(source, GLAMOR_ACCESS_RO))
{ {
if (!mask || if (!mask ||
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment