[cairo] Image fallback in PS backend

Behdad Esfahbod behdad at cs.toronto.edu
Fri Apr 21 09:40:22 PDT 2006


On Fri, 21 Apr 2006, Carl Worth wrote:

> On Fri, 21 Apr 2006 08:57:28 -0400 (EDT), Behdad Esfahbod wrote:
> >
> > Just wondering:  I see there are checks in the PS backend to
> > short-circuit clear operations when we have not started a new
> > page yet...  One can improve the analyze surface a bit, to allow
> > OVER operations with transparency on a new page, even when the
> > backend (PS) does not support transparent OVER.  This way we
> > should get decent output for the minefield with PS backend, as
> > the image is in the background and will be drawn before anything
> > else, or that's what I assume :).
>
> It is drawn at the lowest layer, but I don't think it's necessarily
> the first element drawn on the page. So the silly little trick I did
> for short-circuiting the initial CLEAR won't help here.

Yes, I came to the same conclusion right after I Sent :).

> Instead, what I've envisioned for this is to extend the
> characterization of operations that a backend can provide to the
> analysis engine. Currently the information is just a Boolean,
> (supported or unsupported). What we want here is to be able to say,
> "I can support this operation only if there is nothing under it".

That may not quite be needed.  Knowing what the initial content
of the empty surface is (always transparent?), the OVER operation
for example resolves to SOURCE.  So if the backend supports
SOURCE, that will be enough.


> For the finer-than-full-page fallbacks we have planned, the analysis
> engine will already be examining the intersections of the affected
> regions of image operations. So once that's in place then adding
> support for this optimization will be quite easy.

Right.  So, we need to keep track of regions.  Do the metasurface
give us the bounding box for each operation already?


--behdad
http://behdad.org/

"Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
	-- Dan Bern, "New American Language"


More information about the cairo mailing list