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

Unified Diff: src/effects/gradients/SkRadialGradient.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/gradients/SkLinearGradient.cpp ('k') | src/effects/gradients/SkSweepGradient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkRadialGradient.cpp
diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp
index 7be8ed111b98cf3cb7df9daaa3e9bc2db6b3e40c..52d06392e1b39085f322b88eb9a2c696cf376a32 100644
--- a/src/effects/gradients/SkRadialGradient.cpp
+++ b/src/effects/gradients/SkRadialGradient.cpp
@@ -415,7 +415,8 @@ void SkRadialGradient::RadialGradientContext::shadeSpan(int x, int y,
#if SK_SUPPORT_GPU
#include "SkGr.h"
-#include "gl/builders/GrGLProgramBuilder.h"
+#include "glsl/GrGLSLCaps.h"
+#include "glsl/GrGLSLFragmentShaderBuilder.h"
class GrGLRadialGradient : public GrGLGradientEffect {
public:
@@ -499,12 +500,12 @@ const GrFragmentProcessor* GrRadialGradient::TestCreate(GrProcessorTestData* d)
void GrGLRadialGradient::emitCode(EmitArgs& args) {
const GrRadialGradient& ge = args.fFp.cast<GrRadialGradient>();
- this->emitUniforms(args.fBuilder, ge);
+ this->emitUniforms(args.fUniformHandler, ge);
SkString t("length(");
t.append(args.fFragBuilder->ensureFSCoords2D(args.fCoords, 0));
t.append(")");
- this->emitColor(args.fBuilder,
- args.fFragBuilder,
+ this->emitColor(args.fFragBuilder,
+ args.fUniformHandler,
args.fGLSLCaps,
ge, t.c_str(),
args.fOutputColor,
« no previous file with comments | « src/effects/gradients/SkLinearGradient.cpp ('k') | src/effects/gradients/SkSweepGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698