[cairo] drawlist type functionality in Cairo

Dirk Schönberger dirk.schoenberger at sz-online.de
Tue Apr 5 12:25:50 PDT 2005

> > I believe drawlists would be needed for the following two uses
> >
> > - complex drop shadows, where the same path is rendered multiple times

> I don't see why.

s/would be needed/would be useful/g

If you don't use an explicit path reference, but instead just use cairo API
functions, i.e. cairo_lineto, cairo_moveto, I don't see no other solution
short of display lists to create drop shadow effects. Ok, alternatively you
could implement ad hoc display lists in client code.

> To me a cache doesn't necessarily have to do with keys and values, just
> that something is stored in a more appropriate way or place for being
> used again. But I don't know, maybe I'm wrong, maybe a better
> description of what I'm talking about here is "backend specific storage"
> of paths and patterns.

> This backend specific storage would always be attached to the path
> object itself. I'm not suggesting some sort of global cache.

Ok, this makes it more clean. I agree, if you don't have a global cache, you
don't need explicit keys.
However, there remain some problems:

- what happens if a path is rendered into multiple backends which are all
"active". Seems like a good bit of cache-trashing to me
- when will a cached path data be invalidated?
- display lists would allow to render multiple paths with multiple patterns
with a many-to-many relation between them, beside of being able to
  store information which change the global graphic state (set_color,
set_lne_width, ...). I don't see how you would implement this by using
  purely backend specific cached paths and patterns.


More information about the cairo mailing list