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

Unified Diff: src/pdf/SkPDFDocument.h

Issue 2253283004: SkPDF: in-place font subsetting (Closed) Base URL: https://skia.googlesource.com/skia.git@SkPdfCacheMetrics
Patch Set: 2016-08-18 (Thursday) 16:02:16 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 | « src/pdf/SkPDFDevice.cpp ('k') | src/pdf/SkPDFDocument.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFDocument.h
diff --git a/src/pdf/SkPDFDocument.h b/src/pdf/SkPDFDocument.h
index 86562fe42ee1c03dfc1ef0e8b31fc57b1abbe47a..5221dd2728a73a3da81016e2b437ac1a33364ec0 100644
--- a/src/pdf/SkPDFDocument.h
+++ b/src/pdf/SkPDFDocument.h
@@ -25,7 +25,6 @@ sk_sp<SkDocument> SkPDFMakeDocument(SkWStream* stream,
// keep similar functionality together.
struct SkPDFObjectSerializer : SkNoncopyable {
SkPDFObjNumMap fObjNumMap;
- SkPDFSubstituteMap fSubstituteMap;
SkTDArray<int32_t> fOffsets;
sk_sp<SkPDFObject> fInfoDict;
size_t fBaseOffset;
@@ -70,18 +69,16 @@ public:
It might go without saying that objects should not be changed
after calling serialize, since those changes will be too late.
- The same goes for changes to the SkPDFSubstituteMap that effect
- the object or its dependencies.
*/
void serialize(const sk_sp<SkPDFObject>&);
SkPDFCanon* canon() { return &fCanon; }
- SkPDFGlyphSetMap* getGlyphUsage() { return &fGlyphUsage; }
+ void registerFont(SkPDFFont* f) { fFonts.add(f); }
private:
SkPDFObjectSerializer fObjectSerializer;
SkPDFCanon fCanon;
- SkPDFGlyphSetMap fGlyphUsage;
SkTArray<sk_sp<SkPDFDict>> fPages;
+ SkTHashSet<SkPDFFont*> fFonts;
sk_sp<SkPDFDict> fDests;
sk_sp<SkPDFDevice> fPageDevice;
sk_sp<SkCanvas> fCanvas;
@@ -90,6 +87,8 @@ private:
SkScalar fRasterDpi;
SkDocument::PDFMetadata fMetadata;
bool fPDFA;
+
+ void reset();
};
#endif // SkPDFDocument_DEFINED
« 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