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

Side by Side Diff: src/ports/SkFontHost_win.cpp

Issue 664173003: Remove a pointless use of SkWeakRefCnt. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: missed also Created 6 years, 1 month 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/core/SkTypefaceCache.cpp ('k') | src/ports/SkFontMgr_fontconfig.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 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
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 #include "SkAdvancedTypefaceMetrics.h" 9 #include "SkAdvancedTypefaceMetrics.h"
10 #include "SkBase64.h" 10 #include "SkBase64.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 } 331 }
332 return face; 332 return face;
333 } 333 }
334 334
335 /** 335 /**
336 * The created SkTypeface takes ownership of fontMemResource. 336 * The created SkTypeface takes ownership of fontMemResource.
337 */ 337 */
338 SkTypeface* SkCreateFontMemResourceTypefaceFromLOGFONT(const LOGFONT& origLF, HA NDLE fontMemResource) { 338 SkTypeface* SkCreateFontMemResourceTypefaceFromLOGFONT(const LOGFONT& origLF, HA NDLE fontMemResource) {
339 LOGFONT lf = origLF; 339 LOGFONT lf = origLF;
340 make_canonical(&lf); 340 make_canonical(&lf);
341 FontMemResourceTypeface* face = FontMemResourceTypeface::Create(lf, fontMemR esource); 341 // We'll never get a cache hit, so no point in putting this in SkTypefaceCac he.
342 SkTypefaceCache::Add(face, get_style(lf), false); 342 return FontMemResourceTypeface::Create(lf, fontMemResource);
343 return face;
344 } 343 }
345 344
346 /** 345 /**
347 * This guy is public 346 * This guy is public
348 */ 347 */
349 void SkLOGFONTFromTypeface(const SkTypeface* face, LOGFONT* lf) { 348 void SkLOGFONTFromTypeface(const SkTypeface* face, LOGFONT* lf) {
350 if (NULL == face) { 349 if (NULL == face) {
351 *lf = get_default_font(); 350 *lf = get_default_font();
352 } else { 351 } else {
353 *lf = static_cast<const LogFontTypeface*>(face)->fLogFont; 352 *lf = static_cast<const LogFontTypeface*>(face)->fLogFont;
(...skipping 2223 matching lines...) Expand 10 before | Expand all | Expand 10 after
2577 2576
2578 private: 2577 private:
2579 SkTDArray<ENUMLOGFONTEX> fLogFontArray; 2578 SkTDArray<ENUMLOGFONTEX> fLogFontArray;
2580 }; 2579 };
2581 2580
2582 /////////////////////////////////////////////////////////////////////////////// 2581 ///////////////////////////////////////////////////////////////////////////////
2583 2582
2584 SkFontMgr* SkFontMgr_New_GDI() { 2583 SkFontMgr* SkFontMgr_New_GDI() {
2585 return SkNEW(SkFontMgrGDI); 2584 return SkNEW(SkFontMgrGDI);
2586 } 2585 }
OLDNEW
« no previous file with comments | « src/core/SkTypefaceCache.cpp ('k') | src/ports/SkFontMgr_fontconfig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698