[Gridflow-cvs] [svn] commit: r6567 - /trunk/src/gem.cxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Mon Feb 7 17:13:20 EST 2011


Author: matju
Date: Mon Feb  7 17:13:18 2011
New Revision: 6567

Log:
[#from_pix]: much faster rgba->rgba conversion

Modified:
    trunk/src/gem.cxx

Modified: trunk/src/gem.cxx
==============================================================================
--- trunk/src/gem.cxx (original)
+++ trunk/src/gem.cxx Mon Feb  7 17:13:18 2011
@@ -245,16 +245,16 @@
 		long sxc = im.xsize*channels;
 		long sy = v[0];
 		bool f = yflip^im.upsidedown;
-		//if (channels==4 && im.format==GL_RGBA) {
-		//	for (int y=0; y<v[0]; y++) out.send(sxc,(uint8 *)im.data+sxc*(f?y:sy-1-y));
-		//} else {
+		if (channels==4 && im.format==GL_RGBA) {
+			for (int y=0; y<v[0]; y++) out.send(sxc,(uint8 *)im.data+sxc*(f?y:sy-1-y));
+		} else {
 			#define FOO(T) {T buf[sxc]; \
 			    for (int y=0; y<v[0]; y++) { \
 				uint8 *data = (uint8 *)im.data+im.xsize*im.csize*(f?y:sy-1-y); \
 				bp->unpack(im.xsize,data,buf); out.send(sxc,buf);}}
 			TYPESWITCH(cast,FOO,)
 			#undef FOO
-		//}
+		}
 	}
 	void render (void *state) {
 		pixBlock *pb = ((GemState *)state)->image;



More information about the Gridflow-cvs mailing list