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

Unified Diff: src/gpu/GrPathProcessor.cpp

Issue 1462123003: Create GrGLSLVaryingHandler class for program building (Closed) Base URL: https://skia.googlesource.com/skia.git@putCapsOnArgs
Patch Set: add files Created 5 years, 1 month 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: src/gpu/GrPathProcessor.cpp
diff --git a/src/gpu/GrPathProcessor.cpp b/src/gpu/GrPathProcessor.cpp
index 0e856520d413c71af475d920e42b9ae93710f9b8..3c56ff16804bb35412499d7c838b951d248891dc 100644
--- a/src/gpu/GrPathProcessor.cpp
+++ b/src/gpu/GrPathProcessor.cpp
@@ -12,6 +12,7 @@
#include "glsl/GrGLSLFragmentShaderBuilder.h"
#include "glsl/GrGLSLProcessorTypes.h"
#include "glsl/GrGLSLProgramBuilder.h"
+#include "glsl/GrGLSLVarying.h"
class GrGLPathProcessor : public GrGLSLPrimitiveProcessor {
public:
@@ -30,7 +31,7 @@ public:
const GrPathProcessor& pathProc = args.fGP.cast<GrPathProcessor>();
// emit transforms
- this->emitTransforms(args.fPB, args.fTransformsIn, args.fTransformsOut);
+ this->emitTransforms(args.fVaryingHandler, args.fTransformsIn, args.fTransformsOut);
// Setup uniform color
if (pathProc.opts().readsColor()) {
@@ -49,7 +50,9 @@ public:
}
}
- void emitTransforms(GrGLSLGPBuilder* pb, const TransformsIn& tin, TransformsOut* tout) {
+ void emitTransforms(GrGLSLVaryingHandler* varyingHandler,
+ const TransformsIn& tin,
+ TransformsOut* tout) {
tout->push_back_n(tin.count());
fInstalledTransforms.push_back_n(tin.count());
for (int i = 0; i < tin.count(); i++) {
@@ -64,7 +67,7 @@ public:
strVaryingName.appendf("_%i_%i", i, t);
GrGLSLVertToFrag v(varyingType);
fInstalledTransforms[i][t].fHandle =
- pb->addSeparableVarying(strVaryingName.c_str(), &v).toIndex();
+ varyingHandler->addSeparableVarying(strVaryingName.c_str(), &v).toIndex();
fInstalledTransforms[i][t].fType = varyingType;
SkNEW_APPEND_TO_TARRAY(&(*tout)[i], GrGLSLTransformedCoords,

Powered by Google App Engine
This is Rietveld 408576698