Skip to content

Commit

Permalink
devdraw: disable XCopyArea optimization
Browse files Browse the repository at this point in the history
Ubuntu Precise seems to have a buggy X server
that sometimes fails at XCopyArea. Let devdraw
do it itself.

This will slow down remote X a little bit,
but slow and correct is better than fast and broken.

R=rsc
https://codereview.appspot.com/7310069
  • Loading branch information
rsc committed Feb 8, 2013
1 parent cac1425 commit 5154e54
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/cmd/devdraw/x11-draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ xdraw(Memdrawparam *par)
* If no source alpha and an opaque mask, we can just copy
* the source onto the destination. If the channels are the
* same and the source is not replicated, XCopyArea works.
*/
* This is disabled because Ubuntu Precise seems to ship with
* a buggy X server that sometimes drops the XCopyArea
* requests on the floor.
m = Simplemask|Fullmask;
if((state&(m|Replsrc))==m && src->chan==dst->chan && src->X){
xdst = dst->X;
Expand All @@ -85,9 +87,10 @@ xdraw(Memdrawparam *par)
XCopyArea(_x.display, xsrc->pixmap, xdst->pixmap, gc,
sp.x, sp.y, Dx(r), Dy(r), dp.x, dp.y);
/* xdirtyxdata(dst, r); */
/* xdirtyxdata(dst, r); * /
return 1;
}
*/

/*
* If no source alpha, a 1-bit mask, and a simple source,
Expand Down

0 comments on commit 5154e54

Please sign in to comment.