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

Unified Diff: include/core/SkImageInfo.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/SkImageInfo.h
diff --git a/include/core/SkImageInfo.h b/include/core/SkImageInfo.h
index 7fedfa1a4ae17205f51c3e37930faa64e39beac7..a953349d05044331fecd3e3dbf0777c2da1837f3 100644
--- a/include/core/SkImageInfo.h
+++ b/include/core/SkImageInfo.h
@@ -10,6 +10,7 @@
#include "SkMath.h"
#include "SkSize.h"
+#include "SkRect.h"
tfarina 2014/10/23 15:00:57 nit-picking: could you keep it sorted?
hal.canary 2014/10/24 18:23:31 Done.
class SkWriteBuffer;
class SkReadBuffer;
@@ -207,6 +208,7 @@ public:
return SkAlphaTypeIsOpaque(fAlphaType);
}
+ SkIRect shape() const { return SkIRect::MakeWH(fWidth, fHeight); }
reed1 2014/10/23 14:39:44 please call this bounds instead of shape.
hal.canary 2014/10/24 18:23:31 Done.
SkISize dimensions() const { return SkISize::Make(fWidth, fHeight); }
/**
« include/core/SkBitmap.h ('K') | « include/core/SkBitmap.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698