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

Side by Side Diff: src/pdf/SkPDFFont.cpp

Issue 18365005: ARM Skia NEON patches - 09 - Bugfix (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 #include <ctype.h> 8 #include <ctype.h>
9 9
10 #include "SkData.h" 10 #include "SkData.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 new SkMemoryStream(*headerLen + *dataLen + *trailerLen); 219 new SkMemoryStream(*headerLen + *dataLen + *trailerLen);
220 memcpy((char*)result->getAtPos(), src, *headerLen); 220 memcpy((char*)result->getAtPos(), src, *headerLen);
221 result->seek(*headerLen); 221 result->seek(*headerLen);
222 222
223 const uint8_t* hexData = src + *headerLen; 223 const uint8_t* hexData = src + *headerLen;
224 const uint8_t* trailer = hexData + hexDataLen; 224 const uint8_t* trailer = hexData + hexDataLen;
225 size_t outputOffset = 0; 225 size_t outputOffset = 0;
226 uint8_t dataByte = 0; // To hush compiler. 226 uint8_t dataByte = 0; // To hush compiler.
227 bool highNibble = true; 227 bool highNibble = true;
228 for (; hexData < trailer; hexData++) { 228 for (; hexData < trailer; hexData++) {
229 char curNibble = hexToBin(*hexData); 229 int8_t curNibble = hexToBin(*hexData);
230 if (curNibble < 0) { 230 if (curNibble < 0) {
231 continue; 231 continue;
232 } 232 }
233 if (highNibble) { 233 if (highNibble) {
234 dataByte = curNibble << 4; 234 dataByte = curNibble << 4;
235 highNibble = false; 235 highNibble = false;
236 } else { 236 } else {
237 dataByte |= curNibble; 237 dataByte |= curNibble;
238 highNibble = true; 238 highNibble = true;
239 ((char *)result->getAtPos())[outputOffset++] = dataByte; 239 ((char *)result->getAtPos())[outputOffset++] = dataByte;
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1408 1408
1409 insert("FontBBox", makeFontBBox(bbox, 1000))->unref(); 1409 insert("FontBBox", makeFontBBox(bbox, 1000))->unref();
1410 insertInt("FirstChar", firstGlyphID()); 1410 insertInt("FirstChar", firstGlyphID());
1411 insertInt("LastChar", lastGlyphID()); 1411 insertInt("LastChar", lastGlyphID());
1412 insert("Widths", widthArray.get()); 1412 insert("Widths", widthArray.get());
1413 insertName("CIDToGIDMap", "Identity"); 1413 insertName("CIDToGIDMap", "Identity");
1414 1414
1415 populateToUnicodeTable(NULL); 1415 populateToUnicodeTable(NULL);
1416 return true; 1416 return true;
1417 } 1417 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698