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

Side by Side Diff: src/ports/SkFontMgr_win_dw.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/ports/SkFontMgr_fontconfig.cpp ('k') | no next file » | 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 2014 Google Inc. 2 * Copyright 2014 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 "SkDWrite.h" 8 #include "SkDWrite.h"
9 #include "SkDWriteFontFileStream.h" 9 #include "SkDWriteFontFileStream.h"
10 #include "SkFontMgr.h" 10 #include "SkFontMgr.h"
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 SkTypeface* SkFontMgr_DirectWrite::createTypefaceFromDWriteFont( 428 SkTypeface* SkFontMgr_DirectWrite::createTypefaceFromDWriteFont(
429 IDWriteFontFace* fontFace, 429 IDWriteFontFace* fontFace,
430 IDWriteFont* font, 430 IDWriteFont* font,
431 IDWriteFontFamily* fontFamily) const { 431 IDWriteFontFamily* fontFamily) const {
432 SkAutoMutexAcquire ama(fTFCacheMutex); 432 SkAutoMutexAcquire ama(fTFCacheMutex);
433 ProtoDWriteTypeface spec = { fontFace, font, fontFamily }; 433 ProtoDWriteTypeface spec = { fontFace, font, fontFamily };
434 SkTypeface* face = fTFCache.findByProcAndRef(FindByDWriteFont, &spec); 434 SkTypeface* face = fTFCache.findByProcAndRef(FindByDWriteFont, &spec);
435 if (NULL == face) { 435 if (NULL == face) {
436 face = DWriteFontTypeface::Create(fFactory.get(), fontFace, font, fontFa mily); 436 face = DWriteFontTypeface::Create(fFactory.get(), fontFace, font, fontFa mily);
437 if (face) { 437 if (face) {
438 fTFCache.add(face, get_style(font), true); 438 fTFCache.add(face, get_style(font));
439 } 439 }
440 } 440 }
441 return face; 441 return face;
442 } 442 }
443 443
444 int SkFontMgr_DirectWrite::onCountFamilies() const { 444 int SkFontMgr_DirectWrite::onCountFamilies() const {
445 return fFontCollection->GetFontFamilyCount(); 445 return fFontCollection->GetFontFamilyCount();
446 } 446 }
447 447
448 void SkFontMgr_DirectWrite::onGetFamilyName(int index, SkString* familyName) con st { 448 void SkFontMgr_DirectWrite::onGetFamilyName(int index, SkString* familyName) con st {
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 } 755 }
756 756
757 #include "SkFontMgr_indirect.h" 757 #include "SkFontMgr_indirect.h"
758 SK_API SkFontMgr* SkFontMgr_New_DirectWriteRenderer(SkRemotableFontMgr* proxy) { 758 SK_API SkFontMgr* SkFontMgr_New_DirectWriteRenderer(SkRemotableFontMgr* proxy) {
759 SkAutoTUnref<SkFontMgr> impl(SkFontMgr_New_DirectWrite()); 759 SkAutoTUnref<SkFontMgr> impl(SkFontMgr_New_DirectWrite());
760 if (impl.get() == NULL) { 760 if (impl.get() == NULL) {
761 return NULL; 761 return NULL;
762 } 762 }
763 return SkNEW_ARGS(SkFontMgr_Indirect, (impl.get(), proxy)); 763 return SkNEW_ARGS(SkFontMgr_Indirect, (impl.get(), proxy));
764 } 764 }
OLDNEW
« no previous file with comments | « src/ports/SkFontMgr_fontconfig.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698