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

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

Issue 400713003: Add a GrPathRange class (Closed) Base URL: https://skia.googlesource.com/skia.git@clupload-ispath
Patch Set: Created 6 years, 5 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
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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 return kLines_GrPrimitiveType == type || kLineStrip_GrPrimitiveType == type; 195 return kLines_GrPrimitiveType == type || kLineStrip_GrPrimitiveType == type;
196 } 196 }
197 197
198 static inline bool GrIsPrimTypeTris(GrPrimitiveType type) { 198 static inline bool GrIsPrimTypeTris(GrPrimitiveType type) {
199 return kTriangles_GrPrimitiveType == type || 199 return kTriangles_GrPrimitiveType == type ||
200 kTriangleStrip_GrPrimitiveType == type || 200 kTriangleStrip_GrPrimitiveType == type ||
201 kTriangleFan_GrPrimitiveType == type; 201 kTriangleFan_GrPrimitiveType == type;
202 } 202 }
203 203
204 /** 204 /**
205 * Transform formats used for paths.
206 */
207 enum GrTransformFormat {
208 kNone_GrTransformFormat, //!< []
209 kTranslateX_GrTransformFormat, //!< [kMTransX]
210 kTranslateY_GrTransformFormat, //!< [kMTransY]
211 kTranslate_GrTransformFormat, //!< [kMTransX, kMTransY]
212 kAffine_GrTransformFormat, //!< [kMScaleX, kMSkewX, kMTransX, kMSkewY, kMScaleY, kMTransY]
213
214 kLast_GrTransformFormat = kAffine_GrTransformFormat
215 };
216
217 static inline int GrTransformSize(GrTransformFormat format) {
bsalomon 2014/07/17 17:27:28 Can we call it Type rather than Format? Also, may
Chris Dalton 2014/07/17 18:15:19 My motivation for calling it Format was because it
218 switch (format) {
219 case kNone_GrTransformFormat:
220 return 0;
221 case kTranslateX_GrTransformFormat:
222 case kTranslateY_GrTransformFormat:
223 return 1;
224 case kTranslate_GrTransformFormat:
225 return 2;
226 case kAffine_GrTransformFormat:
227 return 6;
228
229 default:
230 SkFAIL("Unknown transform format");
231 return 0;
232 }
233 }
234
235 /**
205 * Coeffecients for alpha-blending. 236 * Coeffecients for alpha-blending.
206 */ 237 */
207 enum GrBlendCoeff { 238 enum GrBlendCoeff {
208 kInvalid_GrBlendCoeff = -1, 239 kInvalid_GrBlendCoeff = -1,
209 240
210 kZero_GrBlendCoeff, //<! 0 241 kZero_GrBlendCoeff, //<! 0
211 kOne_GrBlendCoeff, //<! 1 242 kOne_GrBlendCoeff, //<! 1
212 kSC_GrBlendCoeff, //<! src color 243 kSC_GrBlendCoeff, //<! src color
213 kISC_GrBlendCoeff, //<! one minus src color 244 kISC_GrBlendCoeff, //<! one minus src color
214 kDC_GrBlendCoeff, //<! dst color 245 kDC_GrBlendCoeff, //<! dst color
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 } 695 }
665 696
666 /** 697 /**
667 * This value translates to reseting all the context state for any backend. 698 * This value translates to reseting all the context state for any backend.
668 */ 699 */
669 static const uint32_t kAll_GrBackendState = 0xffffffff; 700 static const uint32_t kAll_GrBackendState = 0xffffffff;
670 701
671 /////////////////////////////////////////////////////////////////////////////// 702 ///////////////////////////////////////////////////////////////////////////////
672 703
673 #endif 704 #endif
OLDNEW
« no previous file with comments | « include/core/SkStrokeRec.h ('k') | src/gpu/GrDrawTarget.h » ('j') | src/gpu/GrDrawTarget.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698