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

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

Issue 926593005: Use SkXfermode as public facing enum for GrPorterDuffXP (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Review fixes Created 5 years, 10 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
« no previous file with comments | « include/gpu/GrPaint.h ('k') | include/gpu/GrXferProcessor.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 * 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 #ifndef GrTypes_DEFINED 9 #ifndef GrTypes_DEFINED
10 #define GrTypes_DEFINED 10 #define GrTypes_DEFINED
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 return kLines_GrPrimitiveType == type || kLineStrip_GrPrimitiveType == type; 149 return kLines_GrPrimitiveType == type || kLineStrip_GrPrimitiveType == type;
150 } 150 }
151 151
152 static inline bool GrIsPrimTypeTris(GrPrimitiveType type) { 152 static inline bool GrIsPrimTypeTris(GrPrimitiveType type) {
153 return kTriangles_GrPrimitiveType == type || 153 return kTriangles_GrPrimitiveType == type ||
154 kTriangleStrip_GrPrimitiveType == type || 154 kTriangleStrip_GrPrimitiveType == type ||
155 kTriangleFan_GrPrimitiveType == type; 155 kTriangleFan_GrPrimitiveType == type;
156 } 156 }
157 157
158 /** 158 /**
159 * Coeffecients for alpha-blending.
160 */
161 enum GrBlendCoeff {
162 kInvalid_GrBlendCoeff = -1,
163
164 kZero_GrBlendCoeff, //<! 0
165 kOne_GrBlendCoeff, //<! 1
166 kSC_GrBlendCoeff, //<! src color
167 kISC_GrBlendCoeff, //<! one minus src color
168 kDC_GrBlendCoeff, //<! dst color
169 kIDC_GrBlendCoeff, //<! one minus dst color
170 kSA_GrBlendCoeff, //<! src alpha
171 kISA_GrBlendCoeff, //<! one minus src alpha
172 kDA_GrBlendCoeff, //<! dst alpha
173 kIDA_GrBlendCoeff, //<! one minus dst alpha
174 kConstC_GrBlendCoeff, //<! constant color
175 kIConstC_GrBlendCoeff, //<! one minus constant color
176 kConstA_GrBlendCoeff, //<! constant color alpha
177 kIConstA_GrBlendCoeff, //<! one minus constant color alpha
178
179 kFirstPublicGrBlendCoeff = kZero_GrBlendCoeff,
180 kLastPublicGrBlendCoeff = kIConstA_GrBlendCoeff,
181 };
182 static const int kPublicGrBlendCoeffCount = kLastPublicGrBlendCoeff + 1;
183
184 /**
185 * Formats for masks, used by the font cache. 159 * Formats for masks, used by the font cache.
186 * Important that these are 0-based. 160 * Important that these are 0-based.
187 */ 161 */
188 enum GrMaskFormat { 162 enum GrMaskFormat {
189 kA8_GrMaskFormat, //!< 1-byte per pixel 163 kA8_GrMaskFormat, //!< 1-byte per pixel
190 kA565_GrMaskFormat, //!< 2-bytes per pixel, RGB represent 3-channel LCD cov erage 164 kA565_GrMaskFormat, //!< 2-bytes per pixel, RGB represent 3-channel LCD cov erage
191 kARGB_GrMaskFormat, //!< 4-bytes per pixel, color format 165 kARGB_GrMaskFormat, //!< 4-bytes per pixel, color format
192 166
193 kLast_GrMaskFormat = kARGB_GrMaskFormat 167 kLast_GrMaskFormat = kARGB_GrMaskFormat
194 }; 168 };
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 public: 629 public:
656 GrAutoMalloc() : INHERITED() {} 630 GrAutoMalloc() : INHERITED() {}
657 explicit GrAutoMalloc(size_t size) : INHERITED(size) {} 631 explicit GrAutoMalloc(size_t size) : INHERITED(size) {}
658 virtual ~GrAutoMalloc() {} 632 virtual ~GrAutoMalloc() {}
659 private: 633 private:
660 typedef GrAutoMallocBaseType INHERITED; 634 typedef GrAutoMallocBaseType INHERITED;
661 }; 635 };
662 636
663 #undef GrAutoMallocBaseType 637 #undef GrAutoMallocBaseType
664 #endif 638 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrPaint.h ('k') | include/gpu/GrXferProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698