diff options
Diffstat (limited to 'libs/hwui/tests/common/TestUtils.cpp')
| -rw-r--r-- | libs/hwui/tests/common/TestUtils.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/hwui/tests/common/TestUtils.cpp b/libs/hwui/tests/common/TestUtils.cpp index c762eed616e4..c3eb0eac4e0c 100644 --- a/libs/hwui/tests/common/TestUtils.cpp +++ b/libs/hwui/tests/common/TestUtils.cpp @@ -20,6 +20,8 @@ #include "DeferredLayerUpdater.h" #include "LayerRenderer.h" +#include <utils/Unicode.h> + namespace android { namespace uirenderer { @@ -68,7 +70,10 @@ void TestUtils::layoutTextUnscaled(const SkPaint& paint, const char* text, SkSurfaceProps surfaceProps(0, kUnknown_SkPixelGeometry); SkAutoGlyphCacheNoGamma autoCache(paint, &surfaceProps, &SkMatrix::I()); while (*text != '\0') { - SkUnichar unichar = SkUTF8_NextUnichar(&text); + size_t nextIndex = 0; + int32_t unichar = utf32_from_utf8_at(text, 4, 0, &nextIndex); + text += nextIndex; + glyph_t glyph = autoCache.getCache()->unicharToGlyph(unichar); autoCache.getCache()->unicharToGlyph(unichar); |
