[cairo] rendering to image, then to X11 display
Tamas K Papp
tpapp at Princeton.EDU
Mon Sep 3 11:53:08 PDT 2007
On Mon, Sep 03, 2007 at 02:27:58AM -0700, Eric Anholt wrote:
> On Mon, 2007-09-03 at 09:00 +0100, Chris Wilson wrote:
> > Jim Gettys (jg at laptop.org) said:
> > > On Sun, 2007-09-02 at 15:23 +0200, Tamas K Papp wrote:
> > > > I am getting tired of debugging my double buffered code for X11: I
> > > > tried following Carl's suggestions and started to use Xtrace, but the
> > > > whole thing is getting arcane and beyond my abilities. For example,
> > > > lately I found out that trying to stoke a path with more than approx
> > > > 10000 segments will kill the X connection with
> > > >
> > > > * X connection to :0.0 broken (explicit kill or server shutdown).
> > >
> > > This sounds like it could a bug in the XRender library, where it may be
> > > not handling big requests properly...
> > Sounds more like a bug in the xserver where connections are terminated
> > if the request exceeds a hard-coded MAXBUFSIZE which is many times
> > smaller than the advertised maximum BigReq.
> This bug is fixed in the current Xorg server 1.4 snapshot.
Thanks for all the replies. I understand that the issue is fixed now,
but I have had many issues with buffering via an X pixmap in the past
so I think I will try double buffering from an image surface now.
I had a look at cairo-xlib-surface.c and saw that it uses XPutImage to
copy an image surface to an X surface. This looks viable to me,
except I would copy an image surface to an X window directly. If I
have an RGB24 surface, what would be the correct values for
bits_per_pixel, red_mask, green_mask and blue_mask in the XImage
More information about the cairo