aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils/SkMultiPictureDocument.h
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2016-08-23 09:15:04 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-23 09:15:04 -0700
commitc966ef9f07eed89bd571e3f89f8eb86f73b9328f (patch)
tree718c283931e211d1d8ae6cb7175be6057f2bf3c6 /src/utils/SkMultiPictureDocument.h
parentafdc177e77a4d083a23f709113ca97e4905df9ff (diff)
SkMultiSKP: version 2
Measurable size improvement. BUG=skia:5370 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255333003 Review-Url: https://codereview.chromium.org/2255333003
Diffstat (limited to 'src/utils/SkMultiPictureDocument.h')
-rw-r--r--src/utils/SkMultiPictureDocument.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/utils/SkMultiPictureDocument.h b/src/utils/SkMultiPictureDocument.h
index 1da105e1b6..ac782606ff 100644
--- a/src/utils/SkMultiPictureDocument.h
+++ b/src/utils/SkMultiPictureDocument.h
@@ -7,6 +7,38 @@
#ifndef SkMultiPictureDocument_DEFINED
#define SkMultiPictureDocument_DEFINED
+/*
+ This format is not intended to be used in production.
+
+ For clients looking for a way to represent a document in memory,
+
+ struct Doc {
+ std::vector<sk_sp<SkPicture>> fPages;
+ std::vector<SkSize> fPageSizes;
+ };
+
+ or
+
+ struct Page {
+ sk_sp<SkPicture> fPage;
+ SkSize fPageSize;
+ };
+ std::vector<Page> pages;
+
+ would work much better.
+
+ Multi-SkPicture (MSKP) files are still useful for debugging and
+ testing.
+
+ The downsides of this format are currently:
+ - no way to extract a single page; must read the entire file at once.
+ - must use `dm` to convert to another format before passing into
+ standard skp tools.
+ - `dm` can extract the first page to skp, but no others.
+
+ TODO(halcanary): replace with somthing that addresses these issues.
+ */
+
#include "SkDocument.h"
/** Writes into an experimental, undocumented file format that is