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

Unified Diff: core/src/fxge/android/fpf_skiafont.cpp

Issue 1252613002: FX_BOOL considered harmful. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Manual edits. Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fxge/android/fpf_skiafont.h ('k') | core/src/fxge/android/fpf_skiafontmgr.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxge/android/fpf_skiafont.cpp
diff --git a/core/src/fxge/android/fpf_skiafont.cpp b/core/src/fxge/android/fpf_skiafont.cpp
index 2dad01057ad6795dababe56f15234dcd0ec05a81..f5ac6c0ce66635e480a35b8b796e3e93f2085bb1 100644
--- a/core/src/fxge/android/fpf_skiafont.cpp
+++ b/core/src/fxge/android/fpf_skiafont.cpp
@@ -87,23 +87,23 @@ int32_t CFPF_SkiaFont::GetDescent() const
}
return FPF_EM_ADJUST(FXFT_Get_Face_UnitsPerEM(m_Face), FXFT_Get_Face_Descender(m_Face));
}
-FX_BOOL CFPF_SkiaFont::GetGlyphBBox(int32_t iGlyphIndex, FX_RECT &rtBBox)
+bool CFPF_SkiaFont::GetGlyphBBox(int32_t iGlyphIndex, FX_RECT &rtBBox)
{
if (!m_Face) {
- return FALSE;
+ return false;
}
if (FXFT_Is_Face_Tricky(m_Face)) {
if (FXFT_Set_Char_Size(m_Face, 0, 1000 * 64, 72, 72)) {
- return FALSE;
+ return false;
}
if (FXFT_Load_Glyph(m_Face, iGlyphIndex, FXFT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH)) {
FXFT_Set_Pixel_Sizes(m_Face, 0, 64);
- return FALSE;
+ return false;
}
FXFT_Glyph glyph;
if (FXFT_Get_Glyph(m_Face->glyph, &glyph)) {
FXFT_Set_Pixel_Sizes(m_Face, 0, 64);
- return FALSE;
+ return false;
}
FXFT_BBox cbox;
FXFT_Glyph_Get_CBox(glyph, FXFT_GLYPH_BBOX_PIXELS, &cbox);
@@ -119,24 +119,24 @@ FX_BOOL CFPF_SkiaFont::GetGlyphBBox(int32_t iGlyphIndex, FX_RECT &rtBBox)
return FXFT_Set_Pixel_Sizes(m_Face, 0, 64) == 0;
}
if (FXFT_Load_Glyph(m_Face, iGlyphIndex, FXFT_LOAD_NO_SCALE | FXFT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH)) {
- return FALSE;
+ return false;
}
rtBBox.left = FPF_EM_ADJUST(FXFT_Get_Face_UnitsPerEM(m_Face), FXFT_Get_Glyph_HoriBearingX(m_Face));
rtBBox.bottom = FPF_EM_ADJUST(FXFT_Get_Face_UnitsPerEM(m_Face), FXFT_Get_Glyph_HoriBearingY(m_Face));
rtBBox.right = FPF_EM_ADJUST(FXFT_Get_Face_UnitsPerEM(m_Face), FXFT_Get_Glyph_HoriBearingX(m_Face) + FXFT_Get_Glyph_Width(m_Face));
rtBBox.top = FPF_EM_ADJUST(FXFT_Get_Face_UnitsPerEM(m_Face), FXFT_Get_Glyph_HoriBearingY(m_Face) - FXFT_Get_Glyph_Height(m_Face));
- return TRUE;
+ return true;
}
-FX_BOOL CFPF_SkiaFont::GetBBox(FX_RECT &rtBBox)
+bool CFPF_SkiaFont::GetBBox(FX_RECT &rtBBox)
{
if (!m_Face) {
- return FALSE;
+ return false;
}
rtBBox.left = FPF_EM_ADJUST(FXFT_Get_Face_UnitsPerEM(m_Face), FXFT_Get_Face_xMin(m_Face));
rtBBox.top = FPF_EM_ADJUST(FXFT_Get_Face_UnitsPerEM(m_Face), FXFT_Get_Face_yMin(m_Face));
rtBBox.right = FPF_EM_ADJUST(FXFT_Get_Face_UnitsPerEM(m_Face), FXFT_Get_Face_xMax(m_Face));
rtBBox.bottom = FPF_EM_ADJUST(FXFT_Get_Face_UnitsPerEM(m_Face), FXFT_Get_Face_yMax(m_Face));
- return TRUE;
+ return true;
}
int32_t CFPF_SkiaFont::GetHeight() const
{
@@ -167,10 +167,10 @@ FX_DWORD CFPF_SkiaFont::GetFontData(FX_DWORD dwTable, uint8_t* pBuffer, FX_DWORD
}
return pdfium::base::checked_cast<FX_DWORD>(ulSize);
}
-FX_BOOL CFPF_SkiaFont::InitFont(CFPF_SkiaFontMgr *pFontMgr, CFPF_SkiaFontDescriptor *pFontDes, const CFX_ByteStringC& bsFamily, FX_DWORD dwStyle, uint8_t uCharset)
+bool CFPF_SkiaFont::InitFont(CFPF_SkiaFontMgr *pFontMgr, CFPF_SkiaFontDescriptor *pFontDes, const CFX_ByteStringC& bsFamily, FX_DWORD dwStyle, uint8_t uCharset)
{
if (!pFontMgr || !pFontDes) {
- return FALSE;
+ return false;
}
switch (pFontDes->GetType()) {
case FPF_SKIAFONTTYPE_Path: {
@@ -189,16 +189,16 @@ FX_BOOL CFPF_SkiaFont::InitFont(CFPF_SkiaFontMgr *pFontMgr, CFPF_SkiaFontDescrip
}
break;
default:
- return FALSE;
+ return false;
}
if (!m_Face) {
- return FALSE;
+ return false;
}
m_dwStyle = dwStyle;
m_uCharset = uCharset;
m_pFontMgr = pFontMgr;
m_pFontDes = pFontDes;
m_dwRefCount = 1;
- return TRUE;
+ return true;
}
#endif
« no previous file with comments | « core/src/fxge/android/fpf_skiafont.h ('k') | core/src/fxge/android/fpf_skiafontmgr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698