OLD | NEW |
---|---|
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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
237 kConstA_GrBlendCoeff, //<! constant color alpha | 237 kConstA_GrBlendCoeff, //<! constant color alpha |
238 kIConstA_GrBlendCoeff, //<! one minus constant color alpha | 238 kIConstA_GrBlendCoeff, //<! one minus constant color alpha |
239 | 239 |
240 kPublicGrBlendCoeffCount | 240 kPublicGrBlendCoeffCount |
241 }; | 241 }; |
242 | 242 |
243 /** | 243 /** |
244 * Formats for masks, used by the font cache. | 244 * Formats for masks, used by the font cache. |
245 * Important that these are 0-based. | 245 * Important that these are 0-based. |
246 */ | 246 */ |
247 enum GrMaskFormat { | 247 enum GrMaskFormat { |
bsalomon
2013/09/25 16:51:39
Not for this CL, but just wondering if we really n
jvanverth1
2013/09/25 16:57:07
Yup, the next CL will pull use of that out of the
| |
248 kA8_GrMaskFormat, //!< 1-byte per pixel | 248 kA8_GrMaskFormat, //!< 1-byte per pixel |
249 kA565_GrMaskFormat, //!< 2-bytes per pixel | 249 kA565_GrMaskFormat, //!< 2-bytes per pixel |
250 kA888_GrMaskFormat, //!< 4-bytes per pixel | 250 kA888_GrMaskFormat, //!< 4-bytes per pixel |
251 | 251 |
252 kCount_GrMaskFormats //!< used to allocate arrays sized for mask formats | 252 kLast_GrMaskFormat = kA888_GrMaskFormat |
253 }; | 253 }; |
254 static const int kMaskFormatCount = kLast_GrMaskFormat + 1; | |
254 | 255 |
255 /** | 256 /** |
256 * Return the number of bytes-per-pixel for the specified mask format. | 257 * Return the number of bytes-per-pixel for the specified mask format. |
257 */ | 258 */ |
258 static inline int GrMaskFormatBytesPerPixel(GrMaskFormat format) { | 259 static inline int GrMaskFormatBytesPerPixel(GrMaskFormat format) { |
259 SkASSERT((unsigned)format <= 2); | 260 SkASSERT((unsigned)format <= 2); |
260 // kA8 (0) -> 1 | 261 // kA8 (0) -> 1 |
261 // kA565 (1) -> 2 | 262 // kA565 (1) -> 2 |
262 // kA888 (2) -> 4 | 263 // kA888 (2) -> 4 |
263 return 1 << (int)format; | 264 return 1 << (int)format; |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
621 }; | 622 }; |
622 | 623 |
623 /** | 624 /** |
624 * This value translates to reseting all the context state for any backend. | 625 * This value translates to reseting all the context state for any backend. |
625 */ | 626 */ |
626 static const uint32_t kAll_GrBackendState = 0xffffffff; | 627 static const uint32_t kAll_GrBackendState = 0xffffffff; |
627 | 628 |
628 /////////////////////////////////////////////////////////////////////////////// | 629 /////////////////////////////////////////////////////////////////////////////// |
629 | 630 |
630 #endif | 631 #endif |
OLD | NEW |