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

Unified Diff: include/core/SkPixmap.h

Issue 1776693002: Add deferred texture upload API. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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/SkPixmap.h
diff --git a/include/core/SkPixmap.h b/include/core/SkPixmap.h
index 894b238196da95ca80e80ce992a0c6bffb24bb5e..3fbb64af9369250952350982b324aba3c3902019 100644
--- a/include/core/SkPixmap.h
+++ b/include/core/SkPixmap.h
@@ -211,6 +211,12 @@ public:
void alloc(const SkImageInfo&);
/**
robertphillips 2016/03/08 18:43:10 rwo -> row ?
bsalomon 2016/03/08 19:49:31 Done.
+ * Gets the size and optionally the rwoBytes 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.
*/

Powered by Google App Engine
This is Rietveld 408576698