[Xr] Help: Render error on XrFormatRGB32

Keith Packard keithp at keithp.com
Sat May 3 18:13:03 PDT 2003

Around 16 o'clock on May 3, Owen Taylor wrote:

> So, the big culprit here is actually computing the alpha values for
> the individual trapezoids. Since that computation is scheduled to
> be completely rewritten, it's a little hard draw performance 
> conclusions at this point.

It's more than rewriting the code.  We've made some fundemental 
discoveries on the nature of incremental composition of tesselated figures 
that go to the very heart of the low-level rasterization code.  
Essentially, point sampling is as good as you can do, the only question is 
where to place the points.  The current implementation places them 
differently depending on the precise edges in use which generates some 
significant "issues" in many tesselations, so our plan is to place them in 
a regular grid using the observation that:

	2**(2n) - 1 = (2**n - 1) * (2**n + 1)

	   2**8 - 1 = (2**4 - 1) * (2**4 + 1)

	        255 = 15 * 17

Right now, the best algorithm I've come up with is to just step
the trapezoid edge 15 times per pixel row; that's actually pretty fast, 
but it would be nice to have an analytical approach which computed the 
covered samples directly from the edge values somehow.

Suggestions on how to draw the trapezoids using point-sampled alpha grids 
are welcome.


More information about the cairo mailing list