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.cpp

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/SkPDFFont.h ('k') | src/pdf/SkPDFStream.h » ('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 2011 Google Inc. 2 * Copyright 2011 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 7
8 #include <ctype.h> 8 #include <ctype.h>
9 9
10 #include "SkData.h" 10 #include "SkData.h"
(...skipping 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1427 sk_sp<const SkAdvancedTypefaceMetrics> fontMetrics( 1427 sk_sp<const SkAdvancedTypefaceMetrics> fontMetrics(
1428 face->getAdvancedTypefaceMetrics( 1428 face->getAdvancedTypefaceMetrics(
1429 SkTypeface::kNo_PerGlyphInfo, nullptr, 0)); 1429 SkTypeface::kNo_PerGlyphInfo, nullptr, 0));
1430 if (fontMetrics) { 1430 if (fontMetrics) {
1431 canEmbed = !SkToBool( 1431 canEmbed = !SkToBool(
1432 fontMetrics->fFlags & 1432 fontMetrics->fFlags &
1433 SkAdvancedTypefaceMetrics::kNotEmbeddable_FontFlag); 1433 SkAdvancedTypefaceMetrics::kNotEmbeddable_FontFlag);
1434 } 1434 }
1435 return *canon->fCanEmbedTypeface.set(id, canEmbed); 1435 return *canon->fCanEmbedTypeface.set(id, canEmbed);
1436 } 1436 }
1437
1438 void SkPDFFont::drop() {
1439 fTypeface = nullptr;
1440 fFontInfo = nullptr;
1441 fDescriptor = nullptr;
1442 this->SkPDFDict::drop();
1443 }
OLDNEW
« no previous file with comments | « src/pdf/SkPDFFont.h ('k') | src/pdf/SkPDFStream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698