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

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

Issue 22854005: GPU Gradients (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fixes from code reviews Created 7 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
Index: src/effects/gradients/SkTwoPointRadialGradient.cpp
diff --git a/src/effects/gradients/SkTwoPointRadialGradient.cpp b/src/effects/gradients/SkTwoPointRadialGradient.cpp
index 989c1395563145122a0f13e88a5822011adcbd83..d00f5e103bb795c3baebf6d03ca6ddce8980e591 100644
--- a/src/effects/gradients/SkTwoPointRadialGradient.cpp
+++ b/src/effects/gradients/SkTwoPointRadialGradient.cpp
@@ -535,7 +535,7 @@ void GrGLRadial2Gradient::emitCode(GrGLShaderBuilder* builder,
const char* inputColor,
const TextureSamplerArray& samplers) {
- this->emitYCoordUniform(builder);
+ this->emitUniforms(builder, key);
const char* fsCoords;
const char* vsCoordsVarying;
GrSLType coordsVaryingType;
@@ -632,7 +632,7 @@ void GrGLRadial2Gradient::emitCode(GrGLShaderBuilder* builder,
t.printf("-%s / %s", cName.c_str(), bVar.c_str());
}
- this->emitColorLookup(builder, t.c_str(), outputColor, inputColor, samplers[0]);
+ this->emitColor(builder, t.c_str(), key, outputColor, inputColor, samplers);
}
}
@@ -677,7 +677,7 @@ GrGLEffect::EffectKey GrGLRadial2Gradient::GenKey(const GrDrawEffect& drawEffect
kIsDegenerate = 1 << kMatrixKeyBitCnt,
};
- EffectKey key = GenMatrixKey(drawEffect);
+ EffectKey key = GenBaseGradientKey(drawEffect);
if (drawEffect.castEffect<GrRadial2Gradient>().isDegenerate()) {
key |= kIsDegenerate;
}

Powered by Google App Engine
This is Rietveld 408576698