diff options
author | Robert Phillips <robertphillips@google.com> | 2017-06-15 12:07:18 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-15 17:18:19 +0000 |
commit | fbcef6eb8abad142daf45418516550f7635b4a52 (patch) | |
tree | 1fb2b2a1df72ba87ec05a91bd1cd271e24b5544e /src/gpu/GrCoordTransform.h | |
parent | baaf439eb5d08097d794f13800e5bf7ce8885f95 (diff) |
Clean up GrResourceProvider usage
The only substantive changes are the removal of GrProxy instantiation in:
SkGpuBlurUtils::GaussianBlur
GrSimpleTextureEffect::Make*
Change-Id: I10970609693bd6ff5b3a3c21b41d82642bb277bc
Reviewed-on: https://skia-review.googlesource.com/19965
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrCoordTransform.h')
-rw-r--r-- | src/gpu/GrCoordTransform.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/gpu/GrCoordTransform.h b/src/gpu/GrCoordTransform.h index a791213c04..3ba4fd8ab6 100644 --- a/src/gpu/GrCoordTransform.h +++ b/src/gpu/GrCoordTransform.h @@ -12,7 +12,6 @@ #include "GrSurfaceProxyPriv.h" #include "GrTextureProxy.h" -class GrResourceProvider; class GrTexture; /** @@ -32,21 +31,20 @@ public: * Create a transformation that maps [0, 1] to a proxy's boundaries. The proxy origin also * implies whether a y-reversal should be performed. */ - GrCoordTransform(GrResourceProvider* resourceProvider, GrTextureProxy* proxy) { + GrCoordTransform(GrTextureProxy* proxy) { SkASSERT(proxy); SkDEBUGCODE(fInProcessor = false); - this->reset(resourceProvider, SkMatrix::I(), proxy, true); + this->reset(SkMatrix::I(), proxy, true); } /** * Create a transformation from a matrix. The proxy origin also implies whether a y-reversal * should be performed. */ - GrCoordTransform(GrResourceProvider* resourceProvider, const SkMatrix& m, - GrTextureProxy* proxy) { + GrCoordTransform(const SkMatrix& m, GrTextureProxy* proxy) { SkASSERT(proxy); SkDEBUGCODE(fInProcessor = false); - this->reset(resourceProvider, m, proxy, true); + this->reset(m, proxy, true); } /** @@ -57,7 +55,15 @@ public: this->reset(m); } - void reset(GrResourceProvider*, const SkMatrix&, GrTextureProxy*, bool normalize); + void reset(const SkMatrix& m, GrTextureProxy* proxy, bool normalize) { + SkASSERT(proxy); + SkASSERT(!fInProcessor); + + fMatrix = m; + fProxy = proxy; + fNormalize = normalize; + fReverseY = kBottomLeft_GrSurfaceOrigin == proxy->origin(); + } void reset(const SkMatrix& m) { SkASSERT(!fInProcessor); |