diff options
author | Willem Jan Palenstijn | 2013-10-05 17:45:00 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2013-10-05 17:45:00 +0200 |
commit | 15d57c8a9cad95f63797e4b91701c9c648c45ae3 (patch) | |
tree | ccc6292695db3391be5669ac378166124ffed62a | |
parent | 227682816b7d57a56b67240f135adfdb9241d990 (diff) | |
download | scummvm-rg350-15d57c8a9cad95f63797e4b91701c9c648c45ae3.tar.gz scummvm-rg350-15d57c8a9cad95f63797e4b91701c9c648c45ae3.tar.bz2 scummvm-rg350-15d57c8a9cad95f63797e4b91701c9c648c45ae3.zip |
WINTERMUTE: Let pixel blending functions be inlined
-rw-r--r-- | engines/wintermute/graphics/transparent_surface.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/engines/wintermute/graphics/transparent_surface.cpp b/engines/wintermute/graphics/transparent_surface.cpp index 64102d7eb0..f5528b1155 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], |