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

Unified Diff: include/core/SkPicture.h

Issue 464263004: expose api to count the number of ops in a picture (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: move to SkPicture.h Created 6 years, 4 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 | « no previous file | src/core/SkPicture.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPicture.h
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h
index 1e8b364145d7800cf02ecea87b0d1d78bcc7990a..69353cfe08ad6aa59fc71f2790d6aaba8ae66fe6 100644
--- a/include/core/SkPicture.h
+++ b/include/core/SkPicture.h
@@ -197,6 +197,14 @@ public:
// Takes ref on listener.
void addDeletionListener(DeletionListener* listener) const;
+ /**
+ * Return the approximate number of "operations" in the picture. This number is hard to nail
+ * down precisely, since there is not always a 1-to-1 correspondence between "operations" in
+ * the internal format, and public API calls on SkCanvas. It is also possible that the value
+ * returned may chage, as deferred optimizations may vary the count.
+ */
+ int countOps() const;
+
private:
// V2 : adds SkPixelRef's generation ID.
// V3 : PictInfo tag at beginning, and EOF tag at the end
« no previous file with comments | « no previous file | src/core/SkPicture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698