diff options
author | 2011-11-21 19:46:00 +0000 | |
---|---|---|
committer | 2011-11-21 19:46:00 +0000 | |
commit | f788feb3f12d08cf945eab65920c491fc435004d (patch) | |
tree | 76e020a7ee50907b36c2d7b5fcf893cee98e784b /include/core/SkScalerContext.h | |
parent | b6bb5cb7c2573a9829a0d3aa7b16a55830a7e816 (diff) |
use a define for the shift amount for the hinting bits
git-svn-id: http://skia.googlecode.com/svn/trunk@2726 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkScalerContext.h')
-rw-r--r-- | include/core/SkScalerContext.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/core/SkScalerContext.h b/include/core/SkScalerContext.h index 04dd847ff1..9b3264087b 100644 --- a/include/core/SkScalerContext.h +++ b/include/core/SkScalerContext.h @@ -177,7 +177,8 @@ public: }; private: enum { - kHintingMask = kHintingBit1_Flag | kHintingBit2_Flag + kHintingMask = kHintingBit1_Flag | kHintingBit2_Flag, + kHintingShift = 7 }; public: struct Rec { @@ -199,11 +200,12 @@ public: void getSingleMatrix(SkMatrix*) const; SkPaint::Hinting getHinting() const { - return static_cast<SkPaint::Hinting>((fFlags & kHintingMask) >> 4); + unsigned hint = (fFlags & kHintingMask) >> kHintingShift; + return static_cast<SkPaint::Hinting>(hint); } void setHinting(SkPaint::Hinting hinting) { - fFlags = (fFlags & ~kHintingMask) | (hinting << 4); + fFlags = (fFlags & ~kHintingMask) | (hinting << kHintingShift); } SkMask::Format getFormat() const { |