| Index: content/browser/browser_main_runner.cc
|
| diff --git a/content/browser/browser_main_runner.cc b/content/browser/browser_main_runner.cc
|
| index ab548c6c06495bda8c2cd016b173a9f1d9b6ce40..2975ef864747646aec4a2fa68028d0c697b1bb66 100644
|
| --- a/content/browser/browser_main_runner.cc
|
| +++ b/content/browser/browser_main_runner.cc
|
| @@ -20,16 +20,11 @@
|
| #include "ui/base/ime/input_method_initializer.h"
|
|
|
| #if defined(OS_WIN)
|
| -#include <dwrite.h>
|
| #include "base/win/win_util.h"
|
| #include "base/win/windows_version.h"
|
| #include "net/cert/sha256_legacy_support_win.h"
|
| #include "sandbox/win/src/sidestep/preamble_patcher.h"
|
| -#include "skia/ext/fontmgr_default_win.h"
|
| -#include "third_party/skia/include/ports/SkFontMgr.h"
|
| -#include "third_party/skia/include/ports/SkTypeface_win.h"
|
| #include "ui/base/win/scoped_ole_initializer.h"
|
| -#include "ui/gfx/platform_font_win.h"
|
| #include "ui/gfx/switches.h"
|
| #include "ui/gfx/win/direct_write.h"
|
| #endif
|
| @@ -117,34 +112,6 @@ void InstallSha256LegacyHooks() {
|
| #endif // _WIN64
|
| }
|
|
|
| -void MaybeEnableDirectWriteFontRendering() {
|
| - if (gfx::win::ShouldUseDirectWrite() &&
|
| - !CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kDisableDirectWriteForUI) &&
|
| - !CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kDisableHarfBuzzRenderText)) {
|
| - typedef decltype(DWriteCreateFactory)* DWriteCreateFactoryProc;
|
| - HMODULE dwrite_dll = LoadLibraryW(L"dwrite.dll");
|
| - if (!dwrite_dll)
|
| - return;
|
| -
|
| - DWriteCreateFactoryProc dwrite_create_factory_proc =
|
| - reinterpret_cast<DWriteCreateFactoryProc>(
|
| - GetProcAddress(dwrite_dll, "DWriteCreateFactory"));
|
| - // Not finding the DWriteCreateFactory function indicates a corrupt dll.
|
| - CHECK(dwrite_create_factory_proc);
|
| -
|
| - IDWriteFactory* factory = NULL;
|
| -
|
| - CHECK(SUCCEEDED(
|
| - dwrite_create_factory_proc(DWRITE_FACTORY_TYPE_SHARED,
|
| - __uuidof(IDWriteFactory),
|
| - reinterpret_cast<IUnknown**>(&factory))));
|
| - SetDefaultSkiaFactory(SkFontMgr_New_DirectWrite(factory));
|
| - gfx::PlatformFontWin::SetDirectWriteFactory(factory);
|
| - }
|
| -}
|
| -
|
| } // namespace
|
|
|
| #endif // OS_WIN
|
| @@ -198,7 +165,7 @@ class BrowserMainRunnerImpl : public BrowserMainRunner {
|
| // on Windows 8 Metro mode.
|
| ole_initializer_.reset(new ui::ScopedOleInitializer);
|
| // Enable DirectWrite font rendering if needed.
|
| - MaybeEnableDirectWriteFontRendering();
|
| + gfx::win::MaybeInitializeDirectWrite();
|
| #endif // OS_WIN
|
|
|
| main_loop_.reset(new BrowserMainLoop(parameters));
|
|
|