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

Unified Diff: src/effects/SkArithmeticMode_gpu.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/effects/SkAlphaThresholdFilter.cpp ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkArithmeticMode_gpu.cpp
diff --git a/src/effects/SkArithmeticMode_gpu.cpp b/src/effects/SkArithmeticMode_gpu.cpp
index a3793243ee6a93ded79c6a79907c1a71b4db7a51..ce8e426d412d527606bb7b338cfd030ae72c7d94 100644
--- a/src/effects/SkArithmeticMode_gpu.cpp
+++ b/src/effects/SkArithmeticMode_gpu.cpp
@@ -15,8 +15,8 @@
#include "GrTexture.h"
#include "glsl/GrGLSLFragmentProcessor.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
-#include "glsl/GrGLSLProgramBuilder.h"
#include "glsl/GrGLSLProgramDataManager.h"
+#include "glsl/GrGLSLUniformHandler.h"
#include "glsl/GrGLSLXferProcessor.h"
static const bool gUseUnpremul = false;
@@ -65,10 +65,10 @@ public:
SkString dstColor("dstColor");
this->emitChild(0, nullptr, &dstColor, args);
- fKUni = args.fBuilder->addUniform(GrGLSLProgramBuilder::kFragment_Visibility,
- kVec4f_GrSLType, kDefault_GrSLPrecision,
- "k");
- const char* kUni = args.fBuilder->getUniformCStr(fKUni);
+ fKUni = args.fUniformHandler->addUniform(GrGLSLUniformHandler::kFragment_Visibility,
+ kVec4f_GrSLType, kDefault_GrSLPrecision,
+ "k");
+ const char* kUni = args.fUniformHandler->getUniformCStr(fKUni);
add_arithmetic_code(fragBuilder,
args.fInputColor,
@@ -210,18 +210,18 @@ public:
}
private:
- void emitBlendCodeForDstRead(GrGLSLXPBuilder* pb,
- GrGLSLXPFragmentBuilder* fragBuilder,
+ void emitBlendCodeForDstRead(GrGLSLXPFragmentBuilder* fragBuilder,
+ GrGLSLUniformHandler* uniformHandler,
const char* srcColor,
const char* srcCoverage,
const char* dstColor,
const char* outColor,
const char* outColorSecondary,
const GrXferProcessor& proc) override {
- fKUni = pb->addUniform(GrGLSLProgramBuilder::kFragment_Visibility,
- kVec4f_GrSLType, kDefault_GrSLPrecision,
- "k");
- const char* kUni = pb->getUniformCStr(fKUni);
+ fKUni = uniformHandler->addUniform(GrGLSLUniformHandler::kFragment_Visibility,
+ kVec4f_GrSLType, kDefault_GrSLPrecision,
+ "k");
+ const char* kUni = uniformHandler->getUniformCStr(fKUni);
add_arithmetic_code(fragBuilder, srcColor, dstColor, outColor, kUni, fEnforcePMColor);
« no previous file with comments | « src/effects/SkAlphaThresholdFilter.cpp ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698