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

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: reed nits 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
« no previous file with comments | « gm/texturedomaineffect.cpp ('k') | include/core/SkImageInfo.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkBitmap.h
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index b36a1fd3fddc59b211c21be88efd367af01bfb53..cefc30ac821fbcab88140bad7b3b2813c7323fef 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -220,6 +220,9 @@ public:
void getBounds(SkRect* bounds) const;
void getBounds(SkIRect* bounds) const;
+ SkIRect bounds() const { return fInfo.bounds(); }
+ SkISize dimensions() const { return fInfo.dimensions(); }
+
bool setInfo(const SkImageInfo&, size_t rowBytes = 0);
/**
« no previous file with comments | « gm/texturedomaineffect.cpp ('k') | include/core/SkImageInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698