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

Side by Side Diff: core/fxge/ge/cfx_font.cpp

Issue 2430743003: in the attempt to fix 627393, changed IFX_FileRead's readBlock to return the length it reads
Patch Set: remove .tmp files Created 4 years, 2 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
OLDNEW
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 "core/fxge/include/fx_font.h" 7 #include "core/fxge/include/fx_font.h"
8 8
9 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h" 9 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h"
10 #include "core/fxge/ge/fx_text_int.h" 10 #include "core/fxge/ge/fx_text_int.h"
(...skipping 21 matching lines...) Expand all
32 #ifdef PDF_ENABLE_XFA 32 #ifdef PDF_ENABLE_XFA
33 33
34 unsigned long FTStreamRead(FXFT_Stream stream, 34 unsigned long FTStreamRead(FXFT_Stream stream,
35 unsigned long offset, 35 unsigned long offset,
36 unsigned char* buffer, 36 unsigned char* buffer,
37 unsigned long count) { 37 unsigned long count) {
38 if (count == 0) 38 if (count == 0)
39 return 0; 39 return 0;
40 40
41 IFX_FileRead* pFile = static_cast<IFX_FileRead*>(stream->descriptor.pointer); 41 IFX_FileRead* pFile = static_cast<IFX_FileRead*>(stream->descriptor.pointer);
42 return pFile->ReadBlock(buffer, offset, count) ? count : 0; 42 return static_cast<unsigned long>(pFile->ReadBlock(buffer, offset, count));
43 } 43 }
44 44
45 void FTStreamClose(FXFT_Stream stream) {} 45 void FTStreamClose(FXFT_Stream stream) {}
46 46
47 FX_BOOL LoadFileImp(FXFT_Library library, 47 FX_BOOL LoadFileImp(FXFT_Library library,
48 FXFT_Face* Face, 48 FXFT_Face* Face,
49 IFX_FileRead* pFile, 49 IFX_FileRead* pFile,
50 int32_t faceIndex, 50 int32_t faceIndex,
51 std::unique_ptr<FXFT_StreamRec>* stream) { 51 std::unique_ptr<FXFT_StreamRec>* stream) {
52 std::unique_ptr<FXFT_StreamRec> stream1(new FXFT_StreamRec()); 52 std::unique_ptr<FXFT_StreamRec> stream1(new FXFT_StreamRec());
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 const CFX_PathData* CFX_Font::LoadGlyphPath(uint32_t glyph_index, 705 const CFX_PathData* CFX_Font::LoadGlyphPath(uint32_t glyph_index,
706 int dest_width) const { 706 int dest_width) const {
707 return GetFaceCache()->LoadGlyphPath(this, glyph_index, dest_width); 707 return GetFaceCache()->LoadGlyphPath(this, glyph_index, dest_width);
708 } 708 }
709 709
710 #ifdef _SKIA_SUPPORT_ 710 #ifdef _SKIA_SUPPORT_
711 CFX_TypeFace* CFX_Font::GetDeviceCache() const { 711 CFX_TypeFace* CFX_Font::GetDeviceCache() const {
712 return GetFaceCache()->GetDeviceCache(this); 712 return GetFaceCache()->GetDeviceCache(this);
713 } 713 }
714 #endif 714 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698