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

Side by Side Diff: core/fxge/android/fpf_skiafont.cpp

Issue 1832173003: Remove FX_DWORD from core/ and delete definition (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 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 | « core/fxge/android/fpf_skiafont.h ('k') | core/fxge/android/fpf_skiafontmgr.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/fxcrt/include/fx_system.h" 7 #include "core/fxcrt/include/fx_system.h"
8 8
9 #if _FX_OS_ == _FX_ANDROID_ 9 #if _FX_OS_ == _FX_ANDROID_
10 10
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 if (!m_Face) { 160 if (!m_Face) {
161 return 0; 161 return 0;
162 } 162 }
163 TT_Postscript* ttInfo = 163 TT_Postscript* ttInfo =
164 (TT_Postscript*)FT_Get_Sfnt_Table(m_Face, ft_sfnt_post); 164 (TT_Postscript*)FT_Get_Sfnt_Table(m_Face, ft_sfnt_post);
165 if (ttInfo) { 165 if (ttInfo) {
166 return ttInfo->italicAngle; 166 return ttInfo->italicAngle;
167 } 167 }
168 return 0; 168 return 0;
169 } 169 }
170 FX_DWORD CFPF_SkiaFont::GetFontData(FX_DWORD dwTable, 170 uint32_t CFPF_SkiaFont::GetFontData(uint32_t dwTable,
171 uint8_t* pBuffer, 171 uint8_t* pBuffer,
172 FX_DWORD dwSize) { 172 uint32_t dwSize) {
173 if (!m_Face) { 173 if (!m_Face) {
174 return 0; 174 return 0;
175 } 175 }
176 FT_ULong ulSize = pdfium::base::checked_cast<FT_ULong>(dwSize); 176 FT_ULong ulSize = pdfium::base::checked_cast<FT_ULong>(dwSize);
177 if (FXFT_Load_Sfnt_Table(m_Face, dwTable, 0, pBuffer, &ulSize)) { 177 if (FXFT_Load_Sfnt_Table(m_Face, dwTable, 0, pBuffer, &ulSize)) {
178 return 0; 178 return 0;
179 } 179 }
180 return pdfium::base::checked_cast<FX_DWORD>(ulSize); 180 return pdfium::base::checked_cast<uint32_t>(ulSize);
181 } 181 }
182 FX_BOOL CFPF_SkiaFont::InitFont(CFPF_SkiaFontMgr* pFontMgr, 182 FX_BOOL CFPF_SkiaFont::InitFont(CFPF_SkiaFontMgr* pFontMgr,
183 CFPF_SkiaFontDescriptor* pFontDes, 183 CFPF_SkiaFontDescriptor* pFontDes,
184 const CFX_ByteStringC& bsFamily, 184 const CFX_ByteStringC& bsFamily,
185 FX_DWORD dwStyle, 185 uint32_t dwStyle,
186 uint8_t uCharset) { 186 uint8_t uCharset) {
187 if (!pFontMgr || !pFontDes) { 187 if (!pFontMgr || !pFontDes) {
188 return FALSE; 188 return FALSE;
189 } 189 }
190 switch (pFontDes->GetType()) { 190 switch (pFontDes->GetType()) {
191 case FPF_SKIAFONTTYPE_Path: { 191 case FPF_SKIAFONTTYPE_Path: {
192 CFPF_SkiaPathFont* pFont = (CFPF_SkiaPathFont*)pFontDes; 192 CFPF_SkiaPathFont* pFont = (CFPF_SkiaPathFont*)pFontDes;
193 m_Face = pFontMgr->GetFontFace(pFont->m_pPath, pFont->m_iFaceIndex); 193 m_Face = pFontMgr->GetFontFace(pFont->m_pPath, pFont->m_iFaceIndex);
194 } break; 194 } break;
195 case FPF_SKIAFONTTYPE_File: { 195 case FPF_SKIAFONTTYPE_File: {
(...skipping 12 matching lines...) Expand all
208 return FALSE; 208 return FALSE;
209 } 209 }
210 m_dwStyle = dwStyle; 210 m_dwStyle = dwStyle;
211 m_uCharset = uCharset; 211 m_uCharset = uCharset;
212 m_pFontMgr = pFontMgr; 212 m_pFontMgr = pFontMgr;
213 m_pFontDes = pFontDes; 213 m_pFontDes = pFontDes;
214 m_dwRefCount = 1; 214 m_dwRefCount = 1;
215 return TRUE; 215 return TRUE;
216 } 216 }
217 #endif 217 #endif
OLDNEW
« no previous file with comments | « core/fxge/android/fpf_skiafont.h ('k') | core/fxge/android/fpf_skiafontmgr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698