[cairo] Operator optimization based on source or dest opacity

Antoine Azar cairo at antoineazar.com
Sat Mar 1 16:27:03 PST 2008


Hey Soren,

>For integer translations, cairo already does the translation by itself
>before passing the surface to pixman. See 
>cairo_pattern_acquire_surface_for_surface() in cairo-pattern.c.

Great, I hadn't noticed that.

>But frankly in both cases, a simpler, and much bigger, speed-up than
>the operator replacement would be to just write a couple of fast paths
>that would deal with such simple transformations without the matrix
>multiplication and the indirect fetch functions.

Indeed. Is it on any todo list?

I was actually thinking of something, whenever we're doing bilinear 
filtering with an opaque source, we're forced of going the whole 
compositing way, even though we don't really need compositing. All we 
need is to sample from the dest whenever we're oustide the source. 
That would simply require to have a different fetchFromRegion 
function that returns the dest instead of 0 when ouside the image. 
I'm not sure of a clean way to do it right now, but ideas are welcome.

I'm attaching the three new patches. Let me know how it looks now.
Thanks,
Antoine 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-Moved-all-composition-operators-from-pixman-compose.patch
Type: application/octet-stream
Size: 65059 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080301/77624248/attachment-0003.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-Implemented-operator-optimization-espescially-used.patch
Type: application/octet-stream
Size: 9578 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080301/77624248/attachment-0004.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-Simplified-a-bit-the-checks-to-get-a-fast-code-path.patch
Type: application/octet-stream
Size: 1399 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080301/77624248/attachment-0005.obj 


More information about the cairo mailing list