diff options
author | joshualitt <joshualitt@chromium.org> | 2014-10-24 07:56:04 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-24 07:56:04 -0700 |
commit | 852ae80b9c3c6fd53f993ac35133d80863993cbe (patch) | |
tree | 59aa7b7fd0d319b3fcc15cc2fa291689b2a68bb3 /include/gpu | |
parent | 8dae0f364b04da1584554f94fc30b3263dae5c3a (diff) |
Added varying struct
TBR=
BUG=skia:
Review URL: https://codereview.chromium.org/671023002
Diffstat (limited to 'include/gpu')
-rw-r--r-- | include/gpu/GrGeometryProcessor.h | 8 |
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; }; |