[Scummvm-cvs-logs] scummvm master -> 15d57c8a9cad95f63797e4b91701c9c648c45ae3

wjp wjp at usecode.org
Sat Oct 5 17:45:53 CEST 2013


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
15d57c8a9c WINTERMUTE: Let pixel blending functions be inlined


Commit: 15d57c8a9cad95f63797e4b91701c9c648c45ae3
    https://github.com/scummvm/scummvm/commit/15d57c8a9cad95f63797e4b91701c9c648c45ae3
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2013-10-05T08:45:00-07:00

Commit Message:
WINTERMUTE: Let pixel blending functions be inlined

Changed paths:
    engines/wintermute/graphics/transparent_surface.cpp



diff --git a/engines/wintermute/graphics/transparent_surface.cpp b/engines/wintermute/graphics/transparent_surface.cpp
index 64102d7..f5528b1 100644
--- a/engines/wintermute/graphics/transparent_surface.cpp
+++ b/engines/wintermute/graphics/transparent_surface.cpp
@@ -38,26 +38,26 @@ void doBlitBinaryFast(byte *ino, byte *outo, uint32 width, uint32 height, uint32
 
 class BlenderAdditive {
 public:
-	static void blendPixel(byte ina, byte inr, byte ing, byte inb, byte *outa, byte *outr, byte *outg, byte *outb);
-	static void blendPixel(byte ina, byte inr, byte ing, byte inb, byte *outa, byte *outr, byte *outg, byte *outb, byte *ca, byte *cr, byte *cg, byte *cb);
-	static void blendPixel(byte *in, byte *out);
-	static void blendPixel(byte *in, byte *out, int colorMod);
+	inline void blendPixel(byte ina, byte inr, byte ing, byte inb, byte *outa, byte *outr, byte *outg, byte *outb);
+	inline void blendPixel(byte ina, byte inr, byte ing, byte inb, byte *outa, byte *outr, byte *outg, byte *outb, byte *ca, byte *cr, byte *cg, byte *cb);
+	inline void blendPixel(byte *in, byte *out);
+	inline void blendPixel(byte *in, byte *out, int colorMod);
 };
 
 class BlenderSubtractive {
 public:
-	static void blendPixel(byte ina, byte inr, byte ing, byte inb, byte *outa, byte *outr, byte *outg, byte *outb);
-	static void blendPixel(byte ina, byte inr, byte ing, byte inb, byte *outa, byte *outr, byte *outg, byte *outb, byte *ca, byte *cr, byte *cg, byte *cb);
-	static void blendPixel(byte *in, byte *out);
-	static void blendPixel(byte *in, byte *out, int colorMod);
+	inline void blendPixel(byte ina, byte inr, byte ing, byte inb, byte *outa, byte *outr, byte *outg, byte *outb);
+	inline void blendPixel(byte ina, byte inr, byte ing, byte inb, byte *outa, byte *outr, byte *outg, byte *outb, byte *ca, byte *cr, byte *cg, byte *cb);
+	inline void blendPixel(byte *in, byte *out);
+	inline void blendPixel(byte *in, byte *out, int colorMod);
 };
 
 class BlenderNormal {
 public:
-	static void blendPixel(byte ina, byte inr, byte ing, byte inb, byte *outa, byte *outr, byte *outg, byte *outb);
-	static void blendPixel(byte ina, byte inr, byte ing, byte inb, byte *outa, byte *outr, byte *outg, byte *outb, byte *ca, byte *cr, byte *cg, byte *cb);
-	static void blendPixel(byte *in, byte *out);
-	static void blendPixel(byte *in, byte *out, int colorMod);
+	inline void blendPixel(byte ina, byte inr, byte ing, byte inb, byte *outa, byte *outr, byte *outg, byte *outb);
+	inline void blendPixel(byte ina, byte inr, byte ing, byte inb, byte *outa, byte *outr, byte *outg, byte *outb, byte *ca, byte *cr, byte *cg, byte *cb);
+	inline void blendPixel(byte *in, byte *out);
+	inline void blendPixel(byte *in, byte *out, int colorMod);
 };
 
 /**
@@ -465,7 +465,7 @@ void doBlitBinaryFast(byte *ino, byte *outo, uint32 width, uint32 height, uint32
 
 template<class Blender> 
 void doBlit(byte *ino, byte *outo, uint32 width, uint32 height, uint32 pitch, int32 inStep, int32 inoStep, uint32 color) {
-
+	Blender b;
 	byte *in;
 	byte *out;
 
@@ -481,7 +481,7 @@ void doBlit(byte *ino, byte *outo, uint32 width, uint32 height, uint32 pitch, in
 				byte *outg = &out[TransparentSurface::kGIndex];
 				byte *outb = &out[TransparentSurface::kBIndex];
 
-				Blender::blendPixel(in[TransparentSurface::kAIndex],
+				b.blendPixel(in[TransparentSurface::kAIndex],
 					in[TransparentSurface::kRIndex],
 					in[TransparentSurface::kGIndex],
 					in[TransparentSurface::kBIndex],
@@ -510,7 +510,7 @@ void doBlit(byte *ino, byte *outo, uint32 width, uint32 height, uint32 pitch, in
 				byte *outg = &out[TransparentSurface::kGIndex];
 				byte *outb = &out[TransparentSurface::kBIndex];
 
-				Blender::blendPixel(in[TransparentSurface::kAIndex],
+				b.blendPixel(in[TransparentSurface::kAIndex],
 					in[TransparentSurface::kRIndex],
 					in[TransparentSurface::kGIndex],
 					in[TransparentSurface::kBIndex],






More information about the Scummvm-git-logs mailing list