diff options
author | Brian Salomon <bsalomon@google.com> | 2018-05-25 10:08:05 -0400 |
---|---|---|
committer | Stephen White <senorblanco@chromium.org> | 2018-05-26 18:36:12 +0000 |
commit | d8eb7b6b12d5b155214031d4aa4d8f582ebb91a1 (patch) | |
tree | 0c5de84e88769d346345910a1eb4bea5bd3fba36 /include | |
parent | 16b1eab9bab992785a9c8dd780b42e6ed76a5dc0 (diff) |
Reland "Turn off domain in GrTextureOp when src rect contains entire proxy"
This is a reland of 869433fa113d1573d5d91fcafdca413b247ce1b0
Original change's description:
> Turn off domain in GrTextureOp when src rect contains entire proxy
>
> Move check for turning off domain when nearest/no-aa to GrRenderTargetContext.
>
> Change-Id: I3c071b5f73fb3134218453204f30c3020c9dad9a
> Reviewed-on: https://skia-review.googlesource.com/130143
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I29a21e26de8a246a74bd40fd0cda044f8f18327e
Reviewed-on: https://skia-review.googlesource.com/130307
Reviewed-by: Stephen White <senorblanco@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/private/GrSurfaceProxy.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h index 1c18492cbd..9499edfde3 100644 --- a/include/private/GrSurfaceProxy.h +++ b/include/private/GrSurfaceProxy.h @@ -239,6 +239,21 @@ public: } int worstCaseWidth() const; int worstCaseHeight() const; + /** + * Helper that gets the width and height of the surface as a bounding rectangle. + */ + SkRect getBoundsRect() const { + SkASSERT(LazyState::kFully != this->lazyInstantiationState()); + return SkRect::MakeIWH(this->width(), this->height()); + } + /** + * Helper that gets the worst case width and height of the surface as a bounding rectangle. + */ + SkRect getWorstCaseBoundsRect() const { + SkASSERT(LazyState::kFully != this->lazyInstantiationState()); + return SkRect::MakeIWH(this->worstCaseWidth(), this->worstCaseHeight()); + } + GrSurfaceOrigin origin() const { SkASSERT(kTopLeft_GrSurfaceOrigin == fOrigin || kBottomLeft_GrSurfaceOrigin == fOrigin); return fOrigin; @@ -303,14 +318,6 @@ public: void deInstantiate(); /** - * Helper that gets the width and height of the surface as a bounding rectangle. - */ - SkRect getBoundsRect() const { - SkASSERT(LazyState::kFully != this->lazyInstantiationState()); - return SkRect::MakeIWH(this->width(), this->height()); - } - - /** * @return the texture proxy associated with the surface proxy, may be NULL. */ virtual GrTextureProxy* asTextureProxy() { return nullptr; } |