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

Unified Diff: src/gpu/glsl/GrGLSLXferProcessor.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/GrGLSLXferProcessor.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/glsl/GrGLSLXferProcessor.cpp
diff --git a/src/gpu/glsl/GrGLSLXferProcessor.cpp b/src/gpu/glsl/GrGLSLXferProcessor.cpp
index b6af968651aade4a68c5a55b5becd7b6496d8ce1..81bd015718c8e8ac7aeea99b76998409d8c252b2 100644
--- a/src/gpu/glsl/GrGLSLXferProcessor.cpp
+++ b/src/gpu/glsl/GrGLSLXferProcessor.cpp
@@ -9,8 +9,8 @@
#include "GrXferProcessor.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
-#include "glsl/GrGLSLProgramBuilder.h"
#include "glsl/GrGLSLProgramDataManager.h"
+#include "glsl/GrGLSLUniformHandler.h"
void GrGLSLXferProcessor::emitCode(const EmitArgs& args) {
if (!args.fXP.willReadDstColor()) {
@@ -19,6 +19,7 @@ void GrGLSLXferProcessor::emitCode(const EmitArgs& args) {
}
GrGLSLXPFragmentBuilder* fragBuilder = args.fXPFragBuilder;
+ GrGLSLUniformHandler* uniformHandler = args.fUniformHandler;
const char* dstColor = fragBuilder->dstColor();
if (args.fXP.getDstTexture()) {
@@ -35,16 +36,16 @@ void GrGLSLXferProcessor::emitCode(const EmitArgs& args) {
const char* dstTopLeftName;
const char* dstCoordScaleName;
- fDstTopLeftUni = args.fPB->addUniform(GrGLSLProgramBuilder::kFragment_Visibility,
- kVec2f_GrSLType,
- kDefault_GrSLPrecision,
- "DstTextureUpperLeft",
- &dstTopLeftName);
- fDstScaleUni = args.fPB->addUniform(GrGLSLProgramBuilder::kFragment_Visibility,
- kVec2f_GrSLType,
- kDefault_GrSLPrecision,
- "DstTextureCoordScale",
- &dstCoordScaleName);
+ fDstTopLeftUni = uniformHandler->addUniform(GrGLSLUniformHandler::kFragment_Visibility,
+ kVec2f_GrSLType,
+ kDefault_GrSLPrecision,
+ "DstTextureUpperLeft",
+ &dstTopLeftName);
+ fDstScaleUni = uniformHandler->addUniform(GrGLSLUniformHandler::kFragment_Visibility,
+ kVec2f_GrSLType,
+ kDefault_GrSLPrecision,
+ "DstTextureCoordScale",
+ &dstCoordScaleName);
const char* fragPos = fragBuilder->fragmentPosition();
fragBuilder->codeAppend("// Read color from copy of the destination.\n");
@@ -60,8 +61,8 @@ void GrGLSLXferProcessor::emitCode(const EmitArgs& args) {
fragBuilder->codeAppend(";");
}
- this->emitBlendCodeForDstRead(args.fPB,
- fragBuilder,
+ this->emitBlendCodeForDstRead(fragBuilder,
+ uniformHandler,
args.fInputColor,
args.fInputCoverage,
dstColor,
« no previous file with comments | « src/gpu/glsl/GrGLSLXferProcessor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698