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

Side by Side Diff: src/ports/SkFontHost_linux.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/SkFontHost_fontconfig.cpp ('k') | src/ports/SkFontHost_mac.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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 "SkFontHost.h" 8 #include "SkFontHost.h"
9 #include "SkFontHost_FreeType_common.h" 9 #include "SkFontHost_FreeType_common.h"
10 #include "SkFontDescriptor.h" 10 #include "SkFontDescriptor.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 SkTypeface::Style oldStyle = (SkTypeface::Style)styleBits; 286 SkTypeface::Style oldStyle = (SkTypeface::Style)styleBits;
287 SkFontStyle style = SkFontStyle(oldStyle & SkTypeface::kBold 287 SkFontStyle style = SkFontStyle(oldStyle & SkTypeface::kBold
288 ? SkFontStyle::kBold_Weight 288 ? SkFontStyle::kBold_Weight
289 : SkFontStyle::kNormal_Weight, 289 : SkFontStyle::kNormal_Weight,
290 SkFontStyle::kNormal_Width, 290 SkFontStyle::kNormal_Width,
291 oldStyle & SkTypeface::kItalic 291 oldStyle & SkTypeface::kItalic
292 ? SkFontStyle::kItalic_Slant 292 ? SkFontStyle::kItalic_Slant
293 : SkFontStyle::kUpright_Slant); 293 : SkFontStyle::kUpright_Slant);
294 SkTypeface* tf = NULL; 294 SkTypeface* tf = NULL;
295 295
296 if (NULL != familyName) { 296 if (familyName) {
297 tf = this->onMatchFamilyStyle(familyName, style); 297 tf = this->onMatchFamilyStyle(familyName, style);
298 } 298 }
299 299
300 if (NULL == tf) { 300 if (NULL == tf) {
301 tf = gDefaultFamily->matchStyle(style); 301 tf = gDefaultFamily->matchStyle(style);
302 } 302 }
303 303
304 return SkSafeRef(tf); 304 return SkSafeRef(tf);
305 } 305 }
306 306
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 } 397 }
398 398
399 SkTArray<SkAutoTUnref<SkFontStyleSet_Custom>, true> fFamilies; 399 SkTArray<SkAutoTUnref<SkFontStyleSet_Custom>, true> fFamilies;
400 SkFontStyleSet_Custom* gDefaultFamily; 400 SkFontStyleSet_Custom* gDefaultFamily;
401 SkTypeface* gDefaultNormal; 401 SkTypeface* gDefaultNormal;
402 }; 402 };
403 403
404 SkFontMgr* SkFontMgr::Factory() { 404 SkFontMgr* SkFontMgr::Factory() {
405 return new SkFontMgr_Custom(SK_FONT_FILE_PREFIX); 405 return new SkFontMgr_Custom(SK_FONT_FILE_PREFIX);
406 } 406 }
OLDNEW
« no previous file with comments | « src/ports/SkFontHost_fontconfig.cpp ('k') | src/ports/SkFontHost_mac.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698