[Cairo] Re: Updated 'push and pull' patch for Cairo (was Re: compiling on Slackware 9.0)

graydon hoare graydon at redhat.com
Mon Aug 18 16:27:21 PDT 2003


Eric Christopherson <rakko at charter.net> writes:

> > Actually it doesn't seem to work. When I try the cairo-demo programs under a
> > non-RENDER server, they all quit with a failed X_CreatePixmap request
> > (BadValue error). Can anyone else get them to work after the patch?
> > 
> > (At least xrspline didn't crash the server... although when I run it under a
> > regular RENDER-supporting server, it still does.)
> 
> Has anyone else tried the patch? If so, have you gotten it to work?

yeah, on my end it needs Yet Another Unusual X Related Hack I Don't Pretend To
Know The Reason For (but then it works here):

$ interdiff /tmp/cairo-push-and-pull.patch ~/work/patches/cairo-push-and-pull.patch 

diff -u src/cairo_surface.c src/cairo_surface.c
--- src/cairo_surface.c 2003-08-06 16:22:49.000000000 -0500
+++ src/cairo_surface.c 18 Aug 2003 23:24:43 -0000
@@ -486,6 +486,18 @@
 
     else 
       {
+
+       // for reasons I am not yet clear on, sometimes XGetImage will
+       // return an XImage with zeroed mask components. this is frustrating!
+       if (surface->ximage->red_mask == 0
+           && surface->ximage->green_mask == 0
+           && surface->ximage->blue_mask == 0)
+         {
+           surface->ximage->red_mask = 0x00ff0000; 
+           surface->ximage->green_mask = 0x0000ff00; 
+           surface->ximage->blue_mask = 0x000000ff; 
+         }
+
        // this is a "normal" pixmap we're pulling a copy of
        analyze_mask (surface->ximage->red_mask, 
                      &(fmt.red), &(fmt.redMask), &redbits);





More information about the cairo mailing list