Index: include/core/SkPixmap.h |
diff --git a/include/core/SkPixmap.h b/include/core/SkPixmap.h |
index 894b238196da95ca80e80ce992a0c6bffb24bb5e..b43072b9579687a3b658ae455caee79536adac38 100644 |
--- a/include/core/SkPixmap.h |
+++ b/include/core/SkPixmap.h |
@@ -211,6 +211,12 @@ public: |
void alloc(const SkImageInfo&); |
/** |
+ * Gets the size and optionally the rowBytes that would be allocated by SkAutoPixmapStorage if |
+ * alloc/tryAlloc was called. |
+ */ |
+ static size_t AllocSize(const SkImageInfo& info, size_t* rowBytes); |
+ |
+ /** |
* Returns an SkData object wrapping the allocated pixels memory, and resets the pixmap. |
* If the storage hasn't been allocated, the result is NULL. |
*/ |