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

Unified Diff: include/gpu/GrGeometryProcessor.h

Issue 671023002: Added varying struct (Closed) Base URL: https://skia.googlesource.com/skia.git@gp_emit_struct
Patch Set: cleanup Created 6 years, 2 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
« no previous file with comments | « no previous file | src/gpu/GrAAConvexPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrGeometryProcessor.h
diff --git a/include/gpu/GrGeometryProcessor.h b/include/gpu/GrGeometryProcessor.h
index 60928f2f10be706fb1702dd179727a140187c925..287d7e11845b97edb2cbb96c2ac9a079b2130bca 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;
};
« no previous file with comments | « no previous file | src/gpu/GrAAConvexPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698