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

Unified Diff: src/effects/gradients/SkLinearGradient.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/SkGradientShaderPriv.h ('k') | src/effects/gradients/SkRadialGradient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkLinearGradient.cpp
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp
index 9d939bf4a22a85d02628d2134d6daf547c548c18..551afaab02573f0addcff46136defea26e33dc9c 100644
--- a/src/effects/gradients/SkLinearGradient.cpp
+++ b/src/effects/gradients/SkLinearGradient.cpp
@@ -460,7 +460,7 @@ void SkLinearGradient::LinearGradientContext::shadeSpan16(int x, int y,
#if SK_SUPPORT_GPU
#include "GrTBackendEffectFactory.h"
-#include "gl/GrGLShaderBuilder.h"
+#include "gl/builders/GrGLProgramBuilder.h"
#include "SkGr.h"
/////////////////////////////////////////////////////////////////////
@@ -473,7 +473,7 @@ public:
virtual ~GrGLLinearGradient() { }
- virtual void emitCode(GrGLShaderBuilder*,
+ virtual void emitCode(GrGLProgramBuilder*,
const GrDrawEffect&,
const GrEffectKey&,
const char* outputColor,
@@ -550,7 +550,7 @@ GrEffect* GrLinearGradient::TestCreate(SkRandom* random,
/////////////////////////////////////////////////////////////////////
-void GrGLLinearGradient::emitCode(GrGLShaderBuilder* builder,
+void GrGLLinearGradient::emitCode(GrGLProgramBuilder* builder,
const GrDrawEffect&,
const GrEffectKey& key,
const char* outputColor,
@@ -559,7 +559,7 @@ void GrGLLinearGradient::emitCode(GrGLShaderBuilder* builder,
const TextureSamplerArray& samplers) {
uint32_t baseKey = key.get32(0);
this->emitUniforms(builder, baseKey);
- SkString t = builder->ensureFSCoords2D(coords, 0);
+ SkString t = builder->getFragmentShaderBuilder()->ensureFSCoords2D(coords, 0);
t.append(".x");
this->emitColor(builder, t.c_str(), baseKey, outputColor, inputColor, samplers);
}
« no previous file with comments | « src/effects/gradients/SkGradientShaderPriv.h ('k') | src/effects/gradients/SkRadialGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698