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

Side by Side Diff: core/src/fxge/android/fpf_skiafontmgr.cpp

Issue 1520063002: Get rid of most instance of 'foo == NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium@bstr_isnull
Patch Set: rebase Created 5 years 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/src/fxge/agg/src/fx_agg_driver.cpp ('k') | core/src/fxge/dib/fx_dib_composite.cpp » ('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/include/fxcrt/fx_ext.h" 7 #include "core/include/fxcrt/fx_ext.h"
8 #include "fx_fpf.h" 8 #include "fx_fpf.h"
9 9
10 #if _FX_OS_ == _FX_ANDROID_ 10 #if _FX_OS_ == _FX_ANDROID_
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 CFPF_SkiaFontDescriptor* pFont = 231 CFPF_SkiaFontDescriptor* pFont =
232 (CFPF_SkiaFontDescriptor*)m_FontFaces.ElementAt(i); 232 (CFPF_SkiaFontDescriptor*)m_FontFaces.ElementAt(i);
233 delete pFont; 233 delete pFont;
234 } 234 }
235 m_FontFaces.RemoveAll(); 235 m_FontFaces.RemoveAll();
236 if (m_FTLibrary) { 236 if (m_FTLibrary) {
237 FXFT_Done_FreeType(m_FTLibrary); 237 FXFT_Done_FreeType(m_FTLibrary);
238 } 238 }
239 } 239 }
240 FX_BOOL CFPF_SkiaFontMgr::InitFTLibrary() { 240 FX_BOOL CFPF_SkiaFontMgr::InitFTLibrary() {
241 if (m_FTLibrary == NULL) { 241 if (!m_FTLibrary) {
242 FXFT_Init_FreeType(&m_FTLibrary); 242 FXFT_Init_FreeType(&m_FTLibrary);
243 } 243 }
244 return m_FTLibrary != NULL; 244 return m_FTLibrary != NULL;
245 } 245 }
246 void CFPF_SkiaFontMgr::LoadSystemFonts() { 246 void CFPF_SkiaFontMgr::LoadSystemFonts() {
247 if (m_bLoaded) { 247 if (m_bLoaded) {
248 return; 248 return;
249 } 249 }
250 ScanPath("/system/fonts"); 250 ScanPath("/system/fonts");
251 OutputSystemFonts(); 251 OutputSystemFonts();
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 } 522 }
523 if (pOS2 && (pOS2->ulCodePageRange1 & (1 << 31))) { 523 if (pOS2 && (pOS2->ulCodePageRange1 & (1 << 31))) {
524 pFontDesc->m_dwStyle |= FXFONT_SYMBOLIC; 524 pFontDesc->m_dwStyle |= FXFONT_SYMBOLIC;
525 } 525 }
526 pFontDesc->m_dwCharsets = FPF_SkiaGetFaceCharset(pOS2); 526 pFontDesc->m_dwCharsets = FPF_SkiaGetFaceCharset(pOS2);
527 pFontDesc->m_iFaceIndex = face->face_index; 527 pFontDesc->m_iFaceIndex = face->face_index;
528 pFontDesc->m_iGlyphNum = face->num_glyphs; 528 pFontDesc->m_iGlyphNum = face->num_glyphs;
529 } 529 }
530 void CFPF_SkiaFontMgr::OutputSystemFonts() {} 530 void CFPF_SkiaFontMgr::OutputSystemFonts() {}
531 #endif 531 #endif
OLDNEW
« no previous file with comments | « core/src/fxge/agg/src/fx_agg_driver.cpp ('k') | core/src/fxge/dib/fx_dib_composite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698