| Index: src/pdf/SkPDFUtils.h
|
| diff --git a/src/pdf/SkPDFUtils.h b/src/pdf/SkPDFUtils.h
|
| index a9194f2e72a61798f98752102cbf25c13476f0ea..964689f4f2771c12bbc48634ebb0b9b2ebe2613e 100644
|
| --- a/src/pdf/SkPDFUtils.h
|
| +++ b/src/pdf/SkPDFUtils.h
|
| @@ -12,6 +12,7 @@
|
| #include "SkPaint.h"
|
| #include "SkPath.h"
|
| #include "SkStream.h"
|
| +#include "SkUtils.h"
|
|
|
| class SkMatrix;
|
| class SkPDFArray;
|
| @@ -92,7 +93,15 @@ inline void WriteUInt8(SkDynamicMemoryWStream* wStream, uint8_t value) {
|
| result[1] = gHex[0xF & value];
|
| wStream->write(result, 2);
|
| }
|
| -
|
| +inline void WriteUTF16beHex(SkDynamicMemoryWStream* wStream, SkUnichar utf32) {
|
| + uint16_t utf16[2] = {0, 0};
|
| + size_t len = SkUTF16_FromUnichar(utf32, utf16);
|
| + SkASSERT(len == 1 || len == 2);
|
| + SkPDFUtils::WriteUInt16BE(wStream, utf16[0]);
|
| + if (len == 2) {
|
| + SkPDFUtils::WriteUInt16BE(wStream, utf16[1]);
|
| + }
|
| +}
|
| } // namespace SkPDFUtils
|
|
|
| #endif
|
|
|