Update TextShaper APIs to address API council feedback
This CL contains followings:
- Rename TextShaper to TextRunShaper, StyledTextShaper to TextShaper
- Renamed getTotalAdvance to getAdvance
- Rename getStyle to getGlyphStyle
- Rename getOriginX/Y to getOffsetX/Y
- Rename getPositionX/Y to getGlyphX/Y
- Fixed some documentation errors.
- Remvoed GlyphStyle. Added GlyphConsumer instead.
Bug: 170255480
Test: atest TextShaperRunTest GlyphStyleTest TextShaperTest
Change-Id: I0ffd7a3374e9cd1e04872240c2d0da26bc530244
diff --git a/libs/hwui/jni/text/TextShaper.cpp b/libs/hwui/jni/text/TextShaper.cpp
index 9d9e91f..9785aa5 100644
--- a/libs/hwui/jni/text/TextShaper.cpp
+++ b/libs/hwui/jni/text/TextShaper.cpp
@@ -196,7 +196,7 @@
};
int register_android_graphics_text_TextShaper(JNIEnv* env) {
- return RegisterMethodsOrDie(env, "android/graphics/text/TextShaper", gMethods,
+ return RegisterMethodsOrDie(env, "android/graphics/text/TextRunShaper", gMethods,
NELEM(gMethods))
+ RegisterMethodsOrDie(env, "android/graphics/text/PositionedGlyphs",
gResultMethods, NELEM(gResultMethods));