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

Unified Diff: src/effects/gradients/SkRadialGradient.cpp

Issue 491673002: Initial refactor of shaderbuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 months 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 fb1d40a7ab0d9c92b66169aca5c785138fbf2a73..aeae24a0af41f4b976fe15e7a6455e2905ff4053 100644
--- a/src/effects/gradients/SkRadialGradient.cpp
+++ b/src/effects/gradients/SkRadialGradient.cpp
@@ -470,7 +470,7 @@ void SkRadialGradient::RadialGradientContext::shadeSpan(int x, int y,
#if SK_SUPPORT_GPU
#include "GrTBackendEffectFactory.h"
-#include "gl/GrGLShaderBuilder.h"
+#include "gl/builders/GrGLProgramBuilder.h"
#include "SkGr.h"
class GrGLRadialGradient : public GrGLGradientEffect {
@@ -480,7 +480,7 @@ public:
const GrDrawEffect&) : INHERITED (factory) { }
virtual ~GrGLRadialGradient() { }
- virtual void emitCode(GrGLShaderBuilder*,
+ virtual void emitCode(GrGLProgramBuilder*,
const GrDrawEffect&,
const GrEffectKey&,
const char* outputColor,
@@ -559,7 +559,7 @@ GrEffect* GrRadialGradient::TestCreate(SkRandom* random,
/////////////////////////////////////////////////////////////////////
-void GrGLRadialGradient::emitCode(GrGLShaderBuilder* builder,
+void GrGLRadialGradient::emitCode(GrGLProgramBuilder* builder,
const GrDrawEffect&,
const GrEffectKey& key,
const char* outputColor,
@@ -569,7 +569,7 @@ void GrGLRadialGradient::emitCode(GrGLShaderBuilder* builder,
uint32_t baseKey = key.get32(0);
this->emitUniforms(builder, baseKey);
SkString t("length(");
- t.append(builder->ensureFSCoords2D(coords, 0));
+ t.append(builder->getFragmentShaderBuilder()->ensureFSCoords2D(coords, 0));
t.append(")");
this->emitColor(builder, t.c_str(), baseKey, outputColor, inputColor, samplers);
}
« 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