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

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: Don't put a sk_sp in a hashmap 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
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 12 matching lines...) Expand all
23 // keep similar functionality together. 23 // keep similar functionality together.
24 struct SkPDFObjectSerializer : SkNoncopyable { 24 struct SkPDFObjectSerializer : SkNoncopyable {
25 SkPDFObjNumMap fObjNumMap; 25 SkPDFObjNumMap fObjNumMap;
26 SkPDFSubstituteMap fSubstituteMap; 26 SkPDFSubstituteMap fSubstituteMap;
27 SkTDArray<int32_t> fOffsets; 27 SkTDArray<int32_t> fOffsets;
28 sk_sp<SkPDFObject> fInfoDict; 28 sk_sp<SkPDFObject> fInfoDict;
29 size_t fBaseOffset; 29 size_t fBaseOffset;
30 int32_t fNextToBeSerialized; // index in fObjNumMap 30 int32_t fNextToBeSerialized; // index in fObjNumMap
31 31
32 SkPDFObjectSerializer(); 32 SkPDFObjectSerializer();
33 ~SkPDFObjectSerializer();
33 void addObjectRecursively(const sk_sp<SkPDFObject>&); 34 void addObjectRecursively(const sk_sp<SkPDFObject>&);
34 void serializeHeader(SkWStream*, const SkPDFMetadata&); 35 void serializeHeader(SkWStream*, const SkPDFMetadata&);
35 void serializeObjects(SkWStream*); 36 void serializeObjects(SkWStream*);
36 void serializeFooter(SkWStream*, const sk_sp<SkPDFObject>, sk_sp<SkPDFObject >); 37 void serializeFooter(SkWStream*, const sk_sp<SkPDFObject>, sk_sp<SkPDFObject >);
37 int32_t offset(SkWStream*); 38 int32_t offset(SkWStream*);
38 }; 39 };
39 40
40 /** Concrete implementation of SkDocument that creates PDF files. This 41 /** Concrete implementation of SkDocument that creates PDF files. This
41 class does not produced linearized or optimized PDFs; instead it 42 class does not produced linearized or optimized PDFs; instead it
42 it attempts to use a minimum amount of RAM. */ 43 it attempts to use a minimum amount of RAM. */
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 SkPDFGlyphSetMap fGlyphUsage; 76 SkPDFGlyphSetMap fGlyphUsage;
76 SkTArray<sk_sp<SkPDFDict>> fPages; 77 SkTArray<sk_sp<SkPDFDict>> fPages;
77 sk_sp<SkPDFDict> fDests; 78 sk_sp<SkPDFDict> fDests;
78 sk_sp<SkPDFDevice> fPageDevice; 79 sk_sp<SkPDFDevice> fPageDevice;
79 sk_sp<SkCanvas> fCanvas; 80 sk_sp<SkCanvas> fCanvas;
80 SkScalar fRasterDpi; 81 SkScalar fRasterDpi;
81 SkPDFMetadata fMetadata; 82 SkPDFMetadata fMetadata;
82 }; 83 };
83 84
84 #endif // SkPDFDocument_DEFINED 85 #endif // SkPDFDocument_DEFINED
OLDNEW
« src/pdf/SkBitmapKey.h ('K') | « src/pdf/SkPDFDevice.cpp ('k') | src/pdf/SkPDFDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698