summaryrefslogtreecommitdiffstats
path: root/ui/gfx/hud_font.cc
blob: 8151778856b857a97add7e63e71de33c8448bc6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright 2015 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 "ui/gfx/hud_font.h"

#include "base/lazy_instance.h"
#include "third_party/skia/include/core/SkTypeface.h"

namespace gfx {

namespace {
base::LazyInstance<skia::RefPtr<SkTypeface>> g_hud_typeface;
}  // namespace

void SetHudTypeface(skia::RefPtr<SkTypeface> typeface) {
  g_hud_typeface.Get() = typeface;
}

skia::RefPtr<SkTypeface> GetHudTypeface() {
  // nullptr is fine; caller will create its own in that case.
  return g_hud_typeface.Get();
}

}  // namespace gfx