Index: include/core/SkBitmap.h |
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h |
index e06216cef5d804b1e623c3e360157f8c6353f9a2..2c5a506826e73c3a020cb9b1dde3fc88c745fcab 100644 |
--- a/include/core/SkBitmap.h |
+++ b/include/core/SkBitmap.h |
@@ -214,6 +214,11 @@ public: |
SkIRect bounds() const { return fInfo.bounds(); } |
SkISize dimensions() const { return fInfo.dimensions(); } |
+ // Returns the bounds of this bitmap, offset by its pixelref origin. |
+ SkIRect getSubset() const { |
+ return SkIRect::MakeXYWH(fPixelRefOrigin.x(), fPixelRefOrigin.y(), |
+ fInfo.width(), fInfo.height()); |
+ } |
bool setInfo(const SkImageInfo&, size_t rowBytes = 0); |