| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "../../../include/fxge/fx_ge.h" | 7 #include "../../../include/fxge/fx_ge.h" |
| 8 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ | 8 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ |
| 9 #include "../../../include/fxge/fx_ge_win32.h" | 9 #include "../../../include/fxge/fx_ge_win32.h" |
| 10 #include "dwrite_int.h" | 10 #include "dwrite_int.h" |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 } | 303 } |
| 304 HRESULT STDMETHODCALLTYPE CDwFontFileStream::ReadFileFragment( | 304 HRESULT STDMETHODCALLTYPE CDwFontFileStream::ReadFileFragment( |
| 305 void const** fragmentStart, | 305 void const** fragmentStart, |
| 306 UINT64 fileOffset, | 306 UINT64 fileOffset, |
| 307 UINT64 fragmentSize, | 307 UINT64 fragmentSize, |
| 308 OUT void** fragmentContext | 308 OUT void** fragmentContext |
| 309 ) | 309 ) |
| 310 { | 310 { |
| 311 if (fileOffset <= resourceSize_ && | 311 if (fileOffset <= resourceSize_ && |
| 312 fragmentSize <= resourceSize_ - fileOffset) { | 312 fragmentSize <= resourceSize_ - fileOffset) { |
| 313 *fragmentStart = static_cast<FX_BYTE const*>(resourcePtr_) + static_cast
<size_t>(fileOffset); | 313 *fragmentStart = static_cast<uint8_t const*>(resourcePtr_) + static_cast
<size_t>(fileOffset); |
| 314 *fragmentContext = NULL; | 314 *fragmentContext = NULL; |
| 315 return S_OK; | 315 return S_OK; |
| 316 } else { | 316 } else { |
| 317 *fragmentStart = NULL; | 317 *fragmentStart = NULL; |
| 318 *fragmentContext = NULL; | 318 *fragmentContext = NULL; |
| 319 return E_FAIL; | 319 return E_FAIL; |
| 320 } | 320 } |
| 321 } | 321 } |
| 322 void STDMETHODCALLTYPE CDwFontFileStream::ReleaseFileFragment(void* fragmentCont
ext) | 322 void STDMETHODCALLTYPE CDwFontFileStream::ReleaseFileFragment(void* fragmentCont
ext) |
| 323 { | 323 { |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 text_bbox.Height(), | 464 text_bbox.Height(), |
| 465 &dib, | 465 &dib, |
| 466 text_bbox.left, | 466 text_bbox.left, |
| 467 text_bbox.top, | 467 text_bbox.top, |
| 468 FXDIB_BLEND_NORMAL, | 468 FXDIB_BLEND_NORMAL, |
| 469 pClipRgn | 469 pClipRgn |
| 470 ); | 470 ); |
| 471 return hr; | 471 return hr; |
| 472 } | 472 } |
| 473 #endif | 473 #endif |
| OLD | NEW |