diff options
-rw-r--r-- | content/renderer/renderer_main_platform_delegate_win.cc | 4 | ||||
-rw-r--r-- | skia/ext/skia_sandbox_support_win.cc | 30 | ||||
-rw-r--r-- | skia/ext/skia_sandbox_support_win.h | 16 | ||||
-rw-r--r-- | skia/skia.gyp | 4 |
4 files changed, 2 insertions, 52 deletions
diff --git a/content/renderer/renderer_main_platform_delegate_win.cc b/content/renderer/renderer_main_platform_delegate_win.cc index e7f6030..8732ac8 100644 --- a/content/renderer/renderer_main_platform_delegate_win.cc +++ b/content/renderer/renderer_main_platform_delegate_win.cc @@ -14,9 +14,9 @@ #include "content/public/renderer/render_thread.h" #include "content/renderer/render_thread_impl.h" #include "sandbox/win/src/sandbox.h" -#include "skia/ext/skia_sandbox_support_win.h" #include "skia/ext/vector_platform_device_emf_win.h" #include "third_party/icu/public/i18n/unicode/timezone.h" +#include "third_party/skia/include/ports/SkTypeface_win.h" namespace content { namespace { @@ -74,7 +74,7 @@ void RendererMainPlatformDelegate::PlatformInitialize() { // cached and there's no more need to access the registry. If the sandbox // is disabled, we don't have to make this dummy call. scoped_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault()); - SetSkiaEnsureTypefaceAccessible(SkiaPreCacheFont); + SkTypeface_SetEnsureLOGFONTAccessibleProc(SkiaPreCacheFont); skia::SetSkiaEnsureTypefaceCharactersAccessible( SkiaPreCacheFontCharacters); } diff --git a/skia/ext/skia_sandbox_support_win.cc b/skia/ext/skia_sandbox_support_win.cc deleted file mode 100644 index 0c1bf7b..0000000 --- a/skia/ext/skia_sandbox_support_win.cc +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "skia_sandbox_support_win.h" -#include "SkFontHost.h" -#include "SkTypeface_win.h" - -static SkiaEnsureTypefaceAccessible g_skia_ensure_typeface_accessible = NULL; - -SK_API void SetSkiaEnsureTypefaceAccessible(SkiaEnsureTypefaceAccessible func) { - // This function is supposed to be called once in process life time. - SkASSERT(g_skia_ensure_typeface_accessible == NULL); - g_skia_ensure_typeface_accessible = func; - - // This is not hooked up in skia (yet), but soon it will replace having - // SkFontHost::EnsureTypefaceAccessible(). So for now we do both, but after - // the next skia DEPS roll, we will remove our global and our impl of - // SkFontHost::EnsureTypefaceAccessible(). - SkTypeface_SetEnsureLOGFONTAccessibleProc(func); -} - -// static -void SkFontHost::EnsureTypefaceAccessible(const SkTypeface& typeface) { - if (g_skia_ensure_typeface_accessible) { - LOGFONT lf; - SkLOGFONTFromTypeface(&typeface, &lf); - g_skia_ensure_typeface_accessible(lf); - } -} diff --git a/skia/ext/skia_sandbox_support_win.h b/skia/ext/skia_sandbox_support_win.h deleted file mode 100644 index 47615bf..0000000 --- a/skia/ext/skia_sandbox_support_win.h +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef SKIA_EXT_SKIA_SANDBOX_SUPPORT_WIN_H_ -#define SKIA_EXT_SKIA_SANDBOX_SUPPORT_WIN_H_ - -#include <windows.h> - -#include "SkPreConfig.h" - -typedef void (*SkiaEnsureTypefaceAccessible)(const LOGFONT& font); - -SK_API void SetSkiaEnsureTypefaceAccessible(SkiaEnsureTypefaceAccessible func); - -#endif // SKIA_EXT_SKIA_SANDBOX_SUPPORT_WIN_H_ diff --git a/skia/skia.gyp b/skia/skia.gyp index 5ac9fd0..3db86fc 100644 --- a/skia/skia.gyp +++ b/skia/skia.gyp @@ -101,7 +101,6 @@ #'../third_party/skia/src/ports/SkFontHost_linux.cpp', '../third_party/skia/src/ports/SkFontHost_mac.cpp', #'../third_party/skia/src/ports/SkFontHost_none.cpp', - '../third_party/skia/src/ports/SkFontHost_sandbox_none.cpp', '../third_party/skia/src/ports/SkFontHost_win.cpp', '../third_party/skia/src/ports/SkGlobalInitialization_chromium.cpp', #'../third_party/skia/src/ports/SkImageDecoder_CG.cpp', @@ -184,8 +183,6 @@ 'ext/platform_device_win.cc', 'ext/refptr.h', 'ext/SkMemory_new_handler.cpp', - 'ext/skia_sandbox_support_win.h', - 'ext/skia_sandbox_support_win.cc', 'ext/skia_trace_shim.h', 'ext/skia_utils_base.cc', 'ext/skia_utils_base.h', @@ -496,7 +493,6 @@ [ 'OS == "win"', { 'sources!': [ '../third_party/skia/src/core/SkMMapStream.cpp', - '../third_party/skia/src/ports/SkFontHost_sandbox_none.cpp', '../third_party/skia/src/ports/SkThread_pthread.cpp', '../third_party/skia/src/ports/SkTime_Unix.cpp', 'ext/SkThread_chrome.cc', |