diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2017-02-02 10:43:58 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-02 18:34:02 +0000 |
commit | cae3a4c8ab7082df009a1e340f10292350e0c763 (patch) | |
tree | 93b73dca6a37d1241a0ecc8819fdc3cf23f64cb0 /src/gpu/effects/GrTextureDomain.cpp | |
parent | ebfbba9bbdacd754c8ad7429ee066f53f17bc66b (diff) |
Revert "Replaced all calls to fragmentPosition() with sk_FragCoord"
This reverts commit de4d301881e7fd084f1f0b359ec6f9b2bf8bd4c5.
Reason for revert: several Chrome rendering bugs on Mac
BUG=skia:
Change-Id: I492082b0b7e7c902ede4b598c5809f604d210ce1
Reviewed-on: https://skia-review.googlesource.com/7887
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.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp index 58707f5744..aa449d4052 100644 --- a/src/gpu/effects/GrTextureDomain.cpp +++ b/src/gpu/effects/GrTextureDomain.cpp @@ -419,6 +419,7 @@ GrDeviceSpaceTextureDecalFragmentProcessor::GrDeviceSpaceTextureDecalFragmentPro fDeviceSpaceOffset.fX = deviceSpaceOffset.fX - subset.fLeft; fDeviceSpaceOffset.fY = deviceSpaceOffset.fY - subset.fTop; this->initClassID<GrDeviceSpaceTextureDecalFragmentProcessor>(); + this->setWillReadFragmentPosition(); } sk_sp<GrFragmentProcessor> GrDeviceSpaceTextureDecalFragmentProcessor::Make( @@ -443,6 +444,7 @@ GrDeviceSpaceTextureDecalFragmentProcessor::GrDeviceSpaceTextureDecalFragmentPro fDeviceSpaceOffset.fX = deviceSpaceOffset.fX - subset.fLeft; fDeviceSpaceOffset.fY = deviceSpaceOffset.fY - subset.fTop; this->initClassID<GrDeviceSpaceTextureDecalFragmentProcessor>(); + this->setWillReadFragmentPosition(); } GrGLSLFragmentProcessor* GrDeviceSpaceTextureDecalFragmentProcessor::onCreateGLSLInstance() const { @@ -457,7 +459,8 @@ GrGLSLFragmentProcessor* GrDeviceSpaceTextureDecalFragmentProcessor::onCreateGLS kDefault_GrSLPrecision, "scaleAndTranslate", &scaleAndTranslateName); - args.fFragBuilder->codeAppendf("vec2 coords = sk_FragCoord.xy * %s.xy + %s.zw;", + args.fFragBuilder->codeAppendf("vec2 coords = %s.xy * %s.xy + %s.zw;", + args.fFragBuilder->fragmentPosition(), scaleAndTranslateName, scaleAndTranslateName); fGLDomain.sampleTexture(args.fFragBuilder, args.fUniformHandler, |