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

Unified Diff: src/gpu/gl/GrGLGeometryProcessor.h

Issue 827973002: ViewMatrix uniform upload moved to GeometryProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@vm-on-gp
Patch Set: feedback inc Created 6 years 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 | « src/gpu/effects/GrDistanceFieldTextureEffect.cpp ('k') | src/gpu/gl/GrGLPathRendering.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGeometryProcessor.h
diff --git a/src/gpu/gl/GrGLGeometryProcessor.h b/src/gpu/gl/GrGLGeometryProcessor.h
index a9f5ead4acf41c6f10154b5e07ae10a56c56cedc..0b24144d8459542a7192bdf24005b7c2d6171b4e 100644
--- a/src/gpu/gl/GrGLGeometryProcessor.h
+++ b/src/gpu/gl/GrGLGeometryProcessor.h
@@ -20,7 +20,7 @@ class GrGLGPBuilder;
*/
class GrGLGeometryProcessor {
public:
- GrGLGeometryProcessor() {}
+ GrGLGeometryProcessor() : fViewMatrixName(NULL) { fViewMatrix = SkMatrix::InvalidMatrix(); }
virtual ~GrGLGeometryProcessor() {}
typedef GrGLProgramDataManager::UniformHandle UniformHandle;
@@ -74,7 +74,23 @@ protected:
const GrGeometryProcessor::GrAttribute* colorAttr,
UniformHandle* colorUniform);
+ const char* uViewM() const { return fViewMatrixName; }
+
+ /** a helper function to setup the uniform handle for the uniform view matrix */
+ void addUniformViewMatrix(GrGLGPBuilder*);
+
+
+ /** a helper function to upload a uniform viewmatrix.
+ * TODO we can remove this function when we have deferred geometry in place
+ */
+ void setUniformViewMatrix(const GrGLProgramDataManager&,
+ const SkMatrix& viewMatrix);
+
private:
+ UniformHandle fViewMatrixUniform;
+ SkMatrix fViewMatrix;
+ const char* fViewMatrixName;
+
typedef GrGLProcessor INHERITED;
};
« no previous file with comments | « src/gpu/effects/GrDistanceFieldTextureEffect.cpp ('k') | src/gpu/gl/GrGLPathRendering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698