[cairo-commit] libpixman/src icblt.c,1.5,1.6 icint.h,1.28,1.29
Jeff Muizelaar
commit at pdx.freedesktop.org
Thu Jun 23 19:30:26 PDT 2005
Committed by: jrmuizel
Update of /cvs/cairo/libpixman/src
In directory gabe:/tmp/cvs-serv21961/src
Modified Files:
icblt.c icint.h
Log Message:
2005-06-23 Jeff Muizelaar <jrmuizel at infidigm.net>
* src/icint.h:
* src/icblt.c: (IcBlt):
Start the xserver/fb -> libpixman merging with a copy
optimization.
Index: icblt.c
===================================================================
RCS file: /cvs/cairo/libpixman/src/icblt.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- icblt.c 2 Mar 2005 15:43:33 -0000 1.5
+++ icblt.c 24 Jun 2005 02:30:20 -0000 1.6
@@ -63,7 +63,31 @@
int destInvarient;
int startbyte, endbyte;
IcDeclareMergeRop ();
-
+
+ /* are we just copying multiples of 8 bits? if so, run, forrest, run!
+ the memcpy()'s should be pluggable ala mplayer|xine - perhaps we can get
+ one of the above to give up their code for us.
+ */
+ if((pm==IC_ALLONES) && (alu==GXcopy) && !reverse && (srcX&7)==0 && (dstX&7)==0 && (width&7)==0)
+ {
+ uint8_t *isrc=(uint8_t *)srcLine;
+ uint8_t *idst=(uint8_t *)dstLine;
+ int sstride=srcStride*sizeof(pixman_bits_t);
+ int dstride=dstStride*sizeof(pixman_bits_t);
+ int j;
+ width>>=3;
+ isrc+=(srcX>>3);
+ idst+=(dstX>>3);
+ if(!upsidedown)
+ for(j=0;j<height;j++)
+ memcpy(idst+j*dstride, isrc+j*sstride, width);
+ else
+ for(j=(height-1);j>=0;j--)
+ memcpy(idst+j*dstride, isrc+j*sstride, width);
+
+ return;
+ }
+
#ifdef IC_24BIT
if (bpp == 24 && !IcCheck24Pix (pm))
{
Index: icint.h
===================================================================
RCS file: /cvs/cairo/libpixman/src/icint.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- icint.h 3 Mar 2005 21:52:49 -0000 1.28
+++ icint.h 24 Jun 2005 02:30:20 -0000 1.29
@@ -61,6 +61,7 @@
typedef unsigned int Mask;
+#define GXcopy 0x3
#define GXor 0x7
#define ClipByChildren 0
#define PolyEdgeSharp 0
More information about the cairo-commit
mailing list