diff options
author | Max Horn | 2009-01-27 01:23:04 +0000 |
---|---|---|
committer | Max Horn | 2009-01-27 01:23:04 +0000 |
commit | 980970946854eee26b4576483c2dedc29e0177c8 (patch) | |
tree | 4086a57f0f43edb4e6f2948ce0ca50754d9abf6f /graphics/colormasks.h | |
parent | 153b32391faff822a657851e82b986dd6a340e12 (diff) | |
download | scummvm-rg350-980970946854eee26b4576483c2dedc29e0177c8.tar.gz scummvm-rg350-980970946854eee26b4576483c2dedc29e0177c8.tar.bz2 scummvm-rg350-980970946854eee26b4576483c2dedc29e0177c8.zip |
Speed up HQ2x/HQ3x C++ version a bit (about 20% faster with -O3 on my system)
svn-id: r36087
Diffstat (limited to 'graphics/colormasks.h')
-rw-r--r-- | graphics/colormasks.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/graphics/colormasks.h b/graphics/colormasks.h index 9330585b6b..0cd8e86050 100644 --- a/graphics/colormasks.h +++ b/graphics/colormasks.h @@ -94,7 +94,10 @@ struct ColorMasks<565> { kBlueMask = ((1 << kBlueBits) - 1) << kBlueShift, kRedBlueMask = kRedMask | kBlueMask, - kLowBits = (1 << kRedShift) | (1 << kGreenShift) | (1 << kBlueShift) + + kLowBits = (1 << kRedShift) | (1 << kGreenShift) | (1 << kBlueShift), + kLow2Bits = (3 << kRedShift) | (3 << kGreenShift) | (3 << kBlueShift), + kLow3Bits = (7 << kRedShift) | (7 << kGreenShift) | (7 << kBlueShift) }; }; @@ -125,7 +128,10 @@ struct ColorMasks<555> { kBlueMask = ((1 << kBlueBits) - 1) << kBlueShift, kRedBlueMask = kRedMask | kBlueMask, - kLowBits = (1 << kRedShift) | (1 << kGreenShift) | (1 << kBlueShift) + + kLowBits = (1 << kRedShift) | (1 << kGreenShift) | (1 << kBlueShift), + kLow2Bits = (3 << kRedShift) | (3 << kGreenShift) | (3 << kBlueShift), + kLow3Bits = (7 << kRedShift) | (7 << kGreenShift) | (7 << kBlueShift) }; }; |