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/SkPDFFont.h

Issue 1790023003: SkPDF: add drop() virtual to release resources early. (Closed) Base URL: https://skia.googlesource.com/skia.git@skpdf-global
Patch Set: free → release 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 186
187 // Create instances of derived types based on fontInfo. 187 // Create instances of derived types based on fontInfo.
188 static SkPDFFont* Create(SkPDFCanon* canon, 188 static SkPDFFont* Create(SkPDFCanon* canon,
189 const SkAdvancedTypefaceMetrics* fontInfo, 189 const SkAdvancedTypefaceMetrics* fontInfo,
190 SkTypeface* typeface, 190 SkTypeface* typeface,
191 uint16_t glyphID, 191 uint16_t glyphID,
192 SkPDFDict* relatedFontDescriptor); 192 SkPDFDict* relatedFontDescriptor);
193 193
194 static bool Find(uint32_t fontID, uint16_t glyphID, int* index); 194 static bool Find(uint32_t fontID, uint16_t glyphID, int* index);
195 195
196 void drop() override;
197
196 private: 198 private:
197 sk_sp<SkTypeface> fTypeface; 199 sk_sp<SkTypeface> fTypeface;
198 200
199 // The glyph IDs accessible with this font. For Type1 (non CID) fonts, 201 // The glyph IDs accessible with this font. For Type1 (non CID) fonts,
200 // this will be a subset if the font has more than 255 glyphs. 202 // this will be a subset if the font has more than 255 glyphs.
201 uint16_t fFirstGlyphID; 203 uint16_t fFirstGlyphID;
202 uint16_t fLastGlyphID; 204 uint16_t fLastGlyphID;
203 sk_sp<const SkAdvancedTypefaceMetrics> fFontInfo; 205 sk_sp<const SkAdvancedTypefaceMetrics> fFontInfo;
204 sk_sp<SkPDFDict> fDescriptor; 206 sk_sp<SkPDFDict> fDescriptor;
205 207
206 SkAdvancedTypefaceMetrics::FontType fFontType; 208 SkAdvancedTypefaceMetrics::FontType fFontType;
207 209
208 typedef SkPDFDict INHERITED; 210 typedef SkPDFDict INHERITED;
209 }; 211 };
210 212
211 #endif 213 #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