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

Unified Diff: src/gpu/GrPathProcessor.cpp

Issue 1961093002: Break apart shared use of varying and uniform transforms (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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/glsl/GrGLSLGeometryProcessor.h » ('j') | src/gpu/glsl/GrGLSLGeometryProcessor.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPathProcessor.cpp
diff --git a/src/gpu/GrPathProcessor.cpp b/src/gpu/GrPathProcessor.cpp
index f01b240d8ab5376cd426e05119f6f67dafce4611..5237ba1cfd43594a2194b5ce4852c77c75314c50 100644
--- a/src/gpu/GrPathProcessor.cpp
+++ b/src/gpu/GrPathProcessor.cpp
@@ -97,7 +97,7 @@ public:
int index,
const SkTArray<const GrCoordTransform*, true>& coordTransforms) override {
const GrPathProcessor& pathProc = primProc.cast<GrPathProcessor>();
- SkSTArray<2, Transform, true>& transforms = fInstalledTransforms[index];
+ SkSTArray<2, VaryingTransform, true>& transforms = fInstalledTransforms[index];
int numTransforms = transforms.count();
for (int t = 0; t < numTransforms; ++t) {
SkASSERT(transforms[t].fHandle.isValid());
@@ -116,6 +116,14 @@ public:
}
private:
+ typedef GrGLSLProgramDataManager::VaryingHandle VaryingHandle;
robertphillips 2016/05/09 16:51:28 init fHandle here ?
egdaniel 2016/05/09 16:59:05 The default ctor of a ResourceHandle sets the hand
+ struct VaryingTransform : public Transform {
+ VaryingTransform() : Transform() {}
+ VaryingHandle fHandle;
+ };
+
+ SkSTArray<8, SkSTArray<2, VaryingTransform, true> > fInstalledTransforms;
+
UniformHandle fColorUniform;
GrColor fColor;
« no previous file with comments | « no previous file | src/gpu/glsl/GrGLSLGeometryProcessor.h » ('j') | src/gpu/glsl/GrGLSLGeometryProcessor.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698