[cairo] Solid pattern caching revisited

Carl Worth cworth at cworth.org
Thu Apr 19 07:29:38 PDT 2007

On Thu, 19 Apr 2007 14:26:53 +0100, Chris Wilson wrote:
> It seems that the best approach would be to use a COW surface.
> Implementing such a beast would be quite invasive, so I'm open to
> alternatives or further use cases that would benefit from COW surfaces.

Well, if you're just looking for sufficient motivation for
copy-on-write surfaces, we've actually wanted those for a long time
for a much bigger reason. Specifically, the "snapshot" interfaces that
the meta-surface relies on would really like COW surfaces. See this
comment for example:

	* The recording phase of the meta surface is careful to snapshot all
	* necessary objects (paths, patterns, etc.), in order to achieve
	* accurate replay. The efficiency of the meta surface could be
	* improved by improving the implementation of snapshot for the
	* various objects. For example, it would be nice to have a
	* copy-on-write implementation for _cairo_surface_snapshot.

So implementing COW surfaces could make the PS, PDF, and SVG quite a
bit more efficient.

In the meantime, I would think that the narrow case of supporting the
solid pattern cache would allow for a much more limited implementation
to still be quite effective, (since there really aren't any
interesting attributes to set on a 1x1 repeating surface used to
implement a solid pattern). So this might allow for a more modest,
less invasive implementation that would still solve that particular

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20070419/88ae9a54/attachment.pgp

More information about the cairo mailing list