pass a font to GlyphRunBuilder
- avoid using legacy paint->font converter
- call out that drawText exists just for testing
- simplify drawText to assume UTF8
Bug: skia:
Change-Id: Ide14d8581d4744827d2282e7983cc5e19070b21e
Reviewed-on: https://skia-review.googlesource.com/c/180641
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Herb Derby <herb@google.com>
diff --git a/tests/DrawOpAtlasTest.cpp b/tests/DrawOpAtlasTest.cpp
index 52fd9c0..cbae1a3 100644
--- a/tests/DrawOpAtlasTest.cpp
+++ b/tests/DrawOpAtlasTest.cpp
@@ -199,14 +199,14 @@
SkPaint paint;
paint.setColor(SK_ColorRED);
- paint.setLCDRenderText(false);
- paint.setAntiAlias(false);
- paint.setSubpixelText(false);
+
+ SkFont font;
+ font.setEdging(SkFont::Edging::kAlias);
const char* text = "a";
std::unique_ptr<GrDrawOp> op = textContext->createOp_TestingOnly(
- context, textContext, rtc.get(), paint, SkMatrix::I(), text, 16, 16);
+ context, textContext, rtc.get(), paint, font, SkMatrix::I(), text, 16, 16);
op->finalize(*context->contextPriv().caps(), nullptr);
TestingUploadTarget uploadTarget;