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

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

Issue 761563002: First step to moving vertex attributes to the geometryProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: adding test to ignore Created 6 years 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/effects/GrBezierEffect.cpp ('k') | src/gpu/effects/GrCustomCoordsTextureEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrCustomCoordsTextureEffect.h
diff --git a/src/gpu/effects/GrCustomCoordsTextureEffect.h b/src/gpu/effects/GrCustomCoordsTextureEffect.h
index 103e20916c548b8e56799254717def7569f85254..89fc9355f6a7ab04496e64a8aff1a60d926c4109 100644
--- a/src/gpu/effects/GrCustomCoordsTextureEffect.h
+++ b/src/gpu/effects/GrCustomCoordsTextureEffect.h
@@ -21,29 +21,33 @@ class GrInvariantOutput;
*/
class GrCustomCoordsTextureEffect : public GrGeometryProcessor {
public:
- static GrGeometryProcessor* Create(GrTexture* tex, const GrTextureParams& p) {
- return SkNEW_ARGS(GrCustomCoordsTextureEffect, (tex, p));
+ static GrGeometryProcessor* Create(GrTexture* tex, const GrTextureParams& p, bool hasColor) {
+ return SkNEW_ARGS(GrCustomCoordsTextureEffect, (tex, p, hasColor));
}
virtual ~GrCustomCoordsTextureEffect() {}
static const char* Name() { return "Texture"; }
- const GrShaderVar& inTextureCoords() const { return fInTextureCoords; }
+ const GrAttribute* inPosition() const { return fInPosition; }
+ const GrAttribute* inColor() const { return fInColor; }
+ const GrAttribute* inTextureCoords() const { return fInTextureCoords; }
typedef GrGLCustomCoordsTextureEffect GLProcessor;
virtual const GrBackendGeometryProcessorFactory& getFactory() const SK_OVERRIDE;
private:
- GrCustomCoordsTextureEffect(GrTexture* texture, const GrTextureParams& params);
+ GrCustomCoordsTextureEffect(GrTexture* texture, const GrTextureParams& params, bool hasColor);
virtual bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE;
virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE;
GrTextureAccess fTextureAccess;
- const GrShaderVar& fInTextureCoords;
+ const GrAttribute* fInPosition;
+ const GrAttribute* fInColor;
+ const GrAttribute* fInTextureCoords;
GR_DECLARE_GEOMETRY_PROCESSOR_TEST;
« no previous file with comments | « src/gpu/effects/GrBezierEffect.cpp ('k') | src/gpu/effects/GrCustomCoordsTextureEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698