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

Unified Diff: content/shell/app/blink_test_platform_support_android.cc

Issue 2599933002: [Android] Stop using skia globals for font overriding in layout tests. (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | skia/BUILD.gn » ('j') | skia/ext/fontmgr_default_android.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/app/blink_test_platform_support_android.cc
diff --git a/content/shell/app/blink_test_platform_support_android.cc b/content/shell/app/blink_test_platform_support_android.cc
index 90ff93f3d70ce657cafff51ad3d2d2a1d2577190..2a5867c91bffa3f0c189bf3236e5b357a7d630d8 100644
--- a/content/shell/app/blink_test_platform_support_android.cc
+++ b/content/shell/app/blink_test_platform_support_android.cc
@@ -4,6 +4,7 @@
#include "content/shell/app/blink_test_platform_support.h"
+#include "skia/ext/fontmgr_default_android.h"
#include "third_party/skia/include/ports/SkFontMgr_android.h"
namespace {
@@ -33,9 +34,14 @@ bool CheckLayoutSystemDeps() {
bool BlinkTestPlatformInitialize() {
// Initialize Skia with the font configuration files crafted for layout tests.
- SkUseTestFontConfigFile(
- kPrimaryFontConfig, kFallbackFontConfig, kFontDirectory);
-
+ SkFontMgr_Android_CustomFonts custom;
+ custom.fSystemFontUse = SkFontMgr_Android_CustomFonts::kOnlyCustom;
+ custom.fBasePath = kFontDirectory;
+ custom.fFontsXml = kPrimaryFontConfig;
+ custom.fFallbackFontsXml = kFallbackFontConfig;
+ custom.fIsolated = false;
bungeman-chromium 2016/12/25 17:53:57 Not sure if you want isolated or not, isolated bas
jbudorick 2016/12/27 17:11:33 For now, I'm just porting this over from https://c
+
+ SetDefaultSkiaFactory(SkFontMgr_New_Android(&custom));
return true;
}
« no previous file with comments | « no previous file | skia/BUILD.gn » ('j') | skia/ext/fontmgr_default_android.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698