Index: src/utils/SkMultiPictureDocument.h |
diff --git a/src/utils/SkMultiPictureDocument.h b/src/utils/SkMultiPictureDocument.h |
index 1da105e1b6f1959d668d6376f4ec9220d69c1329..ac782606ff706a554a10d76fbc113985660db40a 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 |