aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrTextureDomain.cpp
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-02-09 17:01:22 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-13 14:49:09 +0000
commit3865711259e25a90a1d72480f848863ada202067 (patch)
tree4fc40848238f7d38123fa19032513751923e6bea /src/gpu/effects/GrTextureDomain.cpp
parentb34727f1a3150de2e3e95beb79900a0a848a984c (diff)
Replaced all calls to fragmentPosition() with sk_FragCoord
Change-Id: I2ed4558aea74b3ae7ee11dfe4736cdbcb16ae49e Reviewed-on: https://skia-review.googlesource.com/8278 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/gpu/effects/GrTextureDomain.cpp')
-rw-r--r--src/gpu/effects/GrTextureDomain.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp
index aa449d4052..58707f5744 100644
--- a/src/gpu/effects/GrTextureDomain.cpp
+++ b/src/gpu/effects/GrTextureDomain.cpp
@@ -419,7 +419,6 @@ GrDeviceSpaceTextureDecalFragmentProcessor::GrDeviceSpaceTextureDecalFragmentPro
fDeviceSpaceOffset.fX = deviceSpaceOffset.fX - subset.fLeft;
fDeviceSpaceOffset.fY = deviceSpaceOffset.fY - subset.fTop;
this->initClassID<GrDeviceSpaceTextureDecalFragmentProcessor>();
- this->setWillReadFragmentPosition();
}
sk_sp<GrFragmentProcessor> GrDeviceSpaceTextureDecalFragmentProcessor::Make(
@@ -444,7 +443,6 @@ GrDeviceSpaceTextureDecalFragmentProcessor::GrDeviceSpaceTextureDecalFragmentPro
fDeviceSpaceOffset.fX = deviceSpaceOffset.fX - subset.fLeft;
fDeviceSpaceOffset.fY = deviceSpaceOffset.fY - subset.fTop;
this->initClassID<GrDeviceSpaceTextureDecalFragmentProcessor>();
- this->setWillReadFragmentPosition();
}
GrGLSLFragmentProcessor* GrDeviceSpaceTextureDecalFragmentProcessor::onCreateGLSLInstance() const {
@@ -459,8 +457,7 @@ GrGLSLFragmentProcessor* GrDeviceSpaceTextureDecalFragmentProcessor::onCreateGLS
kDefault_GrSLPrecision,
"scaleAndTranslate",
&scaleAndTranslateName);
- args.fFragBuilder->codeAppendf("vec2 coords = %s.xy * %s.xy + %s.zw;",
- args.fFragBuilder->fragmentPosition(),
+ args.fFragBuilder->codeAppendf("vec2 coords = sk_FragCoord.xy * %s.xy + %s.zw;",
scaleAndTranslateName, scaleAndTranslateName);
fGLDomain.sampleTexture(args.fFragBuilder,
args.fUniformHandler,