aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-05-25 10:08:05 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-25 14:41:52 +0000
commit869433fa113d1573d5d91fcafdca413b247ce1b0 (patch)
tree92c495186273db105c0dc7803457cac63298981b /include
parent71e83e85074187fce322851546e05f435cb8c7c4 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/private/GrSurfaceProxy.h23
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; }