Revert "Reduce dependence on GrSurface's origin field"
This reverts commit 467022b1861033d968195687da15270c208279ff.
Reason for revert: GrAHardwareBufferImageGenerator.cpp
Original change's description:
> Reduce dependence on GrSurface's origin field
>
> Unfortunately, GrGPU and its ilk are still using the GrSurface's origin a lot. I will clean that up in a second CL.
>
> Change-Id: Iba729440ce8ea8d24bb7f4e5de55ed576a0f176d
> Reviewed-on: https://skia-review.googlesource.com/24700
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,robertphillips@google.com
Change-Id: I1b3f5c3b82d250ac164beb1d5c83abb6c3c6ab3b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/25620
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
index 06e7e68..90756a7 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -597,15 +597,14 @@
void GrGLDisplacementMapEffect::onSetData(const GrGLSLProgramDataManager& pdman,
const GrFragmentProcessor& proc) {
const GrDisplacementMapEffect& displacementMap = proc.cast<GrDisplacementMapEffect>();
- GrSurfaceProxy* proxy = displacementMap.textureSampler(1).proxy();
- GrTexture* colorTex = proxy->priv().peekTexture();
+ GrTexture* colorTex = displacementMap.textureSampler(1).peekTexture();
SkScalar scaleX = displacementMap.scale().fX / colorTex->width();
SkScalar scaleY = displacementMap.scale().fY / colorTex->height();
pdman.set2f(fScaleUni, SkScalarToFloat(scaleX),
- proxy->origin() == kTopLeft_GrSurfaceOrigin ?
+ colorTex->origin() == kTopLeft_GrSurfaceOrigin ?
SkScalarToFloat(scaleY) : SkScalarToFloat(-scaleY));
- fGLDomain.setData(pdman, displacementMap.domain(), proxy);
+ fGLDomain.setData(pdman, displacementMap.domain(), colorTex);
if (SkToBool(displacementMap.colorSpaceXform())) {
fColorSpaceHelper.setData(pdman, displacementMap.colorSpaceXform());
}