aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2014-10-24 12:54:53 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-24 12:54:53 -0700
commitf622a6c8fd176acf9944de8df00d7f0bb56b67d3 (patch)
tree11a136e816a7dfd26804f199c5d123a28e70c896 /gm
parent87ab51862731ab0cd017e63d828fef31a193be40 (diff)
Add `SkIRect bounds()` convenience method to SkImageInfo and SkBitmap.
Diffstat (limited to 'gm')
-rw-r--r--gm/texturedomaineffect.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/gm/texturedomaineffect.cpp b/gm/texturedomaineffect.cpp
index acf039513d..d235f7f86b 100644
--- a/gm/texturedomaineffect.cpp
+++ b/gm/texturedomaineffect.cpp
@@ -105,15 +105,14 @@ protected:
textureMatrices.back().preRotate(45.f, texture->width() / 2.f, texture->height() / 2.f);
const SkIRect texelDomains[] = {
- SkIRect::MakeWH(fBmp.width(), fBmp.height()),
+ fBmp.bounds(),
SkIRect::MakeXYWH(fBmp.width() / 4,
fBmp.height() / 4,
fBmp.width() / 2,
fBmp.height() / 2),
};
- SkRect renderRect = SkRect::MakeWH(SkIntToScalar(fBmp.width()),
- SkIntToScalar(fBmp.height()));
+ SkRect renderRect = SkRect::Make(fBmp.bounds());
renderRect.outset(kDrawPad, kDrawPad);
SkScalar y = kDrawPad + kTestPad;