diff options
author | 2012-02-13 21:37:57 +0000 | |
---|---|---|
committer | 2012-02-13 21:37:57 +0000 | |
commit | 813d38b7a07957f2990ccca52ddab55fe0b1c632 (patch) | |
tree | 1e068b9e27e6f24d91d74331a00669001fab52a1 /include/core/SkScalerContext.h | |
parent | d6e2c7cf08df73503b81cf901de3a3b2b278c2c5 (diff) |
if SK_USE_COLOR_LUMINANCE is defined, then we store 2 bits of each component
to create a per-component-luminance value for the fonthost to use. Only supported
on Mac at the moment (but still disabled by default)
git-svn-id: http://skia.googlecode.com/svn/trunk@3180 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkScalerContext.h')
-rw-r--r-- | include/core/SkScalerContext.h | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/include/core/SkScalerContext.h b/include/core/SkScalerContext.h index 7a83bd79ad..43baedf799 100644 --- a/include/core/SkScalerContext.h +++ b/include/core/SkScalerContext.h @@ -17,7 +17,6 @@ #include "SkPoint.h" //#define SK_USE_COLOR_LUMINANCE -//#define USE_FULL_LUMI class SkDescriptor; class SkMaskFilter; @@ -236,34 +235,12 @@ public: } #ifdef SK_USE_COLOR_LUMINANCE - static unsigned ColorToLumBits(U8CPU x) { - SkASSERT(x <= 0xFF); - return x >> 7; - } - static U8CPU LumBitsToColor(unsigned x) { - SkASSERT(x <= 1); - return x * 0xFF; - } - SkColor getLuminanceColor() const { -#ifdef USE_FULL_LUMI return fLumBits; -#else - unsigned bits = fLumBits; - return SkColorSetRGB(LumBitsToColor((bits >> 2) & 1), - LumBitsToColor((bits >> 1) & 1), - LumBitsToColor((bits >> 0) & 1)); -#endif } void setLuminanceColor(SkColor c) { -#ifdef USE_FULL_LUMI fLumBits = c; -#else - fLumBits = (ColorToLumBits(SkColorGetR(c)) << 2) | - (ColorToLumBits(SkColorGetG(c)) << 1) | - (ColorToLumBits(SkColorGetB(c)) << 0); -#endif } #else unsigned getLuminanceBits() const { |