Add `SkIRect bounds()` convenience method to SkImageInfo and SkBitmap.
Review URL: https://codereview.chromium.org/646213003
diff --git a/include/core/SkImageInfo.h b/include/core/SkImageInfo.h
index 7fedfa1..6fbaf6b 100644
--- a/include/core/SkImageInfo.h
+++ b/include/core/SkImageInfo.h
@@ -9,10 +9,11 @@
#define SkImageInfo_DEFINED
#include "SkMath.h"
+#include "SkRect.h"
#include "SkSize.h"
-class SkWriteBuffer;
class SkReadBuffer;
+class SkWriteBuffer;
/**
* Describes how to interpret the alpha compoent of a pixel.
@@ -207,6 +208,7 @@
return SkAlphaTypeIsOpaque(fAlphaType);
}
+ SkIRect bounds() const { return SkIRect::MakeWH(fWidth, fHeight); }
SkISize dimensions() const { return SkISize::Make(fWidth, fHeight); }
/**