Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: include/core/SkBitmap.h

Issue 646213003: Add `SkIRect bounds()` convenience method to SkImageInfo and SkBitmap. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: include/core/SkBitmap.h
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index b36a1fd3fddc59b211c21be88efd367af01bfb53..06bea79f0d6ba9c12a641aa11d78831b2b397f3b 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -83,6 +83,9 @@ public:
SkColorType colorType() const { return fInfo.colorType(); }
SkAlphaType alphaType() const { return fInfo.alphaType(); }
+ SkIRect shape() const { return fInfo.shape(); }
reed1 2014/10/23 14:39:44 We already have getBounds(SkIRect*). I'm fine if w
hal.canary 2014/10/24 18:23:31 Acknowledged.
+ SkISize dimensions() const { return fInfo.dimensions(); }
+
/**
* Return the number of bytes per pixel based on the colortype. If the colortype is
* kUnknown_SkColorType, then 0 is returned.

Powered by Google App Engine
This is Rietveld 408576698