aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/FontHostStreamTest.cpp
diff options
context:
space:
mode:
authorGravatar Herb Derby <herb@google.com>2018-03-05 14:36:45 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-06 15:50:26 +0000
commiteb3f674d6ddd88e4a31570b26f61238b4b82f490 (patch)
treee092900bb1f4f025f03e2b5a36097dea334d027d /tests/FontHostStreamTest.cpp
parent7487ec86b9d8dcd632378d9d6a4178877e144a16 (diff)
Add GetTypefaceOrDefault to SkPaintPriv
Remove most uses of GetDefaultTypeface. SkTypeface has fewer friends. BUG=skia:7515 Change-Id: Iedec5b39b9ef8c638772be4971075491b59b740b Reviewed-on: https://skia-review.googlesource.com/112300 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
Diffstat (limited to 'tests/FontHostStreamTest.cpp')
-rw-r--r--tests/FontHostStreamTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/FontHostStreamTest.cpp b/tests/FontHostStreamTest.cpp
index e97ea0dcc2..3a5f52895f 100644
--- a/tests/FontHostStreamTest.cpp
+++ b/tests/FontHostStreamTest.cpp
@@ -11,6 +11,7 @@
#include "SkFontDescriptor.h"
#include "SkGraphics.h"
#include "SkPaint.h"
+#include "SkPaintPriv.h"
#include "SkPoint.h"
#include "SkRect.h"
#include "SkStream.h"
@@ -84,8 +85,7 @@ DEF_TEST(FontHostStream, reporter) {
drawBG(&origCanvas);
origCanvas.drawString("A", point.fX, point.fY, paint);
- sk_sp<SkTypeface> typeface(paint.getTypeface() ? paint.refTypeface()
- : SkTypeface::MakeDefault());
+ sk_sp<SkTypeface> typeface = SkPaintPriv::RefTypefaceOrDefault(paint);
int ttcIndex;
std::unique_ptr<SkStreamAsset> fontData(typeface->openStream(&ttcIndex));
if (!fontData) {