Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Side by Side Diff: include/core/SkPaint.h

Issue 239393002: remove legacy filter-flags, and store FilterLevel directly (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: use DEF_TEST Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | include/core/SkPicture.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 2
3 /* 3 /*
4 * Copyright 2006 The Android Open Source Project 4 * Copyright 2006 The Android Open Source Project
5 * 5 *
6 * Use of this source code is governed by a BSD-style license that can be 6 * Use of this source code is governed by a BSD-style license that can be
7 * found in the LICENSE file. 7 * found in the LICENSE file.
8 */ 8 */
9 9
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 #define kBicubicFilterBitmap_Flag kHighQualityFilterBitmap_Flag 46 #define kBicubicFilterBitmap_Flag kHighQualityFilterBitmap_Flag
47 47
48 /** \class SkPaint 48 /** \class SkPaint
49 49
50 The SkPaint class holds the style and color information about how to draw 50 The SkPaint class holds the style and color information about how to draw
51 geometries, text and bitmaps. 51 geometries, text and bitmaps.
52 */ 52 */
53 53
54 class SK_API SkPaint { 54 class SK_API SkPaint {
55 enum {
56 // DEPRECATED -- use setFilterLevel instead
57 kFilterBitmap_Flag = 0x02, // temporary flag
58 // DEPRECATED -- use setFilterLevel instead
59 kHighQualityFilterBitmap_Flag = 0x4000, // temporary flag
60 // DEPRECATED -- use setFilterLevel instead
61 kHighQualityDownsampleBitmap_Flag = 0x8000, // temporary flag
62 };
63 public: 55 public:
64 SkPaint(); 56 SkPaint();
65 SkPaint(const SkPaint& paint); 57 SkPaint(const SkPaint& paint);
66 ~SkPaint(); 58 ~SkPaint();
67 59
68 SkPaint& operator=(const SkPaint&); 60 SkPaint& operator=(const SkPaint&);
69 61
70 SK_API friend bool operator==(const SkPaint& a, const SkPaint& b); 62 SK_API friend bool operator==(const SkPaint& a, const SkPaint& b);
71 friend bool operator!=(const SkPaint& a, const SkPaint& b) { 63 friend bool operator!=(const SkPaint& a, const SkPaint& b) {
72 return !(a == b); 64 return !(a == b);
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 kNone_FilterLevel, 295 kNone_FilterLevel,
304 kLow_FilterLevel, 296 kLow_FilterLevel,
305 kMedium_FilterLevel, 297 kMedium_FilterLevel,
306 kHigh_FilterLevel 298 kHigh_FilterLevel
307 }; 299 };
308 300
309 /** 301 /**
310 * Return the filter level. This affects the quality (and performance) of 302 * Return the filter level. This affects the quality (and performance) of
311 * drawing scaled images. 303 * drawing scaled images.
312 */ 304 */
313 FilterLevel getFilterLevel() const; 305 FilterLevel getFilterLevel() const { return (FilterLevel)fFilterLevel; }
314 306
315 /** 307 /**
316 * Set the filter level. This affects the quality (and performance) of 308 * Set the filter level. This affects the quality (and performance) of
317 * drawing scaled images. 309 * drawing scaled images.
318 */ 310 */
319 void setFilterLevel(FilterLevel); 311 void setFilterLevel(FilterLevel);
320 312
321 /** 313 /**
322 * If the predicate is true, set the filterLevel to Low, else set it to 314 * If the predicate is true, set the filterLevel to Low, else set it to
323 * None. 315 * None.
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 union { 1057 union {
1066 struct { 1058 struct {
1067 // all of these bitfields should add up to 32 1059 // all of these bitfields should add up to 32
1068 unsigned fFlags : 16; 1060 unsigned fFlags : 16;
1069 unsigned fTextAlign : 2; 1061 unsigned fTextAlign : 2;
1070 unsigned fCapType : 2; 1062 unsigned fCapType : 2;
1071 unsigned fJoinType : 2; 1063 unsigned fJoinType : 2;
1072 unsigned fStyle : 2; 1064 unsigned fStyle : 2;
1073 unsigned fTextEncoding : 2; // 3 values 1065 unsigned fTextEncoding : 2; // 3 values
1074 unsigned fHinting : 2; 1066 unsigned fHinting : 2;
1075 //unsigned fFreeBits : 4; 1067 unsigned fFilterLevel : 2;
1068 //unsigned fFreeBits : 2;
1076 }; 1069 };
1077 uint32_t fBitfields; 1070 uint32_t fBitfields;
1078 }; 1071 };
1079 uint32_t fDirtyBits; 1072 uint32_t fDirtyBits;
1080 1073
1081 uint32_t getBitfields() const { return fBitfields; } 1074 uint32_t getBitfields() const { return fBitfields; }
1082 void setBitfields(uint32_t bitfields); 1075 void setBitfields(uint32_t bitfields);
1083 1076
1084 SkDrawCacheProc getDrawCacheProc() const; 1077 SkDrawCacheProc getDrawCacheProc() const;
1085 SkMeasureCacheProc getMeasureCacheProc(TextBufferDirection dir, 1078 SkMeasureCacheProc getMeasureCacheProc(TextBufferDirection dir,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 #ifdef SK_BUILD_FOR_ANDROID 1143 #ifdef SK_BUILD_FOR_ANDROID
1151 SkPaintOptionsAndroid fPaintOptionsAndroid; 1144 SkPaintOptionsAndroid fPaintOptionsAndroid;
1152 1145
1153 // In order for the == operator to work properly this must be the last field 1146 // In order for the == operator to work properly this must be the last field
1154 // in the struct so that we can do a memcmp to this field's offset. 1147 // in the struct so that we can do a memcmp to this field's offset.
1155 uint32_t fGenerationID; 1148 uint32_t fGenerationID;
1156 #endif 1149 #endif
1157 }; 1150 };
1158 1151
1159 #endif 1152 #endif
OLDNEW
« no previous file with comments | « no previous file | include/core/SkPicture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698