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

Unified Diff: include/core/SkBitmap.h

Issue 1282363002: Use SkImageCacherator in SkImages (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix rob comments Created 5 years, 3 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 | « gyp/core.gypi ('k') | include/core/SkImage.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 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);
« no previous file with comments | « gyp/core.gypi ('k') | include/core/SkImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698