Add `SkIRect bounds()` convenience method to SkImageInfo and SkBitmap.
Review URL: https://codereview.chromium.org/646213003
diff --git a/gm/texturedomaineffect.cpp b/gm/texturedomaineffect.cpp
index acf0395..d235f7f 100644
--- a/gm/texturedomaineffect.cpp
+++ b/gm/texturedomaineffect.cpp
@@ -105,15 +105,14 @@
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;