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

Unified Diff: src/utils/SkMultiPictureDocument.h

Issue 2255333003: SkMultiSKP: version 2 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-08-23 (Tuesday) 11:53:05 EDT Created 4 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/utils/SkMultiPictureDocument.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | src/utils/SkMultiPictureDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698