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

Unified Diff: include/core/SkPicture.h

Issue 176863004: Add new skpinfo tool (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Addressed code review comments Created 6 years, 10 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/tools.gyp ('k') | src/core/SkPicture.cpp » ('j') | tools/skpinfo.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPicture.h
===================================================================
--- include/core/SkPicture.h (revision 13626)
+++ include/core/SkPicture.h (working copy)
@@ -217,6 +217,16 @@
void abortPlayback();
#endif
+ // Return true if the SkStream/Buffer represents a serialized picture, and
+ // fills out SkPictInfo. After this function returns, the data source is not
+ // rewound so it will have to be manually reset before passing to
+ // CreateFromStream or CreateFromBuffer. Note, CreateFromStream and
+ // CreateFromBuffer perform this check internally so these entry points are
+ // intended for stand alone tools.
+ // If false is returned, SkPictInfo is unmodified.
reed1 2014/03/03 16:24:28 Do we expect to support these for chrome or other
robertphillips 2014/03/03 18:44:24 Done.
+ static bool StreamIsSKP(SkStream*, SkPictInfo*);
+ static bool BufferIsSKP(SkReadBuffer&, SkPictInfo*);
+
protected:
// V2 : adds SkPixelRef's generation ID.
// V3 : PictInfo tag at beginning, and EOF tag at the end
@@ -262,13 +272,6 @@
// For testing. Derived classes may instantiate an alternate
// SkBBoxHierarchy implementation
virtual SkBBoxHierarchy* createBBoxHierarchy() const;
-
- // Return true if the SkStream represents a serialized picture, and fills out
- // SkPictInfo. After this function returns, the SkStream is not rewound; it
- // will be ready to be parsed to create an SkPicturePlayback.
- // If false is returned, SkPictInfo is unmodified.
- static bool StreamIsSKP(SkStream*, SkPictInfo*);
- static bool BufferIsSKP(SkReadBuffer&, SkPictInfo*);
private:
void createHeader(void* header) const;
« no previous file with comments | « gyp/tools.gyp ('k') | src/core/SkPicture.cpp » ('j') | tools/skpinfo.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698