aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrGeometryProcessor.h
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2014-10-24 11:26:03 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-24 11:26:03 -0700
commit74077b9941ed3f73d92ba978ef29bf3e6f630cbc (patch)
treebcbfc008e944a50b604c50b554aa939c5aa6e854 /include/gpu/GrGeometryProcessor.h
parente332396d2fabb84894c816ff3999cf1c6262fd9d (diff)
Added varying struct
Diffstat (limited to 'include/gpu/GrGeometryProcessor.h')
-rw-r--r--include/gpu/GrGeometryProcessor.h8
1 files changed, 7 insertions, 1 deletions
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<kMaxVertexAttribs, GrShaderVar, true> fVertexAttribs;
+ bool fWillUseGeoShader;
typedef GrProcessor INHERITED;
};