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

Unified Diff: include/gpu/GrGeometryProcessor.h

Issue 678953002: Default geometry processor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix dm bug 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
Index: include/gpu/GrGeometryProcessor.h
diff --git a/include/gpu/GrGeometryProcessor.h b/include/gpu/GrGeometryProcessor.h
index 287d7e11845b97edb2cbb96c2ac9a079b2130bca..12ad41f6c69a0f1f9ed5537f142c6156c96197a9 100644
--- a/include/gpu/GrGeometryProcessor.h
+++ b/include/gpu/GrGeometryProcessor.h
@@ -24,7 +24,8 @@
class GrGeometryProcessor : public GrProcessor {
public:
GrGeometryProcessor()
- : fWillUseGeoShader(false) {}
+ : fInPosition("inPosition")
+ , fWillUseGeoShader(false) {}
virtual const GrBackendGeometryProcessorFactory& getFactory() const = 0;
@@ -38,12 +39,17 @@ public:
const VertexAttribArray& getVertexAttribs() const { return fVertexAttribs; }
+ // A uniform view mat3 taken from the drawstate.
+ const char* uViewM() const { return "uViewM"; }
bsalomon 2014/10/27 13:43:43 Does any code outside of the geo processor subclas
+
+ const char* inPosition() const { return fInPosition; }
+
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()).
- A return value of true from isEqual() should not be used to test whether the prcoessors
+ A return value of true from isEqual() should not be used to test whether the processors
would generate the same shader code. To test for identical code generation use the
processors' keys computed by the GrBackendEffectFactory. */
bool isEqual(const GrGeometryProcessor& that) const {
@@ -70,6 +76,7 @@ private:
virtual bool onIsEqual(const GrGeometryProcessor&) const = 0;
SkSTArray<kMaxVertexAttribs, GrShaderVar, true> fVertexAttribs;
+ const char* fInPosition;
bool fWillUseGeoShader;
typedef GrProcessor INHERITED;
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrAAConvexPathRenderer.cpp » ('j') | src/gpu/GrAARectRenderer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698