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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: include/gpu/GrTypes.h
diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h
index 425c136fa6013f5c8d444c87faa4bd3b0e62b132..b4a08eb9f265b7aec7ef78b77e960ff8ffc80371 100644
--- a/include/gpu/GrTypes.h
+++ b/include/gpu/GrTypes.h
@@ -202,6 +202,37 @@ static inline bool GrIsPrimTypeTris(GrPrimitiveType type) {
}
/**
+* Transform formats used for paths.
+*/
+enum GrTransformFormat {
+ kNone_GrTransformFormat, //!< []
+ kTranslateX_GrTransformFormat, //!< [kMTransX]
+ kTranslateY_GrTransformFormat, //!< [kMTransY]
+ kTranslate_GrTransformFormat, //!< [kMTransX, kMTransY]
+ kAffine_GrTransformFormat, //!< [kMScaleX, kMSkewX, kMTransX, kMSkewY, kMScaleY, kMTransY]
+
+ kLast_GrTransformFormat = kAffine_GrTransformFormat
+};
+
+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
+ switch (format) {
+ case kNone_GrTransformFormat:
+ return 0;
+ case kTranslateX_GrTransformFormat:
+ case kTranslateY_GrTransformFormat:
+ return 1;
+ case kTranslate_GrTransformFormat:
+ return 2;
+ case kAffine_GrTransformFormat:
+ return 6;
+
+ default:
+ SkFAIL("Unknown transform format");
+ return 0;
+ }
+}
+
+/**
* Coeffecients for alpha-blending.
*/
enum GrBlendCoeff {
« 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