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

Unified Diff: src/gpu/GrDrawTarget.h

Issue 452823002: Separate GL path rendering state from GrGpuGL to GrGLPathRendering (Closed) Base URL: https://skia.googlesource.com/skia.git@00xx-cherrypick-pathrendering-class
Patch Set: Created 6 years, 4 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
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698