Index: src/effects/gradients/SkTwoPointConicalGradient.cpp |
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.cpp b/src/effects/gradients/SkTwoPointConicalGradient.cpp |
index 37b49f0d475a22c9eecfb2027649e32e8b475587..514b03cd3d4d9cdc960040ba3f3474af0551e26d 100644 |
--- a/src/effects/gradients/SkTwoPointConicalGradient.cpp |
+++ b/src/effects/gradients/SkTwoPointConicalGradient.cpp |
@@ -1,4 +1,3 @@ |
- |
/* |
* Copyright 2012 Google Inc. |
* |
@@ -498,7 +497,7 @@ void GrGLConical2Gradient::emitCode(GrGLShaderBuilder* builder, |
GrSLType coordsVaryingType; |
this->setupMatrix(builder, key, &fsCoords, &vsCoordsVarying, &coordsVaryingType); |
- this->emitYCoordUniform(builder); |
+ this->emitUniforms(builder, key); |
// 2 copies of uniform array, 1 for each of vertex & fragment shader, |
// to work around Xoom bug. Doesn't seem to cause performance decrease |
// in test apps, but need to keep an eye on it. |
@@ -618,7 +617,7 @@ void GrGLConical2Gradient::emitCode(GrGLShaderBuilder* builder, |
p5.c_str(), p3.c_str()); |
builder->fsCodeAppend("\t\t"); |
- this->emitColorLookup(builder, tName.c_str(), outputColor, inputColor, samplers[0]); |
+ this->emitColor(builder, tName.c_str(), key, outputColor, inputColor, samplers); |
// otherwise, if r(t) for the larger root was <= 0, try the other root |
builder->fsCodeAppend("\t\t} else {\n"); |
@@ -630,7 +629,7 @@ void GrGLConical2Gradient::emitCode(GrGLShaderBuilder* builder, |
tName.c_str(), p5.c_str(), p3.c_str()); |
builder->fsCodeAppend("\t\t\t"); |
- this->emitColorLookup(builder, tName.c_str(), outputColor, inputColor, samplers[0]); |
+ this->emitColor(builder, tName.c_str(), key, outputColor, inputColor, samplers); |
// end if (r(t) > 0) for smaller root |
builder->fsCodeAppend("\t\t\t}\n"); |
@@ -648,7 +647,7 @@ void GrGLConical2Gradient::emitCode(GrGLShaderBuilder* builder, |
builder->fsCodeAppendf("\tif (%s * %s + %s > 0.0) {\n", tName.c_str(), |
p5.c_str(), p3.c_str()); |
builder->fsCodeAppend("\t"); |
- this->emitColorLookup(builder, tName.c_str(), outputColor, inputColor, samplers[0]); |
+ this->emitColor(builder, tName.c_str(), key, outputColor, inputColor, samplers); |
builder->fsCodeAppend("\t}\n"); |
} |
} |
@@ -697,7 +696,7 @@ GrGLEffect::EffectKey GrGLConical2Gradient::GenKey(const GrDrawEffect& drawEffec |
kIsDegenerate = 1 << kMatrixKeyBitCnt, |
}; |
- EffectKey key = GenMatrixKey(drawEffect); |
+ EffectKey key = GenBaseGradientKey(drawEffect); |
if (drawEffect.castEffect<GrConical2Gradient>().isDegenerate()) { |
key |= kIsDegenerate; |
} |