Second small fragment from "Reduce dependence on GrSurface's origin field"
TBR=bsalomon@google.com
Change-Id: Ifcfe56b1117b64821b2bfc34ba36d120227d15fa
Reviewed-on: https://skia-review.googlesource.com/25802
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/ccpr/GrCCPRPathProcessor.cpp b/src/gpu/ccpr/GrCCPRPathProcessor.cpp
index bc2e45c..6efaecf 100644
--- a/src/gpu/ccpr/GrCCPRPathProcessor.cpp
+++ b/src/gpu/ccpr/GrCCPRPathProcessor.cpp
@@ -86,7 +86,7 @@
}
void GrCCPRPathProcessor::getGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const {
- b->add32((fFillType << 16) | this->atlas()->origin());
+ b->add32((fFillType << 16) | this->atlasProxy()->origin());
}
class GLSLPathProcessor : public GrGLSLGeometryProcessor {
@@ -161,10 +161,10 @@
// Convert to atlas coordinates in order to do our texture lookup.
v->codeAppendf("highp vec2 atlascoord = octocoord + vec2(%s);",
proc.getInstanceAttrib(InstanceAttribs::kAtlasOffset).fName);
- if (kTopLeft_GrSurfaceOrigin == proc.atlas()->origin()) {
+ if (kTopLeft_GrSurfaceOrigin == proc.atlasProxy()->origin()) {
v->codeAppendf("%s = atlascoord * %s;", texcoord.vsOut(), atlasAdjust);
} else {
- SkASSERT(kBottomLeft_GrSurfaceOrigin == proc.atlas()->origin());
+ SkASSERT(kBottomLeft_GrSurfaceOrigin == proc.atlasProxy()->origin());
v->codeAppendf("%s = vec2(atlascoord.x * %s.x, 1 - atlascoord.y * %s.y);",
texcoord.vsOut(), atlasAdjust, atlasAdjust);
}