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

Side by Side Diff: src/pdf/SkPDFDocument.h

Issue 1823683005: SkPDF: Hold page objects, not SkPDFDevices. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-03-22 (Tuesday) 17:16:46 EDT Created 4 years, 9 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/pdf/SkPDFDocument.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 SkPDFDocument_DEFINED 7 #ifndef SkPDFDocument_DEFINED
8 #define SkPDFDocument_DEFINED 8 #define SkPDFDocument_DEFINED
9 9
10 #include "SkDocument.h" 10 #include "SkDocument.h"
11 #include "SkPDFMetadata.h" 11 #include "SkPDFMetadata.h"
12 #include "SkPDFTypes.h" 12 #include "SkPDFFont.h"
13 13
14 class SkPDFDevice; 14 class SkPDFDevice;
15 15
16 sk_sp<SkDocument> SkPDFMakeDocument( 16 sk_sp<SkDocument> SkPDFMakeDocument(
17 SkWStream* stream, 17 SkWStream* stream,
18 void (*doneProc)(SkWStream*, bool), 18 void (*doneProc)(SkWStream*, bool),
19 SkScalar rasterDpi, 19 SkScalar rasterDpi,
20 SkPixelSerializer* jpegEncoder); 20 SkPixelSerializer* jpegEncoder);
21 21
22 // Logically part of SkPDFDocument (like SkPDFCanon), but separate to 22 // Logically part of SkPDFDocument (like SkPDFCanon), but separate to
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 after calling serialize, since those changes will be too late. 65 after calling serialize, since those changes will be too late.
66 The same goes for changes to the SkPDFSubstituteMap that effect 66 The same goes for changes to the SkPDFSubstituteMap that effect
67 the object or its dependencies. 67 the object or its dependencies.
68 */ 68 */
69 void serialize(const sk_sp<SkPDFObject>&); 69 void serialize(const sk_sp<SkPDFObject>&);
70 SkPDFCanon* canon() { return &fCanon; } 70 SkPDFCanon* canon() { return &fCanon; }
71 71
72 private: 72 private:
73 SkPDFObjectSerializer fObjectSerializer; 73 SkPDFObjectSerializer fObjectSerializer;
74 SkPDFCanon fCanon; 74 SkPDFCanon fCanon;
75 SkTArray<sk_sp<const SkPDFDevice>> fPageDevices; 75 SkPDFGlyphSetMap fGlyphUsage;
76 SkTArray<sk_sp<SkPDFDict>> fPages;
77 sk_sp<SkPDFDict> fDests;
78 sk_sp<SkPDFDevice> fPageDevice;
76 sk_sp<SkCanvas> fCanvas; 79 sk_sp<SkCanvas> fCanvas;
77 SkScalar fRasterDpi; 80 SkScalar fRasterDpi;
78 SkPDFMetadata fMetadata; 81 SkPDFMetadata fMetadata;
79 }; 82 };
80 83
81 #endif // SkPDFDocument_DEFINED 84 #endif // SkPDFDocument_DEFINED
OLDNEW
« no previous file with comments | « no previous file | src/pdf/SkPDFDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698