[cairo-commit] xpdf-cairo/xpdf CairoOutputDev.cc,1.3,1.4

Alexander Larsson commit at pdx.freedesktop.org
Thu Jan 27 02:36:07 PST 2005


Committed by: alexl

Update of /cvs/cairo/xpdf-cairo/xpdf
In directory gabe:/tmp/cvs-serv22402/xpdf

Modified Files:
	CairoOutputDev.cc 
Log Message:
2005-01-26  Jeff Muizelaar  <jrmuizel at nit.ca>

        * xpdf/CairoOutputDev.cc: (drawImage):
        Improve performance by using getLine instead of getPix
	



Index: CairoOutputDev.cc
===================================================================
RCS file: /cvs/cairo/xpdf-cairo/xpdf/CairoOutputDev.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CairoOutputDev.cc	26 Jan 2005 13:57:05 -0000	1.3
+++ CairoOutputDev.cc	27 Jan 2005 10:36:05 -0000	1.4
@@ -485,7 +485,7 @@
   cairo_surface_t *image;
   int x, y;
   ImageStream *imgStr;
-  Guchar pix[gfxColorMaxComps];
+  Guchar *pix;
   GfxRGB rgb;
   int alpha, i;
   double *ctm;
@@ -506,8 +506,8 @@
 
   for (y = 0; y < height; y++) {
     dest = buffer + y * 4 * width;
-    for (x = 0; x < width; x++) {
-      imgStr->getPixel(pix);
+    pix = imgStr->getLine();
+    for (x = 0; x < width; x++, pix += colorMap->getNumPixelComps()) {
       colorMap->getRGB(pix, &rgb);
 
       if (maskColors) {




More information about the cairo-commit mailing list