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

Unified Diff: src/gpu/effects/GrBezierEffect.h

Issue 543623004: Removing vertex attrib indices (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: warning fixed Created 6 years, 3 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 | « src/gpu/GrRODrawState.cpp ('k') | src/gpu/effects/GrBezierEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrBezierEffect.h
diff --git a/src/gpu/effects/GrBezierEffect.h b/src/gpu/effects/GrBezierEffect.h
index b8d8f7b2e4d25f84fb6a9da46b0bfaa3c10027c2..4da16fe88b3dc9474990256133ab24b5b606c923 100644
--- a/src/gpu/effects/GrBezierEffect.h
+++ b/src/gpu/effects/GrBezierEffect.h
@@ -10,7 +10,7 @@
#include "GrDrawTargetCaps.h"
#include "GrEffect.h"
-#include "GrVertexEffect.h"
+#include "GrGeometryProcessor.h"
#include "GrTypesPriv.h"
/**
@@ -55,7 +55,7 @@
*/
class GrGLConicEffect;
-class GrConicEffect : public GrVertexEffect {
+class GrConicEffect : public GrGeometryProcessor {
public:
static GrEffect* Create(const GrEffectEdgeType edgeType, const GrDrawTargetCaps& caps) {
GR_CREATE_STATIC_EFFECT(gConicFillAA, GrConicEffect, (kFillAA_GrEffectEdgeType));
@@ -86,6 +86,7 @@ public:
static const char* Name() { return "Conic"; }
+ inline const GrShaderVar& inConicCoeffs() const { return fInConicCoeffs; }
inline bool isAntiAliased() const { return GrEffectEdgeTypeIsAA(fEdgeType); }
inline bool isFilled() const { return GrEffectEdgeTypeIsFill(fEdgeType); }
inline GrEffectEdgeType getEdgeType() const { return fEdgeType; }
@@ -104,11 +105,12 @@ private:
virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE;
- GrEffectEdgeType fEdgeType;
+ GrEffectEdgeType fEdgeType;
+ const GrShaderVar& fInConicCoeffs;
GR_DECLARE_EFFECT_TEST;
- typedef GrVertexEffect INHERITED;
+ typedef GrGeometryProcessor INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
@@ -122,7 +124,7 @@ private:
*/
class GrGLQuadEffect;
-class GrQuadEffect : public GrVertexEffect {
+class GrQuadEffect : public GrGeometryProcessor {
public:
static GrEffect* Create(const GrEffectEdgeType edgeType, const GrDrawTargetCaps& caps) {
GR_CREATE_STATIC_EFFECT(gQuadFillAA, GrQuadEffect, (kFillAA_GrEffectEdgeType));
@@ -153,6 +155,7 @@ public:
static const char* Name() { return "Quad"; }
+ inline const GrShaderVar& inHairQuadEdge() const { return fInHairQuadEdge; }
inline bool isAntiAliased() const { return GrEffectEdgeTypeIsAA(fEdgeType); }
inline bool isFilled() const { return GrEffectEdgeTypeIsFill(fEdgeType); }
inline GrEffectEdgeType getEdgeType() const { return fEdgeType; }
@@ -171,11 +174,12 @@ private:
virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE;
- GrEffectEdgeType fEdgeType;
+ GrEffectEdgeType fEdgeType;
+ const GrShaderVar& fInHairQuadEdge;
GR_DECLARE_EFFECT_TEST;
- typedef GrVertexEffect INHERITED;
+ typedef GrGeometryProcessor INHERITED;
};
//////////////////////////////////////////////////////////////////////////////
@@ -191,7 +195,7 @@ private:
*/
class GrGLCubicEffect;
-class GrCubicEffect : public GrVertexEffect {
+class GrCubicEffect : public GrGeometryProcessor {
public:
static GrEffect* Create(const GrEffectEdgeType edgeType, const GrDrawTargetCaps& caps) {
GR_CREATE_STATIC_EFFECT(gCubicFillAA, GrCubicEffect, (kFillAA_GrEffectEdgeType));
@@ -222,6 +226,7 @@ public:
static const char* Name() { return "Cubic"; }
+ inline const GrShaderVar& inCubicCoeffs() const { return fInCubicCoeffs; }
inline bool isAntiAliased() const { return GrEffectEdgeTypeIsAA(fEdgeType); }
inline bool isFilled() const { return GrEffectEdgeTypeIsFill(fEdgeType); }
inline GrEffectEdgeType getEdgeType() const { return fEdgeType; }
@@ -240,11 +245,12 @@ private:
virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE;
- GrEffectEdgeType fEdgeType;
+ GrEffectEdgeType fEdgeType;
+ const GrShaderVar& fInCubicCoeffs;
GR_DECLARE_EFFECT_TEST;
- typedef GrVertexEffect INHERITED;
+ typedef GrGeometryProcessor INHERITED;
};
#endif
« no previous file with comments | « src/gpu/GrRODrawState.cpp ('k') | src/gpu/effects/GrBezierEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698