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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/utils/SkMultiPictureDocument.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #ifndef SkMultiPictureDocument_DEFINED 7 #ifndef SkMultiPictureDocument_DEFINED
8 #define SkMultiPictureDocument_DEFINED 8 #define SkMultiPictureDocument_DEFINED
9 9
10 /*
11 This format is not intended to be used in production.
12
13 For clients looking for a way to represent a document in memory,
14
15 struct Doc {
16 std::vector<sk_sp<SkPicture>> fPages;
17 std::vector<SkSize> fPageSizes;
18 };
19
20 or
21
22 struct Page {
23 sk_sp<SkPicture> fPage;
24 SkSize fPageSize;
25 };
26 std::vector<Page> pages;
27
28 would work much better.
29
30 Multi-SkPicture (MSKP) files are still useful for debugging and
31 testing.
32
33 The downsides of this format are currently:
34 - no way to extract a single page; must read the entire file at once.
35 - must use `dm` to convert to another format before passing into
36 standard skp tools.
37 - `dm` can extract the first page to skp, but no others.
38
39 TODO(halcanary): replace with somthing that addresses these issues.
40 */
41
10 #include "SkDocument.h" 42 #include "SkDocument.h"
11 43
12 /** Writes into an experimental, undocumented file format that is 44 /** Writes into an experimental, undocumented file format that is
13 useful for debugging documents printed via Skia. */ 45 useful for debugging documents printed via Skia. */
14 SK_API sk_sp<SkDocument> SkMakeMultiPictureDocument(SkWStream* dst); 46 SK_API sk_sp<SkDocument> SkMakeMultiPictureDocument(SkWStream* dst);
15 47
16 #endif // SkMultiPictureDocument_DEFINED 48 #endif // SkMultiPictureDocument_DEFINED
OLDNEW
« 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