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

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 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 | « src/ports/SkFontMgr_android.cpp ('k') | src/ports/SkOSFile_win.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 * 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 "SkDataTable.h" 8 #include "SkDataTable.h"
9 #include "SkFontDescriptor.h" 9 #include "SkFontDescriptor.h"
10 #include "SkFontHost_FreeType_common.h" 10 #include "SkFontHost_FreeType_common.h"
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 virtual SkTypeface* onLegacyCreateTypeface(const char familyName[], 789 virtual SkTypeface* onLegacyCreateTypeface(const char familyName[],
790 unsigned styleBits) const SK_OVER RIDE { 790 unsigned styleBits) const SK_OVER RIDE {
791 bool bold = styleBits & SkTypeface::kBold; 791 bool bold = styleBits & SkTypeface::kBold;
792 bool italic = styleBits & SkTypeface::kItalic; 792 bool italic = styleBits & SkTypeface::kItalic;
793 SkFontStyle style = SkFontStyle(bold ? SkFontStyle::kBold_Weight 793 SkFontStyle style = SkFontStyle(bold ? SkFontStyle::kBold_Weight
794 : SkFontStyle::kNormal_Weight, 794 : SkFontStyle::kNormal_Weight,
795 SkFontStyle::kNormal_Width, 795 SkFontStyle::kNormal_Width,
796 italic ? SkFontStyle::kItalic_Slant 796 italic ? SkFontStyle::kItalic_Slant
797 : SkFontStyle::kUpright_Slant); 797 : SkFontStyle::kUpright_Slant);
798 SkAutoTUnref<SkTypeface> typeface(this->matchFamilyStyle(familyName, sty le)); 798 SkAutoTUnref<SkTypeface> typeface(this->matchFamilyStyle(familyName, sty le));
799 if (NULL != typeface.get()) { 799 if (typeface.get()) {
800 return typeface.detach(); 800 return typeface.detach();
801 } 801 }
802 802
803 return this->matchFamilyStyle(NULL, style); 803 return this->matchFamilyStyle(NULL, style);
804 } 804 }
805 }; 805 };
806 806
807 SkFontMgr* SkFontMgr::Factory() { 807 SkFontMgr* SkFontMgr::Factory() {
808 return SkNEW(SkFontMgr_fontconfig); 808 return SkNEW(SkFontMgr_fontconfig);
809 } 809 }
OLDNEW
« no previous file with comments | « src/ports/SkFontMgr_android.cpp ('k') | src/ports/SkOSFile_win.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698