Revert "Update FragmentProcessor TextureSampler to hold an GrSurfaceProxyView."
This reverts commit acf5929ae0addc5188117142fd3fb39828baa8d5.
Reason for revert: May be blocking Chrome roll
Original change's description:
> Update FragmentProcessor TextureSampler to hold an GrSurfaceProxyView.
>
> In future CLs I will update the Ops that create the TextureSamplers to pass
> the GrSurfaceProxyView in.
>
> Bug: skia:9556
> Change-Id: I550dab64974d32e4c3047188063efa2d0832328e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259164
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
TBR=egdaniel@google.com,michaelludwig@google.com
Change-Id: Ic804a52c5c6d16a13a9cc2d85bb959f305134177
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9556
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259433
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
index 80bc165..cc6b8d2 100644
--- a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
+++ b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
@@ -123,12 +123,11 @@
const GrFragmentProcessor& processor) {
const GrGaussianConvolutionFragmentProcessor& conv =
processor.cast<GrGaussianConvolutionFragmentProcessor>();
- const auto& view = conv.textureSampler(0).view();
- GrSurfaceProxy* proxy = view.proxy();
+ GrSurfaceProxy* proxy = conv.textureSampler(0).proxy();
GrTexture& texture = *proxy->peekTexture();
float imageIncrement[2] = {0};
- float ySign = view.origin() != kTopLeft_GrSurfaceOrigin ? 1.0f : -1.0f;
+ float ySign = proxy->origin() != kTopLeft_GrSurfaceOrigin ? 1.0f : -1.0f;
switch (conv.direction()) {
case Direction::kX:
imageIncrement[0] = 1.0f / texture.width();
@@ -154,7 +153,7 @@
bounds[1] *= inv;
} else {
SkScalar inv = SkScalarInvert(SkIntToScalar(texture.height()));
- if (view.origin() != kTopLeft_GrSurfaceOrigin) {
+ if (proxy->origin() != kTopLeft_GrSurfaceOrigin) {
float tmp = bounds[0];
bounds[0] = 1.0f - (inv * bounds[1]);
bounds[1] = 1.0f - (inv * tmp);