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

Side by Side Diff: src/pdf/SkPDFFont.cpp

Issue 2354583002: SkPDF: SkBitSet gets reset() to make drop() better. (Closed)
Patch Set: call destructor directly Created 4 years, 3 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 | « no previous file | src/utils/SkBitSet.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 "SkData.h" 8 #include "SkData.h"
9 #include "SkGlyphCache.h" 9 #include "SkGlyphCache.h"
10 #include "SkPaint.h" 10 #include "SkPaint.h"
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 720
721 //////////////////////////////////////////////////////////////////////////////// 721 ////////////////////////////////////////////////////////////////////////////////
722 722
723 bool SkPDFFont::CanEmbedTypeface(SkTypeface* typeface, SkPDFCanon* canon) { 723 bool SkPDFFont::CanEmbedTypeface(SkTypeface* typeface, SkPDFCanon* canon) {
724 const SkAdvancedTypefaceMetrics* metrics = SkPDFFont::GetMetrics(typeface, c anon); 724 const SkAdvancedTypefaceMetrics* metrics = SkPDFFont::GetMetrics(typeface, c anon);
725 return metrics && can_embed(*metrics); 725 return metrics && can_embed(*metrics);
726 } 726 }
727 727
728 void SkPDFFont::drop() { 728 void SkPDFFont::drop() {
729 fTypeface = nullptr; 729 fTypeface = nullptr;
730 fGlyphUsage.~SkBitSet();
731 new (&fGlyphUsage) SkBitSet(0);
730 this->SkPDFDict::drop(); 732 this->SkPDFDict::drop();
731 } 733 }
OLDNEW
« no previous file with comments | « no previous file | src/utils/SkBitSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698