aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrTextureDomain.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-07-10 12:41:25 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-10 17:18:28 +0000
commitbca23b8634e54b779591e72a313f24bc806851d9 (patch)
tree805f037798efc49d39c6c0dbd5fd7c0f85fb9c5b /src/gpu/effects/GrTextureDomain.cpp
parenta8565e502db3e4c0bcdac04be03751bd8ca99cb1 (diff)
Remove unused ctor in GrTextureDomain
Change-Id: I82b4add39f87133157f94745902df0b3a1a23680 Reviewed-on: https://skia-review.googlesource.com/22063 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/effects/GrTextureDomain.cpp')
-rw-r--r--src/gpu/effects/GrTextureDomain.cpp38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp
index 487c5cd651..a8ce0ab6c5 100644
--- a/src/gpu/effects/GrTextureDomain.cpp
+++ b/src/gpu/effects/GrTextureDomain.cpp
@@ -30,44 +30,6 @@ static bool can_ignore_rect(GrTextureProxy* proxy, const SkRect& domain) {
return false;
}
-static bool can_ignore_rect(GrTexture* tex, const SkRect& domain) {
- // This logic is relying on the instantiated size of 'tex'. In the deferred world it
- // will have to change so this logic only fires for kExact texture proxies. This shouldn't
- // change the actual behavior of Ganesh since shaders shouldn't be accessing pixels outside
- // of the content rectangle.
- const SkIRect kFullRect = SkIRect::MakeWH(tex->width(), tex->height());
-
- return domain.contains(kFullRect);
-}
-
-GrTextureDomain::GrTextureDomain(GrTexture* tex, const SkRect& domain, Mode mode, int index)
- : fMode(mode)
- , fIndex(index) {
-
- if (kIgnore_Mode == fMode) {
- return;
- }
-
- if (kClamp_Mode == mode && can_ignore_rect(tex, domain)) {
- fMode = kIgnore_Mode;
- return;
- }
-
- const SkRect kFullRect = SkRect::MakeIWH(tex->width(), tex->height());
-
- // We don't currently handle domains that are empty or don't intersect the texture.
- // It is OK if the domain rect is a line or point, but it should not be inverted. We do not
- // handle rects that do not intersect the [0..1]x[0..1] rect.
- SkASSERT(domain.fLeft <= domain.fRight);
- SkASSERT(domain.fTop <= domain.fBottom);
- fDomain.fLeft = SkScalarPin(domain.fLeft, 0.0f, kFullRect.fRight);
- fDomain.fRight = SkScalarPin(domain.fRight, fDomain.fLeft, kFullRect.fRight);
- fDomain.fTop = SkScalarPin(domain.fTop, 0.0f, kFullRect.fBottom);
- fDomain.fBottom = SkScalarPin(domain.fBottom, fDomain.fTop, kFullRect.fBottom);
- SkASSERT(fDomain.fLeft <= fDomain.fRight);
- SkASSERT(fDomain.fTop <= fDomain.fBottom);
-}
-
GrTextureDomain::GrTextureDomain(GrTextureProxy* proxy, const SkRect& domain, Mode mode, int index)
: fMode(mode)
, fIndex(index) {