Index: src/pdf/SkPDFDevice.cpp |
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp |
index 12698dc00b012117466c1b4eb1cd00866f4516b0..7c366cdae7a6159d3605e127720b0bc263f4e295 100644 |
--- a/src/pdf/SkPDFDevice.cpp |
+++ b/src/pdf/SkPDFDevice.cpp |
@@ -1063,15 +1063,9 @@ static void write_wide_string(SkDynamicMemoryWStream* wStream, |
bool wideChars) { |
if (wideChars) { |
SkASSERT(2 * len < 65535); |
- static const char gHex[] = "0123456789ABCDEF"; |
wStream->writeText("<"); |
for (size_t i = 0; i < len; i++) { |
- char result[4]; // Big-endian |
- result[0] = gHex[(input[i] >> 12) & 0xF]; |
- result[1] = gHex[(input[i] >> 8) & 0xF]; |
- result[2] = gHex[(input[i] >> 4) & 0xF]; |
- result[3] = gHex[(input[i]) & 0xF]; |
- wStream->write(result, 4); |
+ SkPDFUtils::WriteUInt16BE(wStream, input[i]); |
} |
wStream->writeText(">"); |
} else { |