Index: src/gpu/GrDrawTarget.h |
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h |
index d1023d2682eac2b6766c287540dcc40943ba1369..998f41282d9623c062b1efe8079c7687c2a380c0 100644 |
--- a/src/gpu/GrDrawTarget.h |
+++ b/src/gpu/GrDrawTarget.h |
@@ -12,6 +12,7 @@ |
#include "GrContext.h" |
#include "GrDrawState.h" |
#include "GrIndexBuffer.h" |
+#include "GrPathRendering.h" |
#include "GrTraceMarker.h" |
#include "SkClipStack.h" |
@@ -36,6 +37,9 @@ protected: |
public: |
SK_DECLARE_INST_COUNT(GrDrawTarget) |
+ |
+ typedef GrPathRendering::PathTransformType PathTransformType ; |
+ |
/////////////////////////////////////////////////////////////////////////// |
// The context may not be fully constructed and should not be used during GrDrawTarget |
@@ -333,38 +337,11 @@ public: |
PathTransformSize(transformsType) * count elements |
* @param fill Fill type for drawing all the paths |
*/ |
- enum PathTransformType { |
- kNone_PathTransformType, //!< [] |
- kTranslateX_PathTransformType, //!< [kMTransX] |
- kTranslateY_PathTransformType, //!< [kMTransY] |
- kTranslate_PathTransformType, //!< [kMTransX, kMTransY] |
- kAffine_PathTransformType, //!< [kMScaleX, kMSkewX, kMTransX, kMSkewY, kMScaleY, kMTransY] |
- |
- kLast_PathTransformType = kAffine_PathTransformType |
- }; |
void drawPaths(const GrPathRange* pathRange, |
const uint32_t indices[], int count, |
const float transforms[], PathTransformType transformsType, |
SkPath::FillType fill); |
- static inline int PathTransformSize(PathTransformType type) { |
- switch (type) { |
- case kNone_PathTransformType: |
- return 0; |
- case kTranslateX_PathTransformType: |
- case kTranslateY_PathTransformType: |
- return 1; |
- case kTranslate_PathTransformType: |
- return 2; |
- case kAffine_PathTransformType: |
- return 6; |
- |
- default: |
- SkFAIL("Unknown path transform type"); |
- return 0; |
- } |
- } |
- |
/** |
* Helper function for drawing rects. It performs a geometry src push and pop |
* and thus will finalize any reserved geometry. |