[cairo] glitztest and pbuffers

Jon Smirl jonsmirl at yahoo.com
Wed May 26 19:52:38 PDT 2004

--- David Reveman <c99drn at cs.umu.se> wrote:
> Right now it's done for every drawing operation. This is why offscreen
> drawing is extremely inefficient with the gl backend when pbuffer
> support is missing. I been planning to add an image surface buffer to gl
> backend surfaces which doesn't support offscreen drawing. The image data
> will then only be flushed to the glitz surface when actually needed.
> This will fix the efficiency problem and make the gl backend really
> useful for offscreen drawing, even though pbuffer support is missing.
> Imagine a scenario where an application is doing a bunch of drawing to
> an offscreen surface and then use it as a pattern or with show_surface,
> offscreen drawing speed will be ok (pixman speed), pattern and
> show_surface will be OpenGL fast.

This is a good reason to create a separate API for an offscreen writable vs
readonly surfaces. The readonly surface becomes a texture. The writable one is a
pixmap. The only operation to a read only surface is to set an image to it.

I'm not hitting the MakeCurrent problem on every run so it looks like it is
probably an uninitialized variable somewhere. miniglx will assert if you pass it
in a bogus surface. OpenGL would report an error but hardly anyone checks them.

The plan is to add render_to_texture to miniglx as soon as I can get basic
drawing to work. So far I can't get it to draw anything.

Jon Smirl
jonsmirl at yahoo.com

Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.

More information about the cairo mailing list