Follow Minikin's signature changes.
Minikin now uses shared_ptr instead of MinikinRefCounted.
Bug: 28119474
Test: manually tested
Test: hwui_unit_tests passed.
Change-Id: Ie0564851a8a798af112679e15f7a07db000a977e
diff --git a/core/jni/android_text_StaticLayout.cpp b/core/jni/android_text_StaticLayout.cpp
index c05ef26..90ed6eb 100644
--- a/core/jni/android_text_StaticLayout.cpp
+++ b/core/jni/android_text_StaticLayout.cpp
@@ -159,11 +159,12 @@
minikin::LineBreaker* b = reinterpret_cast<minikin::LineBreaker*>(nativePtr);
Paint* paint = reinterpret_cast<Paint*>(nativePaint);
Typeface* typeface = reinterpret_cast<Typeface*>(nativeTypeface);
- minikin::FontCollection *font;
minikin::MinikinPaint minikinPaint;
- minikin::FontStyle style = MinikinUtils::prepareMinikinPaint(&minikinPaint, &font, paint,
+ Typeface* resolvedTypeface = Typeface::resolveDefault(typeface);
+ minikin::FontStyle style = MinikinUtils::prepareMinikinPaint(&minikinPaint, paint,
typeface);
- return b->addStyleRun(&minikinPaint, font, style, start, end, isRtl);
+ return b->addStyleRun(&minikinPaint, resolvedTypeface->fFontCollection, style, start, end,
+ isRtl);
}
// Accept width measurements for the run, passed in from Java