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

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

Issue 1829693002: SkPDF: draw{Image,Bitmap} always serializes early (Closed) Base URL: https://skia.googlesource.com/skia.git@r1823683005
Patch Set: rebase Created 4 years, 8 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 | « src/pdf/SkPDFDevice.cpp ('k') | 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"
(...skipping 13 matching lines...) Expand all
24 // keep similar functionality together. 24 // keep similar functionality together.
25 struct SkPDFObjectSerializer : SkNoncopyable { 25 struct SkPDFObjectSerializer : SkNoncopyable {
26 SkPDFObjNumMap fObjNumMap; 26 SkPDFObjNumMap fObjNumMap;
27 SkPDFSubstituteMap fSubstituteMap; 27 SkPDFSubstituteMap fSubstituteMap;
28 SkTDArray<int32_t> fOffsets; 28 SkTDArray<int32_t> fOffsets;
29 sk_sp<SkPDFObject> fInfoDict; 29 sk_sp<SkPDFObject> fInfoDict;
30 size_t fBaseOffset; 30 size_t fBaseOffset;
31 int32_t fNextToBeSerialized; // index in fObjNumMap 31 int32_t fNextToBeSerialized; // index in fObjNumMap
32 32
33 SkPDFObjectSerializer(); 33 SkPDFObjectSerializer();
34 ~SkPDFObjectSerializer();
34 void addObjectRecursively(const sk_sp<SkPDFObject>&); 35 void addObjectRecursively(const sk_sp<SkPDFObject>&);
35 void serializeHeader(SkWStream*, const SkPDFMetadata&); 36 void serializeHeader(SkWStream*, const SkPDFMetadata&);
36 void serializeObjects(SkWStream*); 37 void serializeObjects(SkWStream*);
37 void serializeFooter(SkWStream*, const sk_sp<SkPDFObject>, sk_sp<SkPDFObject >); 38 void serializeFooter(SkWStream*, const sk_sp<SkPDFObject>, sk_sp<SkPDFObject >);
38 int32_t offset(SkWStream*); 39 int32_t offset(SkWStream*);
39 }; 40 };
40 41
41 /** Concrete implementation of SkDocument that creates PDF files. This 42 /** Concrete implementation of SkDocument that creates PDF files. This
42 class does not produced linearized or optimized PDFs; instead it 43 class does not produced linearized or optimized PDFs; instead it
43 it attempts to use a minimum amount of RAM. */ 44 it attempts to use a minimum amount of RAM. */
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 SkPDFGlyphSetMap fGlyphUsage; 77 SkPDFGlyphSetMap fGlyphUsage;
77 SkTArray<sk_sp<SkPDFDict>> fPages; 78 SkTArray<sk_sp<SkPDFDict>> fPages;
78 sk_sp<SkPDFDict> fDests; 79 sk_sp<SkPDFDict> fDests;
79 sk_sp<SkPDFDevice> fPageDevice; 80 sk_sp<SkPDFDevice> fPageDevice;
80 sk_sp<SkCanvas> fCanvas; 81 sk_sp<SkCanvas> fCanvas;
81 SkScalar fRasterDpi; 82 SkScalar fRasterDpi;
82 SkPDFMetadata fMetadata; 83 SkPDFMetadata fMetadata;
83 }; 84 };
84 85
85 #endif // SkPDFDocument_DEFINED 86 #endif // SkPDFDocument_DEFINED
OLDNEW
« no previous file with comments | « src/pdf/SkPDFDevice.cpp ('k') | src/pdf/SkPDFDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698