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

Unified Diff: content/renderer/renderer_main_platform_delegate_win.cc

Issue 900063002: Fixes for two different HUD issues related to win32k lockdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: i am a plumber Created 5 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/renderer_main_platform_delegate_win.cc
diff --git a/content/renderer/renderer_main_platform_delegate_win.cc b/content/renderer/renderer_main_platform_delegate_win.cc
index 694a5c796f3b671e5a45f26427c8295e7fe055c6..de7f46dcf24f4e3fb9b96a9b16241d154b49c8c0 100644
--- a/content/renderer/renderer_main_platform_delegate_win.cc
+++ b/content/renderer/renderer_main_platform_delegate_win.cc
@@ -24,6 +24,7 @@
#include "third_party/icu/source/i18n/unicode/timezone.h"
#include "third_party/skia/include/ports/SkFontMgr.h"
#include "third_party/skia/include/ports/SkTypeface_win.h"
+#include "ui/compositor/debug_utils.h"
#include "ui/gfx/win/direct_write.h"
#include "ui/gfx/win/dpi.h"
@@ -55,10 +56,16 @@ void SkiaPreCacheFontCharacters(const LOGFONT& logfont,
void WarmupDirectWrite() {
// The objects used here are intentionally not freed as we want the Skia
// code to use these objects after warmup.
+ SetDefaultSkiaFactory(GetPreSandboxWarmupFontMgr());
SkTypeface* typeface =
GetPreSandboxWarmupFontMgr()->legacyCreateTypeface("Times New Roman", 0);
DoPreSandboxWarmupForTypeface(typeface);
- SetDefaultSkiaFactory(GetPreSandboxWarmupFontMgr());
+
+ // The CC HUD needs a debug font, we warm that up here and pass it down.
+ typeface = GetPreSandboxWarmupFontMgr()->legacyCreateTypeface(
+ "Consolas", SkTypeface::kBold);
+ ui::SetHudTypeface(typeface);
+ DoPreSandboxWarmupForTypeface(typeface);
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698