Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(592)

Side by Side Diff: src/pdf/SkPDFUtils.h

Issue 2150393002: SkPDF: Join Positioned Text (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-07-15 (Friday) 16:11:07 EDT Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pdf/SkPDFDevice.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #ifndef SkPDFUtils_DEFINED 9 #ifndef SkPDFUtils_DEFINED
10 #define SkPDFUtils_DEFINED 10 #define SkPDFUtils_DEFINED
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 inline void WriteUInt16BE(SkDynamicMemoryWStream* wStream, uint16_t value) { 70 inline void WriteUInt16BE(SkDynamicMemoryWStream* wStream, uint16_t value) {
71 static const char gHex[] = "0123456789ABCDEF"; 71 static const char gHex[] = "0123456789ABCDEF";
72 char result[4]; 72 char result[4];
73 result[0] = gHex[ value >> 12 ]; 73 result[0] = gHex[ value >> 12 ];
74 result[1] = gHex[0xF & (value >> 8 )]; 74 result[1] = gHex[0xF & (value >> 8 )];
75 result[2] = gHex[0xF & (value >> 4 )]; 75 result[2] = gHex[0xF & (value >> 4 )];
76 result[3] = gHex[0xF & (value )]; 76 result[3] = gHex[0xF & (value )];
77 wStream->write(result, 4); 77 wStream->write(result, 4);
78 } 78 }
79 inline void WriteUInt8(SkDynamicMemoryWStream* wStream, uint8_t value) {
80 static const char gHex[] = "0123456789ABCDEF";
81 char result[2];
82 result[0] = gHex[value >> 4 ];
83 result[1] = gHex[0xF & value];
84 wStream->write(result, 2);
85 }
79 86
80 } // namespace SkPDFUtils 87 } // namespace SkPDFUtils
81 88
82 #endif 89 #endif
OLDNEW
« no previous file with comments | « src/pdf/SkPDFDevice.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698