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

Unified Diff: src/gpu/glsl/GrGLSLPrimitiveProcessor.cpp

Issue 1490283004: Create GLSLUniformHandler class for gpu backend (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: clean up public api of uniformhandler Created 5 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/glsl/GrGLSLPrimitiveProcessor.h ('k') | src/gpu/glsl/GrGLSLProgramBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/glsl/GrGLSLPrimitiveProcessor.cpp
diff --git a/src/gpu/glsl/GrGLSLPrimitiveProcessor.cpp b/src/gpu/glsl/GrGLSLPrimitiveProcessor.cpp
index 70b58cda94f2d85a747dd3dd32d0f73273d83522..23bb249af7aea5e0cab141477288ee931a7874af 100644
--- a/src/gpu/glsl/GrGLSLPrimitiveProcessor.cpp
+++ b/src/gpu/glsl/GrGLSLPrimitiveProcessor.cpp
@@ -7,8 +7,10 @@
#include "GrGLSLPrimitiveProcessor.h"
-#include "glsl/GrGLSLProgramBuilder.h"
+#include "GrCoordTransform.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
+#include "glsl/GrGLSLUniformHandler.h"
+#include "glsl/GrGLSLVertexShaderBuilder.h"
SkMatrix GrGLSLPrimitiveProcessor::GetTransformMatrix(const SkMatrix& localMatrix,
const GrCoordTransform& coordTransform) {
@@ -32,16 +34,16 @@ SkMatrix GrGLSLPrimitiveProcessor::GetTransformMatrix(const SkMatrix& localMatri
return combined;
}
-void GrGLSLPrimitiveProcessor::setupUniformColor(GrGLSLGPBuilder* pb,
- GrGLSLFragmentBuilder* fragBuilder,
+void GrGLSLPrimitiveProcessor::setupUniformColor(GrGLSLFragmentBuilder* fragBuilder,
+ GrGLSLUniformHandler* uniformHandler,
const char* outputName,
UniformHandle* colorUniform) {
SkASSERT(colorUniform);
const char* stagedLocalVarName;
- *colorUniform = pb->addUniform(GrGLSLProgramBuilder::kFragment_Visibility,
- kVec4f_GrSLType,
- kDefault_GrSLPrecision,
- "Color",
- &stagedLocalVarName);
+ *colorUniform = uniformHandler->addUniform(GrGLSLUniformHandler::kFragment_Visibility,
+ kVec4f_GrSLType,
+ kDefault_GrSLPrecision,
+ "Color",
+ &stagedLocalVarName);
fragBuilder->codeAppendf("%s = %s;", outputName, stagedLocalVarName);
}
« no previous file with comments | « src/gpu/glsl/GrGLSLPrimitiveProcessor.h ('k') | src/gpu/glsl/GrGLSLProgramBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698