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

Side by Side Diff: include/gpu/GrTypes.h

Issue 728673002: remove unused kLCD_MaskFormat (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove associated Gr enum Created 6 years, 1 month 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
« no previous file with comments | « include/core/SkMask.h ('k') | src/core/SkAAClip.cpp » ('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 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 10
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 }; 222 };
223 static const int kPublicGrBlendCoeffCount = kLastPublicGrBlendCoeff + 1; 223 static const int kPublicGrBlendCoeffCount = kLastPublicGrBlendCoeff + 1;
224 224
225 /** 225 /**
226 * Formats for masks, used by the font cache. 226 * Formats for masks, used by the font cache.
227 * Important that these are 0-based. 227 * Important that these are 0-based.
228 */ 228 */
229 enum GrMaskFormat { 229 enum GrMaskFormat {
230 kA8_GrMaskFormat, //!< 1-byte per pixel 230 kA8_GrMaskFormat, //!< 1-byte per pixel
231 kA565_GrMaskFormat, //!< 2-bytes per pixel 231 kA565_GrMaskFormat, //!< 2-bytes per pixel
232 kA888_GrMaskFormat, //!< 4-bytes per pixel
233 kARGB_GrMaskFormat, //!< 4-bytes per pixel, color format 232 kARGB_GrMaskFormat, //!< 4-bytes per pixel, color format
234 233
235 kLast_GrMaskFormat = kARGB_GrMaskFormat 234 kLast_GrMaskFormat = kARGB_GrMaskFormat
236 }; 235 };
237 static const int kMaskFormatCount = kLast_GrMaskFormat + 1; 236 static const int kMaskFormatCount = kLast_GrMaskFormat + 1;
238 237
239 /** 238 /**
240 * Return the number of bytes-per-pixel for the specified mask format. 239 * Return the number of bytes-per-pixel for the specified mask format.
241 */ 240 */
242 static inline int GrMaskFormatBytesPerPixel(GrMaskFormat format) { 241 static inline int GrMaskFormatBytesPerPixel(GrMaskFormat format) {
243 SkASSERT((unsigned)format <= 3); 242 SkASSERT((unsigned)format <= 3);
244 // kA8 (0) -> 1 243 // kA8 (0) -> 1
245 // kA565 (1) -> 2 244 // kA565 (1) -> 2
246 // kA888 (2) -> 4
247 // kARGB (3) -> 4 245 // kARGB (3) -> 4
248 static const int sBytesPerPixel[] = { 1, 2, 4, 4 }; 246 static const int sBytesPerPixel[] = { 1, 2, 4 };
249 SK_COMPILE_ASSERT(SK_ARRAY_COUNT(sBytesPerPixel) == kMaskFormatCount, array_ size_mismatch); 247 SK_COMPILE_ASSERT(SK_ARRAY_COUNT(sBytesPerPixel) == kMaskFormatCount, array_ size_mismatch);
250 248
251 return sBytesPerPixel[(int) format]; 249 return sBytesPerPixel[(int) format];
252 } 250 }
253 251
254 /** 252 /**
255 * Pixel configurations. 253 * Pixel configurations.
256 */ 254 */
257 enum GrPixelConfig { 255 enum GrPixelConfig {
258 kUnknown_GrPixelConfig, 256 kUnknown_GrPixelConfig,
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 public: 713 public:
716 GrAutoMalloc() : INHERITED() {} 714 GrAutoMalloc() : INHERITED() {}
717 explicit GrAutoMalloc(size_t size) : INHERITED(size) {} 715 explicit GrAutoMalloc(size_t size) : INHERITED(size) {}
718 virtual ~GrAutoMalloc() {} 716 virtual ~GrAutoMalloc() {}
719 private: 717 private:
720 typedef GrAutoMallocBaseType INHERITED; 718 typedef GrAutoMallocBaseType INHERITED;
721 }; 719 };
722 720
723 #undef GrAutoMallocBaseType 721 #undef GrAutoMallocBaseType
724 #endif 722 #endif
OLDNEW
« no previous file with comments | « include/core/SkMask.h ('k') | src/core/SkAAClip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698