summaryrefslogtreecommitdiff
path: root/pixman
diff options
context:
space:
mode:
authorJeff Muizelaar <jrmuizel@infidigm.net>2005-06-23 19:30:12 +0000
committerJeff Muizelaar <jrmuizel@infidigm.net>2005-06-23 19:30:12 +0000
commit81ec18369736888bea6d4d79d0de6ed00e8ca802 (patch)
tree4afc0bd42809f6520f73e34c77f3133150951bf8 /pixman
parentadeff84bc2eba19bb3f667297e594a1ef86ae2a9 (diff)
Start the xserver/fb -> libpixman merging with a copy optimization.
Diffstat (limited to 'pixman')
-rw-r--r--pixman/ChangeLog7
-rw-r--r--pixman/src/icblt.c26
-rw-r--r--pixman/src/icint.h1
3 files changed, 33 insertions, 1 deletions
diff --git a/pixman/ChangeLog b/pixman/ChangeLog
index e619314c..293bd66e 100644
--- a/pixman/ChangeLog
+++ b/pixman/ChangeLog
@@ -1,3 +1,10 @@
+2005-06-23 Jeff Muizelaar <jrmuizel@infidigm.net>
+
+ * src/icint.h:
+ * src/icblt.c: (IcBlt):
+ Start the xserver/fb -> libpixman merging with a copy
+ optimization.
+
2005-05-26 Keith Packard <keithp@keithp.com>
* src/iccompose.c: (IcFetch_transform), (IcFetcha_transform),
diff --git a/pixman/src/icblt.c b/pixman/src/icblt.c
index a48d1ef7..f8062f88 100644
--- a/pixman/src/icblt.c
+++ b/pixman/src/icblt.c
@@ -63,7 +63,31 @@ IcBlt (pixman_bits_t *srcLine,
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))
{
diff --git a/pixman/src/icint.h b/pixman/src/icint.h
index a31ddf44..9b823364 100644
--- a/pixman/src/icint.h
+++ b/pixman/src/icint.h
@@ -61,6 +61,7 @@ typedef struct _IcPoint {
typedef unsigned int Mask;
+#define GXcopy 0x3
#define GXor 0x7
#define ClipByChildren 0
#define PolyEdgeSharp 0