From fea645b801343c8a103bc0ff66539f40ef57321a Mon Sep 17 00:00:00 2001 From: reed-at-google Date: Mon, 14 Jan 2019 11:22:58 -0500 Subject: [PATCH] update site to use SkFont for text fields (#7464) --- flow/layers/performance_overlay_layer.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/flow/layers/performance_overlay_layer.cc b/flow/layers/performance_overlay_layer.cc index 210812576..d717d2a96 100644 --- a/flow/layers/performance_overlay_layer.cc +++ b/flow/layers/performance_overlay_layer.cc @@ -7,6 +7,7 @@ #include #include "flutter/flow/layers/performance_overlay_layer.h" +#include "third_party/skia/include/core/SkFont.h" namespace flow { namespace { @@ -15,12 +16,13 @@ void DrawStatisticsText(SkCanvas& canvas, const std::string& string, int x, int y) { + SkFont font; + font.setSize(15); + font.setLinearMetrics(false); SkPaint paint; - paint.setTextSize(15); - paint.setLinearText(false); paint.setColor(SK_ColorGRAY); - paint.setAntiAlias(true); - canvas.drawText(string.c_str(), string.size(), x, y, paint); + canvas.drawSimpleText(string.c_str(), string.size(), kUTF8_SkTextEncoding, x, + y, font, paint); } void VisualizeStopWatch(SkCanvas& canvas,