[cairo] MIPMAPPING cairo.

Frédéric Plourde frederic.plourde at polymtl.ca
Tue Oct 14 12:03:37 PDT 2008


 Hi everybody...

 Here it is !...  Mipmaping for cairo, for AFFINE transformations
 There are 2 associated patches :

 1- one against CAIRO revision '8ac8e8c523abaa5db24c5303c671ff3487bf0801'
   attached file : CAIRO_MIPMAPPING.patch

 2- one against PIXMAN revision 'f5d4e01c399d6d23fd7e4cfaa26e0b07e2279690'
   attached file : PIXMAN_MIPMAPPING.patch

 The code has been tested with a very extensive set of source sizes, 
destination sizes, rotation angles, etc...
 To reproduce these test cases :

 Compile and run a little program I wrote and attached here 
('cairo_downscale.c'),
 Put the source image 
(http://img58.imageshack.us/img58/8669/src1231x1504np1.png) in the 
program directory.
 * you can customize the beginning of the program to change the test case.


 For those who don't have time to run the test cases, here are some 
visual examples !

 1 - Uniform scalings (Xscale = Yscale)
 ========================
 * Former 'nearest' and 'bilinear" modes :
   nearest : 
http://img84.imageshack.us/img84/5474/dest1231x1504to840x1026wc9.png
   bilinear : 
http://img388.imageshack.us/img388/6500/dest1231x1504to840x1026cw3.png

 * New mipmaping modes :
   nearest_mipmap_linear : 
http://img399.imageshack.us/img399/9305/dest1231x1504to840x1026mq6.png
   linear_mipmap_nearest : 
http://img388.imageshack.us/img388/9099/dest1231x1504to840x1026zu3.png
   linear_mipmap_linear : 
http://img356.imageshack.us/img356/8913/dest1231x1504to840x1026io3.png


 2 - Non-uniform scalings (Xscale != Yscale)
 ========================
 * Former 'nearest' and 'bilinear" modes :
   nearest : 
http://img88.imageshack.us/img88/7674/dest1231x1504to840x257ncr1.png
   bilinear : 
http://img88.imageshack.us/img88/4944/dest1231x1504to840x257bio1.png

 * New mipmaping modes :
   nearest_mipmap_linear : 
http://img88.imageshack.us/img88/755/dest1231x1504to840x257nam9.png
   linear_mipmap_nearest : 
http://img88.imageshack.us/img88/2253/dest1231x1504to840x257lwr7.png
   linear_mipmap_linear : 
http://img125.imageshack.us/img125/676/dest1231x1504to840x257trz4.png


 3 - Rotations  and skewing
 ========================
 * Former 'nearest' and 'bilinear" modes :
   nearest : 
http://img369.imageshack.us/img369/6113/dest1231x1504to144x144ncx6.png
   bilinear : 
http://img369.imageshack.us/img369/8497/dest1231x1504to144x144bij4.png

 * New mipmaping modes :
   nearest_mipmap_linear : 
http://img369.imageshack.us/img369/2240/dest1231x1504to144x144nqf0.png
   linear_mipmap_nearest : 
http://img369.imageshack.us/img369/1201/dest1231x1504to144x144lme4.png
   linear_mipmap_linear : 
http://img369.imageshack.us/img369/6639/dest1231x1504to144x144thz8.png


 So that's it folks...
 I'd like your input on that... as we'll certainly need to be pushing 
that upstream within 2 weeks at Mozilla for Firefox 3.1



-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cairo_downscale.c
Url: http://lists.cairographics.org/archives/cairo/attachments/20081014/9c81809f/attachment-0001.asc 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pixman_MIPMAPPING.patch
Type: text/x-patch
Size: 70698 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20081014/9c81809f/attachment-0002.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cairo_MIPMAPPING.patch
Type: text/x-patch
Size: 1385 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20081014/9c81809f/attachment-0003.bin 


More information about the cairo mailing list