diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-16 12:58:02 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-16 12:58:02 +0000 |
commit | 85faf50875fcf6008880a98aaa05d12ae8dad343 (patch) | |
tree | 13c16498ac9084aa5da8339b8ff05146c22c6fac /include/core | |
parent | 001f4ed2fb62ecdc98ce2884d925de11b7516d23 (diff) |
remove legacy filter-flags, and store FilterLevel directly
BUG=skia:
R=robertphillips@google.com, humper@google.com, jvanverth@google.com, mtklein@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/239393002
git-svn-id: http://skia.googlecode.com/svn/trunk@14217 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkPaint.h | 13 | ||||
-rw-r--r-- | include/core/SkPicture.h | 3 |
2 files changed, 5 insertions, 11 deletions
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h index 7a647f0ea2..95fc0b87ad 100644 --- a/include/core/SkPaint.h +++ b/include/core/SkPaint.h @@ -52,14 +52,6 @@ typedef const SkGlyph& (*SkMeasureCacheProc)(SkGlyphCache*, const char**); */ class SK_API SkPaint { - enum { - // DEPRECATED -- use setFilterLevel instead - kFilterBitmap_Flag = 0x02, // temporary flag - // DEPRECATED -- use setFilterLevel instead - kHighQualityFilterBitmap_Flag = 0x4000, // temporary flag - // DEPRECATED -- use setFilterLevel instead - kHighQualityDownsampleBitmap_Flag = 0x8000, // temporary flag - }; public: SkPaint(); SkPaint(const SkPaint& paint); @@ -310,7 +302,7 @@ public: * Return the filter level. This affects the quality (and performance) of * drawing scaled images. */ - FilterLevel getFilterLevel() const; + FilterLevel getFilterLevel() const { return (FilterLevel)fFilterLevel; } /** * Set the filter level. This affects the quality (and performance) of @@ -1072,7 +1064,8 @@ private: unsigned fStyle : 2; unsigned fTextEncoding : 2; // 3 values unsigned fHinting : 2; - //unsigned fFreeBits : 4; + unsigned fFilterLevel : 2; + //unsigned fFreeBits : 2; }; uint32_t fBitfields; }; diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h index 8d3061cd08..9690469d9f 100644 --- a/include/core/SkPicture.h +++ b/include/core/SkPicture.h @@ -309,13 +309,14 @@ protected: // V20: added bool to SkPictureImageFilter's serialization (to allow SkPicture serialization) // V21: add pushCull, popCull // V22: SK_PICT_FACTORY_TAG's size is now the chunk size in bytes + // V23: SkPaint::FilterLevel became a real enum // Note: If the picture version needs to be increased then please follow the // steps to generate new SKPs in (only accessible to Googlers): http://goo.gl/qATVcw // Only SKPs within the min/current picture version range (inclusive) can be read. static const uint32_t MIN_PICTURE_VERSION = 19; - static const uint32_t CURRENT_PICTURE_VERSION = 22; + static const uint32_t CURRENT_PICTURE_VERSION = 23; mutable uint32_t fUniqueID; |