| OLD | NEW |
| 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 #ifndef UNICODE | 8 #ifndef UNICODE |
| 9 #define UNICODE | 9 #define UNICODE |
| 10 #endif | 10 #endif |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 SkTAfter<SkSFNTHeader::TableDirectoryEntry>(sfntHeader); | 394 SkTAfter<SkSFNTHeader::TableDirectoryEntry>(sfntHeader); |
| 395 for (int i = 0; i < numTables; ++i, ++tableDirectory) { | 395 for (int i = 0; i < numTables; ++i, ++tableDirectory) { |
| 396 tableDirectory->offset = SkEndian_SwapBE32( | 396 tableDirectory->offset = SkEndian_SwapBE32( |
| 397 SkToU32(SkEndian_SwapBE32(SkToU32(tableDirectory->offset)) + ext
ra)); | 397 SkToU32(SkEndian_SwapBE32(SkToU32(tableDirectory->offset)) + ext
ra)); |
| 398 } | 398 } |
| 399 } else { | 399 } else { |
| 400 extra = 0; | 400 extra = 0; |
| 401 fontPackageBuffer.realloc(bytesWritten); | 401 fontPackageBuffer.realloc(bytesWritten); |
| 402 } | 402 } |
| 403 | 403 |
| 404 SkAutoTUnref<SkMemoryStream> newStream(new SkMemoryStream()); | 404 SkAutoTDelete<SkMemoryStream> newStream(new SkMemoryStream()); |
| 405 newStream->setMemoryOwned(fontPackageBuffer.detach(), bytesWritten + extra); | 405 newStream->setMemoryOwned(fontPackageBuffer.detach(), bytesWritten + extra); |
| 406 | 406 |
| 407 SkTScopedComPtr<IStream> newIStream; | 407 SkTScopedComPtr<IStream> newIStream; |
| 408 SkIStream::CreateFromSkStream(newStream.detach(), true, &newIStream); | 408 SkIStream::CreateFromSkStream(newStream.detach(), true, &newIStream); |
| 409 | 409 |
| 410 XPS_FONT_EMBEDDING embedding; | 410 XPS_FONT_EMBEDDING embedding; |
| 411 HRM(current->xpsFont->GetEmbeddingOption(&embedding), | 411 HRM(current->xpsFont->GetEmbeddingOption(&embedding), |
| 412 "Could not get embedding option from font."); | 412 "Could not get embedding option from font."); |
| 413 | 413 |
| 414 SkTScopedComPtr<IOpcPartUri> partUri; | 414 SkTScopedComPtr<IOpcPartUri> partUri; |
| (...skipping 1853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2268 IID_PPV_ARGS(&this->fXpsFactory)), | 2268 IID_PPV_ARGS(&this->fXpsFactory)), |
| 2269 "Could not create factory for layer."); | 2269 "Could not create factory for layer."); |
| 2270 | 2270 |
| 2271 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas), | 2271 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas), |
| 2272 "Could not create canvas for layer."); | 2272 "Could not create canvas for layer."); |
| 2273 } | 2273 } |
| 2274 | 2274 |
| 2275 bool SkXPSDevice::allowImageFilter(const SkImageFilter*) { | 2275 bool SkXPSDevice::allowImageFilter(const SkImageFilter*) { |
| 2276 return false; | 2276 return false; |
| 2277 } | 2277 } |
| OLD | NEW |