aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-03 19:18:39 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-03 19:18:39 +0000
commit6f4fb0f1296422a44d5d0dac155d82595dc5ebec (patch)
tree4901983c0553090f68884a15b3b82c2649f94ef9 /include
parent1b94819fcbe766039a488ad3975db2e1a8a25e28 (diff)
Generating the 1M skps frequently yields truncated skps. This tool is intended to help automate weeding these out.
Please see skbug:1057 rmistry for tools, gyp mtklein for src\core & include\core BUG=skia:1057 R=rmistry@google.com, mtklein@google.com, reed@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/176863004 git-svn-id: http://skia.googlecode.com/svn/trunk@13643 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r--include/core/SkPicture.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h
index 841e1d4ebc..ae5e81e36d 100644
--- a/include/core/SkPicture.h
+++ b/include/core/SkPicture.h
@@ -217,6 +217,17 @@ public:
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.
+ */
+ static bool InternalOnly_StreamIsSKP(SkStream*, SkPictInfo*);
+ static bool InternalOnly_BufferIsSKP(SkReadBuffer&, SkPictInfo*);
+
protected:
// V2 : adds SkPixelRef's generation ID.
// V3 : PictInfo tag at beginning, and EOF tag at the end
@@ -262,13 +273,6 @@ protected:
// 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;