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

Unified Diff: cc/layers/heads_up_display_layer_impl.cc

Issue 960873002: Update from https://crrev.com/318214 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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
« no previous file with comments | « cc/layers/heads_up_display_layer_impl.h ('k') | cc/layers/layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/heads_up_display_layer_impl.cc
diff --git a/cc/layers/heads_up_display_layer_impl.cc b/cc/layers/heads_up_display_layer_impl.cc
index 19217c9078dfe025d44e585c4a7e6d19ca9207e5..2ed00a67f1291826a774384d6f414c8a1b321d76 100644
--- a/cc/layers/heads_up_display_layer_impl.cc
+++ b/cc/layers/heads_up_display_layer_impl.cc
@@ -70,6 +70,8 @@ double HeadsUpDisplayLayerImpl::Graph::UpdateUpperBound() {
HeadsUpDisplayLayerImpl::HeadsUpDisplayLayerImpl(LayerTreeImpl* tree_impl,
int id)
: LayerImpl(tree_impl, id),
+ typeface_(skia::AdoptRef(
+ SkTypeface::CreateFromName("monospace", SkTypeface::kBold))),
internal_contents_scale_(1.f),
fps_graph_(60.0, 80.0),
paint_time_graph_(16.0, 48.0),
@@ -303,7 +305,7 @@ void HeadsUpDisplayLayerImpl::DrawText(SkCanvas* canvas,
paint->setTextSize(size);
paint->setTextAlign(align);
- paint->setTypeface(layer_tree_impl()->settings().hud_typeface.get());
+ paint->setTypeface(typeface_.get());
canvas->drawText(text.c_str(), text.length(), x, y, *paint);
paint->setAntiAlias(anti_alias);
@@ -710,7 +712,7 @@ void HeadsUpDisplayLayerImpl::DrawDebugRect(
SkPaint label_paint = CreatePaint();
label_paint.setTextSize(kFontHeight);
- label_paint.setTypeface(layer_tree_impl()->settings().hud_typeface.get());
+ label_paint.setTypeface(typeface_.get());
label_paint.setColor(stroke_color);
const SkScalar label_text_width =
« no previous file with comments | « cc/layers/heads_up_display_layer_impl.h ('k') | cc/layers/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698