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

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

Issue 1673373003: Add support for caching font files in the Android SkFontMgr. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Remove unnecessary fIsolated var. Created 4 years, 10 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
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 #include "SkTypes.h" 7 #include "SkTypes.h"
8 #if defined(SK_BUILD_FOR_ANDROID) 8 #if defined(SK_BUILD_FOR_ANDROID)
9 9
10 #include "SkFontMgr.h" 10 #include "SkFontMgr.h"
(...skipping 18 matching lines...) Expand all
29 } 29 }
30 30
31 SkFontMgr* SkFontMgr::Factory() { 31 SkFontMgr* SkFontMgr::Factory() {
32 // These globals exist so that Chromium can override the environment. 32 // These globals exist so that Chromium can override the environment.
33 // TODO: these globals need to be removed, and Chromium use SkFontMgr_New_An droid instead. 33 // TODO: these globals need to be removed, and Chromium use SkFontMgr_New_An droid instead.
34 if ((gTestFontsXml || gTestFallbackFontsXml) && gTestBasePath) { 34 if ((gTestFontsXml || gTestFallbackFontsXml) && gTestBasePath) {
35 SkFontMgr_Android_CustomFonts custom = { 35 SkFontMgr_Android_CustomFonts custom = {
36 SkFontMgr_Android_CustomFonts::kOnlyCustom, 36 SkFontMgr_Android_CustomFonts::kOnlyCustom,
37 gTestBasePath, 37 gTestBasePath,
38 gTestFontsXml, 38 gTestFontsXml,
39 gTestFallbackFontsXml 39 gTestFallbackFontsXml,
40 false /* fIsolated */
40 }; 41 };
41 return SkFontMgr_New_Android(&custom); 42 return SkFontMgr_New_Android(&custom);
42 } 43 }
43 44
44 return SkFontMgr_New_Android(nullptr); 45 return SkFontMgr_New_Android(nullptr);
45 } 46 }
46 47
47 #endif//defined(SK_BUILD_FOR_ANDROID) 48 #endif//defined(SK_BUILD_FOR_ANDROID)
OLDNEW
« src/ports/SkFontMgr_android.cpp ('K') | « src/ports/SkFontMgr_android.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698