aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/gradients/SkGradientShader.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-01-17 11:52:21 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-01-17 17:28:58 +0000
commit4493a9dc9df8cf306a974bde7e0e9c5470ebcdc9 (patch)
treecc6315711d78a8192d16ae4251b5bb683993b1fd /src/effects/gradients/SkGradientShader.cpp
parent4075ec80e1c36e414e57746c772298be3b49a74e (diff)
Continue making Ganesh use absolute texture coordinates
The idea here is that the GrCoordTransform will actually hold a GrTextureProxy (rather than a GrTexture) and then, in GrGLSLPrimitiveProcessor::GetTransformMatrix, use the instantiated width & height (when uploading the transform matrix) Change-Id: Ibac3a540fcb1967ceef571157d41c1937acfadf8 Reviewed-on: https://skia-review.googlesource.com/6977 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/effects/gradients/SkGradientShader.cpp')
-rw-r--r--src/effects/gradients/SkGradientShader.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp
index ca64cb77e1..1d2c01e185 100644
--- a/src/effects/gradients/SkGradientShader.cpp
+++ b/src/effects/gradients/SkGradientShader.cpp
@@ -1659,14 +1659,17 @@ GrGradientEffect::GrGradientEffect(const CreateArgs& args) {
fRow = fAtlas->lockRow(bitmap);
if (-1 != fRow) {
fYCoord = fAtlas->getYOffset(fRow)+SK_ScalarHalf*fAtlas->getNormalizedTexelHeight();
- fCoordTransform.reset(*args.fMatrix, fAtlas->getTexture(), params.filterMode());
+ // This is 1/2 places where auto-normalization is disabled
+ fCoordTransform.reset(*args.fMatrix, fAtlas->getTexture(),
+ params.filterMode(), false);
fTextureSampler.reset(fAtlas->getTexture(), params);
} else {
sk_sp<GrTexture> texture(GrRefCachedBitmapTexture(args.fContext, bitmap, params));
if (!texture) {
return;
}
- fCoordTransform.reset(*args.fMatrix, texture.get(), params.filterMode());
+ // This is 2/2 places where auto-normalization is disabled
+ fCoordTransform.reset(*args.fMatrix, texture.get(), params.filterMode(), false);
fTextureSampler.reset(texture.get(), params);
fYCoord = SK_ScalarHalf;
}