| 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
|
|
|