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

Unified Diff: ui/compositor/debug_utils.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
« cc/trees/layer_tree_host_client.h ('K') | « ui/compositor/debug_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/debug_utils.cc
diff --git a/ui/compositor/debug_utils.cc b/ui/compositor/debug_utils.cc
index a2e4b2c688f93a531ff9d906e5d8364ac758f1b5..573538d9fc6fce57658ba3a73c50a7251d551607 100644
--- a/ui/compositor/debug_utils.cc
+++ b/ui/compositor/debug_utils.cc
@@ -13,6 +13,7 @@
#include "base/logging.h"
#include "base/strings/utf_string_conversions.h"
+#include "third_party/skia/include/core/SkTypeface.h"
#include "ui/compositor/layer.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/point_conversions.h"
@@ -25,6 +26,8 @@ namespace ui {
namespace {
+SkTypeface* g_hud_typeface;
+
void PrintLayerHierarchyImp(const Layer* layer,
int indent,
gfx::Point mouse_location,
@@ -118,4 +121,17 @@ void PrintLayerHierarchy(const Layer* layer, gfx::Point mouse_location) {
LOG(ERROR) << out.str();
}
+void SetHudTypeface(SkTypeface* typeface) {
+ g_hud_typeface = typeface;
+}
+
+SkTypeface* GetHudTypeface() {
+ if (!g_hud_typeface) {
+ // This will be set pre-sandbox on Windows. On other platforms, just make
+ // something here.
+ g_hud_typeface = SkTypeface::CreateFromName("monospace", SkTypeface::kBold);
+ }
+ return g_hud_typeface;
+}
+
} // namespace ui
« cc/trees/layer_tree_host_client.h ('K') | « ui/compositor/debug_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698