Chromium Code Reviews| Index: src/ports/SkFontMgr_android.cpp |
| diff --git a/src/ports/SkFontMgr_android.cpp b/src/ports/SkFontMgr_android.cpp |
| index f85539ca53603c90b8196ef7a6285914177445c2..e03c96184698d4b48011eaff57be05d676c578e0 100644 |
| --- a/src/ports/SkFontMgr_android.cpp |
| +++ b/src/ports/SkFontMgr_android.cpp |
| @@ -5,19 +5,27 @@ |
| * found in the LICENSE file. |
| */ |
| +#include "SkFixed.h" |
| #include "SkFontDescriptor.h" |
| #include "SkFontHost_FreeType_common.h" |
| #include "SkFontMgr.h" |
| #include "SkFontMgr_android.h" |
| #include "SkFontMgr_android_parser.h" |
| #include "SkFontStyle.h" |
| +#include "SkRefCnt.h" |
| +#include "SkString.h" |
| #include "SkStream.h" |
| +#include "SkTArray.h" |
| #include "SkTDArray.h" |
| #include "SkTSearch.h" |
| +#include "SkTemplates.h" |
| #include "SkTypeface.h" |
| #include "SkTypefaceCache.h" |
| #include <limits> |
| +#include <stdlib.h> |
|
mtklein
2015/07/28 22:04:19
What triggered this? Do we have a stray malloc or
bungeman-skia
2015/07/28 22:48:10
NULL, abs, size_t
We should probably use SkTAbs i
|
| + |
| +class SkData; |
| class SkTypeface_Android : public SkTypeface_FreeType { |
| public: |
| @@ -400,13 +408,7 @@ protected: |
| continue; |
| } |
| - SkPaint paint; |
| - paint.setTypeface(face); |
| - paint.setTextEncoding(SkPaint::kUTF32_TextEncoding); |
| - |
| - uint16_t glyphID; |
| - paint.textToGlyphs(&character, sizeof(character), &glyphID); |
| - if (glyphID != 0) { |
| + if (face->charsToGlyphs(&character, SkTypeface::kUTF32_Encoding, NULL, 0)) { |
| return face.detach(); |
| } |
| } |