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

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

Issue 543623004: Removing vertex attrib indices (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: test 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
Index: src/gpu/effects/GrCustomCoordsTextureEffect.h
diff --git a/src/gpu/effects/GrCustomCoordsTextureEffect.h b/src/gpu/effects/GrCustomCoordsTextureEffect.h
index 95e0fbba1478457d9ffe1da9d85a5f3e93f2ef4c..1abf0c1d625baaa6f4864aead677e275bf9e4843 100644
--- a/src/gpu/effects/GrCustomCoordsTextureEffect.h
+++ b/src/gpu/effects/GrCustomCoordsTextureEffect.h
@@ -9,7 +9,7 @@
#define GrCustomCoordsTextureEffect_DEFINED
#include "GrEffect.h"
-#include "GrVertexEffect.h"
+#include "GrGeometryProcessor.h"
class GrGLCustomCoordsTextureEffect;
@@ -18,7 +18,7 @@ class GrGLCustomCoordsTextureEffect;
* It allows explicit specification of the filtering and wrap modes (GrTextureParams). The input
* coords are a custom attribute.
*/
-class GrCustomCoordsTextureEffect : public GrVertexEffect {
+class GrCustomCoordsTextureEffect : public GrGeometryProcessor {
public:
static GrEffect* Create(GrTexture* tex, const GrTextureParams& p) {
return SkNEW_ARGS(GrCustomCoordsTextureEffect, (tex, p));
@@ -30,6 +30,8 @@ public:
virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags) const SK_OVERRIDE;
+ const GrShaderVar& aTextureCoords() const { return fAttrTextureCoords; }
+
typedef GrGLCustomCoordsTextureEffect GLEffect;
virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE;
@@ -39,11 +41,12 @@ private:
virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE;
- GrTextureAccess fTextureAccess;
+ GrTextureAccess fTextureAccess;
+ const GrShaderVar& fAttrTextureCoords;
GR_DECLARE_EFFECT_TEST;
- typedef GrVertexEffect INHERITED;
+ typedef GrGeometryProcessor INHERITED;
};
#endif

Powered by Google App Engine
This is Rietveld 408576698