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

Side by Side Diff: src/pdf/SkPDFFont.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 | « src/pdf/SkPDFDocument.cpp ('k') | src/pdf/SkPDFFont.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkPDFFont_DEFINED 10 #ifndef SkPDFFont_DEFINED
(...skipping 28 matching lines...) Expand all
39 struct FontGlyphSetPair { 39 struct FontGlyphSetPair {
40 FontGlyphSetPair(SkPDFFont* font, SkPDFGlyphSet* glyphSet); 40 FontGlyphSetPair(SkPDFFont* font, SkPDFGlyphSet* glyphSet);
41 41
42 SkPDFFont* fFont; 42 SkPDFFont* fFont;
43 SkPDFGlyphSet* fGlyphSet; 43 SkPDFGlyphSet* fGlyphSet;
44 }; 44 };
45 45
46 SkPDFGlyphSetMap(); 46 SkPDFGlyphSetMap();
47 ~SkPDFGlyphSetMap(); 47 ~SkPDFGlyphSetMap();
48 48
49 class F2BIter { 49 const FontGlyphSetPair* begin() const { return fMap.begin(); }
50 public: 50 const FontGlyphSetPair* end() const { return fMap.end(); }
51 explicit F2BIter(const SkPDFGlyphSetMap& map);
52 const FontGlyphSetPair* next() const;
53 void reset(const SkPDFGlyphSetMap& map);
54
55 private:
56 const SkTDArray<FontGlyphSetPair>* fMap;
57 mutable int fIndex;
58 };
59 51
60 void merge(const SkPDFGlyphSetMap& usage); 52 void merge(const SkPDFGlyphSetMap& usage);
61 void reset(); 53 void reset();
62 54
63 void noteGlyphUsage(SkPDFFont* font, const uint16_t* glyphIDs, 55 void noteGlyphUsage(SkPDFFont* font, const uint16_t* glyphIDs,
64 int numGlyphs); 56 int numGlyphs);
65 57
66 private: 58 private:
67 SkPDFGlyphSet* getGlyphSetForFont(SkPDFFont* font); 59 SkPDFGlyphSet* getGlyphSetForFont(SkPDFFont* font);
68 60
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 uint16_t fLastGlyphID; 196 uint16_t fLastGlyphID;
205 sk_sp<const SkAdvancedTypefaceMetrics> fFontInfo; 197 sk_sp<const SkAdvancedTypefaceMetrics> fFontInfo;
206 sk_sp<SkPDFDict> fDescriptor; 198 sk_sp<SkPDFDict> fDescriptor;
207 199
208 SkAdvancedTypefaceMetrics::FontType fFontType; 200 SkAdvancedTypefaceMetrics::FontType fFontType;
209 201
210 typedef SkPDFDict INHERITED; 202 typedef SkPDFDict INHERITED;
211 }; 203 };
212 204
213 #endif 205 #endif
OLDNEW
« no previous file with comments | « src/pdf/SkPDFDocument.cpp ('k') | src/pdf/SkPDFFont.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698