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

Side by Side Diff: src/ports/SkFontMgr_android.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_mac.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 * 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 "SkFontConfigParser_android.h" 8 #include "SkFontConfigParser_android.h"
9 #include "SkFontDescriptor.h" 9 #include "SkFontDescriptor.h"
10 #include "SkFontHost_FreeType_common.h" 10 #include "SkFontHost_FreeType_common.h"
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 unsigned styleBits) const SK_OVER RIDE { 415 unsigned styleBits) const SK_OVER RIDE {
416 SkTypeface::Style oldStyle = (SkTypeface::Style)styleBits; 416 SkTypeface::Style oldStyle = (SkTypeface::Style)styleBits;
417 SkFontStyle style = SkFontStyle(oldStyle & SkTypeface::kBold 417 SkFontStyle style = SkFontStyle(oldStyle & SkTypeface::kBold
418 ? SkFontStyle::kBold_Weight 418 ? SkFontStyle::kBold_Weight
419 : SkFontStyle::kNormal_Weight, 419 : SkFontStyle::kNormal_Weight,
420 SkFontStyle::kNormal_Width, 420 SkFontStyle::kNormal_Width,
421 oldStyle & SkTypeface::kItalic 421 oldStyle & SkTypeface::kItalic
422 ? SkFontStyle::kItalic_Slant 422 ? SkFontStyle::kItalic_Slant
423 : SkFontStyle::kUpright_Slant); 423 : SkFontStyle::kUpright_Slant);
424 424
425 if (NULL != familyName) { 425 if (familyName) {
426 // On Android, we must return NULL when we can't find the requested 426 // On Android, we must return NULL when we can't find the requested
427 // named typeface so that the system/app can provide their own recov ery 427 // named typeface so that the system/app can provide their own recov ery
428 // mechanism. On other platforms we'd provide a typeface from the 428 // mechanism. On other platforms we'd provide a typeface from the
429 // default family instead. 429 // default family instead.
430 return this->onMatchFamilyStyle(familyName, style); 430 return this->onMatchFamilyStyle(familyName, style);
431 } 431 }
432 return fDefaultFamily->matchStyle(style); 432 return fDefaultFamily->matchStyle(style);
433 } 433 }
434 434
435 435
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 SkDEBUGF(("Use Test Config File Main %s, Fallback %s, Font Dir %s", 527 SkDEBUGF(("Use Test Config File Main %s, Fallback %s, Font Dir %s",
528 gTestMainConfigFile, gTestFallbackConfigFile, gTestFontFilePrefix) ); 528 gTestMainConfigFile, gTestFallbackConfigFile, gTestFontFilePrefix) );
529 } 529 }
530 530
531 void SkGetTestFontConfiguration(const char** mainconf, const char** fallbackconf , 531 void SkGetTestFontConfiguration(const char** mainconf, const char** fallbackconf ,
532 const char** fontsdir) { 532 const char** fontsdir) {
533 *mainconf = gTestMainConfigFile; 533 *mainconf = gTestMainConfigFile;
534 *fallbackconf = gTestFallbackConfigFile; 534 *fallbackconf = gTestFallbackConfigFile;
535 *fontsdir = gTestFontFilePrefix; 535 *fontsdir = gTestFontFilePrefix;
536 } 536 }
OLDNEW
« no previous file with comments | « src/ports/SkFontHost_mac.cpp ('k') | src/ports/SkFontMgr_fontconfig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698