From 74077b9941ed3f73d92ba978ef29bf3e6f630cbc Mon Sep 17 00:00:00 2001 From: joshualitt Date: Fri, 24 Oct 2014 11:26:03 -0700 Subject: Added varying struct TBR= BUG=skia: Committed: https://skia.googlesource.com/skia/+/852ae80b9c3c6fd53f993ac35133d80863993cbe Review URL: https://codereview.chromium.org/671023002 --- include/gpu/GrGeometryProcessor.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include/gpu/GrGeometryProcessor.h') diff --git a/include/gpu/GrGeometryProcessor.h b/include/gpu/GrGeometryProcessor.h index 60928f2f10..287d7e1184 100644 --- a/include/gpu/GrGeometryProcessor.h +++ b/include/gpu/GrGeometryProcessor.h @@ -23,7 +23,8 @@ */ class GrGeometryProcessor : public GrProcessor { public: - GrGeometryProcessor() {} + GrGeometryProcessor() + : fWillUseGeoShader(false) {} virtual const GrBackendGeometryProcessorFactory& getFactory() const = 0; @@ -37,6 +38,8 @@ public: const VertexAttribArray& getVertexAttribs() const { return fVertexAttribs; } + bool willUseGeoShader() const { return fWillUseGeoShader; } + /** Returns true if this and other processor conservatively draw identically. It can only return true when the two prcoessors are of the same subclass (i.e. they return the same object from from getFactory()). @@ -61,10 +64,13 @@ protected: return fVertexAttribs.push_back(var); } + void setWillUseGeoShader() { fWillUseGeoShader = true; } + private: virtual bool onIsEqual(const GrGeometryProcessor&) const = 0; SkSTArray fVertexAttribs; + bool fWillUseGeoShader; typedef GrProcessor INHERITED; }; -- cgit v1.2.3