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

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

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 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/SkFontMgr_android_parser.h » ('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 2015 Google Inc. 2 * Copyright 2015 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 "SkFontMgr.h" 8 #include "SkFontMgr.h"
9 #include "SkFontMgr_android.h" 9 #include "SkFontMgr_android.h"
10 10
11 // For test only. 11 // For test only.
12 static const char* gTestFontsXml = NULL; 12 static const char* gTestFontsXml = nullptr;
13 static const char* gTestFallbackFontsXml = NULL; 13 static const char* gTestFallbackFontsXml = nullptr;
14 static const char* gTestBasePath = NULL; 14 static const char* gTestBasePath = nullptr;
15 15
16 void SkUseTestFontConfigFile(const char* fontsXml, const char* fallbackFontsXml, 16 void SkUseTestFontConfigFile(const char* fontsXml, const char* fallbackFontsXml,
17 const char* basePath) 17 const char* basePath)
18 { 18 {
19 gTestFontsXml = fontsXml; 19 gTestFontsXml = fontsXml;
20 gTestFallbackFontsXml = fallbackFontsXml; 20 gTestFallbackFontsXml = fallbackFontsXml;
21 gTestBasePath = basePath; 21 gTestBasePath = basePath;
22 SkASSERT(gTestFontsXml); 22 SkASSERT(gTestFontsXml);
23 SkASSERT(gTestFallbackFontsXml); 23 SkASSERT(gTestFallbackFontsXml);
24 SkASSERT(gTestBasePath); 24 SkASSERT(gTestBasePath);
25 SkDEBUGF(("Test BasePath: %s Fonts: %s FallbackFonts: %s\n", 25 SkDEBUGF(("Test BasePath: %s Fonts: %s FallbackFonts: %s\n",
26 gTestBasePath, gTestFontsXml, gTestFallbackFontsXml)); 26 gTestBasePath, gTestFontsXml, gTestFallbackFontsXml));
27 } 27 }
28 28
29 SkFontMgr* SkFontMgr::Factory() { 29 SkFontMgr* SkFontMgr::Factory() {
30 // These globals exist so that Chromium can override the environment. 30 // These globals exist so that Chromium can override the environment.
31 // TODO: these globals need to be removed, and Chromium use SkFontMgr_New_An droid instead. 31 // TODO: these globals need to be removed, and Chromium use SkFontMgr_New_An droid instead.
32 if ((gTestFontsXml || gTestFallbackFontsXml) && gTestBasePath) { 32 if ((gTestFontsXml || gTestFallbackFontsXml) && gTestBasePath) {
33 SkFontMgr_Android_CustomFonts custom = { 33 SkFontMgr_Android_CustomFonts custom = {
34 SkFontMgr_Android_CustomFonts::kOnlyCustom, 34 SkFontMgr_Android_CustomFonts::kOnlyCustom,
35 gTestBasePath, 35 gTestBasePath,
36 gTestFontsXml, 36 gTestFontsXml,
37 gTestFallbackFontsXml 37 gTestFallbackFontsXml
38 }; 38 };
39 return SkFontMgr_New_Android(&custom); 39 return SkFontMgr_New_Android(&custom);
40 } 40 }
41 41
42 return SkFontMgr_New_Android(NULL); 42 return SkFontMgr_New_Android(nullptr);
43 } 43 }
OLDNEW
« no previous file with comments | « src/ports/SkFontMgr_android.cpp ('k') | src/ports/SkFontMgr_android_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698