diff options
author | 2017-01-19 16:58:02 -0500 | |
---|---|---|
committer | 2017-01-19 22:36:26 +0000 | |
commit | de4d301881e7fd084f1f0b359ec6f9b2bf8bd4c5 (patch) | |
tree | edbe55dab521fec2922e3826b4e3d26150254411 /src/gpu/glsl/GrGLSLXferProcessor.cpp | |
parent | 5bee0b6de6b3ad1166d067e6b5046b48b8240a29 (diff) |
Replaced all calls to fragmentPosition() with sk_FragCoord
BUG=skia:
Change-Id: I179576e148ea6caf6e1c40f0a216421898bcb35d
Reviewed-on: https://skia-review.googlesource.com/5941
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/glsl/GrGLSLXferProcessor.cpp')
-rw-r--r-- | src/gpu/glsl/GrGLSLXferProcessor.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gpu/glsl/GrGLSLXferProcessor.cpp b/src/gpu/glsl/GrGLSLXferProcessor.cpp index e2698199fd..4101080090 100644 --- a/src/gpu/glsl/GrGLSLXferProcessor.cpp +++ b/src/gpu/glsl/GrGLSLXferProcessor.cpp @@ -49,11 +49,10 @@ void GrGLSLXferProcessor::emitCode(const EmitArgs& args) { kDefault_GrSLPrecision, "DstTextureCoordScale", &dstCoordScaleName); - const char* fragPos = fragBuilder->fragmentPosition(); fragBuilder->codeAppend("// Read color from copy of the destination.\n"); - fragBuilder->codeAppendf("vec2 _dstTexCoord = (%s.xy - %s) * %s;", - fragPos, dstTopLeftName, dstCoordScaleName); + fragBuilder->codeAppendf("vec2 _dstTexCoord = (sk_FragCoord.xy - %s) * %s;", + dstTopLeftName, dstCoordScaleName); if (!topDown) { fragBuilder->codeAppend("_dstTexCoord.y = 1.0 - _dstTexCoord.y;"); |