summaryrefslogtreecommitdiff
path: root/core/fxge/android
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-11-02 15:17:29 -0700
committerCommit bot <commit-bot@chromium.org>2016-11-02 15:17:30 -0700
commit12f3e4a58f05850b93af35619cb04f0231d86acc (patch)
tree9851d8e46e5c168f5d148864caa2eebf814529dd /core/fxge/android
parent3b3ce1a242f8445848d3f23d6c35ba01d7c645f4 (diff)
downloadpdfium-12f3e4a58f05850b93af35619cb04f0231d86acc.tar.xz
Remove FX_BOOL from core
Review-Url: https://codereview.chromium.org/2477443002
Diffstat (limited to 'core/fxge/android')
-rw-r--r--core/fxge/android/cfpf_skiafont.cpp38
-rw-r--r--core/fxge/android/cfpf_skiafont.h14
-rw-r--r--core/fxge/android/cfx_androidfontinfo.cpp24
-rw-r--r--core/fxge/android/cfx_androidfontinfo.h10
4 files changed, 43 insertions, 43 deletions
diff --git a/core/fxge/android/cfpf_skiafont.cpp b/core/fxge/android/cfpf_skiafont.cpp
index c7cfd4d324..5e11efae9d 100644
--- a/core/fxge/android/cfpf_skiafont.cpp
+++ b/core/fxge/android/cfpf_skiafont.cpp
@@ -87,21 +87,21 @@ int32_t CFPF_SkiaFont::GetDescent() const {
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,7 +119,7 @@ FX_BOOL CFPF_SkiaFont::GetGlyphBBox(int32_t iGlyphIndex, FX_RECT& rtBBox) {
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));
@@ -131,12 +131,12 @@ FX_BOOL CFPF_SkiaFont::GetGlyphBBox(int32_t iGlyphIndex, FX_RECT& rtBBox) {
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));
@@ -146,7 +146,7 @@ FX_BOOL CFPF_SkiaFont::GetBBox(FX_RECT& rtBBox) {
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 {
@@ -179,13 +179,13 @@ uint32_t CFPF_SkiaFont::GetFontData(uint32_t dwTable,
return pdfium::base::checked_cast<uint32_t>(ulSize);
}
-FX_BOOL CFPF_SkiaFont::InitFont(CFPF_SkiaFontMgr* pFontMgr,
- CFPF_SkiaFontDescriptor* pFontDes,
- const CFX_ByteStringC& bsFamily,
- uint32_t dwStyle,
- uint8_t uCharset) {
+bool CFPF_SkiaFont::InitFont(CFPF_SkiaFontMgr* pFontMgr,
+ CFPF_SkiaFontDescriptor* pFontDes,
+ const CFX_ByteStringC& bsFamily,
+ uint32_t dwStyle,
+ uint8_t uCharset) {
if (!pFontMgr || !pFontDes)
- return FALSE;
+ return false;
switch (pFontDes->GetType()) {
case FPF_SKIAFONTTYPE_Path: {
@@ -205,15 +205,15 @@ FX_BOOL CFPF_SkiaFont::InitFont(CFPF_SkiaFontMgr* pFontMgr,
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;
}
diff --git a/core/fxge/android/cfpf_skiafont.h b/core/fxge/android/cfpf_skiafont.h
index ad0245d5d6..b72c111177 100644
--- a/core/fxge/android/cfpf_skiafont.h
+++ b/core/fxge/android/cfpf_skiafont.h
@@ -29,17 +29,17 @@ class CFPF_SkiaFont {
int32_t GetGlyphWidth(int32_t iGlyphIndex);
int32_t GetAscent() const;
int32_t GetDescent() const;
- FX_BOOL GetGlyphBBox(int32_t iGlyphIndex, FX_RECT& rtBBox);
- FX_BOOL GetBBox(FX_RECT& rtBBox);
+ bool GetGlyphBBox(int32_t iGlyphIndex, FX_RECT& rtBBox);
+ bool GetBBox(FX_RECT& rtBBox);
int32_t GetHeight() const;
int32_t GetItalicAngle() const;
uint32_t GetFontData(uint32_t dwTable, uint8_t* pBuffer, uint32_t dwSize);
- FX_BOOL InitFont(CFPF_SkiaFontMgr* pFontMgr,
- CFPF_SkiaFontDescriptor* pFontDes,
- const CFX_ByteStringC& bsFamily,
- uint32_t dwStyle,
- uint8_t uCharset);
+ bool InitFont(CFPF_SkiaFontMgr* pFontMgr,
+ CFPF_SkiaFontDescriptor* pFontDes,
+ const CFX_ByteStringC& bsFamily,
+ uint32_t dwStyle,
+ uint8_t uCharset);
private:
CFPF_SkiaFontMgr* m_pFontMgr;
diff --git a/core/fxge/android/cfx_androidfontinfo.cpp b/core/fxge/android/cfx_androidfontinfo.cpp
index 6db46e2775..03a7ffbd9e 100644
--- a/core/fxge/android/cfx_androidfontinfo.cpp
+++ b/core/fxge/android/cfx_androidfontinfo.cpp
@@ -13,21 +13,21 @@
CFX_AndroidFontInfo::CFX_AndroidFontInfo() : m_pFontMgr(nullptr) {}
CFX_AndroidFontInfo::~CFX_AndroidFontInfo() {}
-FX_BOOL CFX_AndroidFontInfo::Init(CFPF_SkiaFontMgr* pFontMgr) {
+bool CFX_AndroidFontInfo::Init(CFPF_SkiaFontMgr* pFontMgr) {
if (!pFontMgr)
- return FALSE;
+ return false;
pFontMgr->LoadSystemFonts();
m_pFontMgr = pFontMgr;
- return TRUE;
+ return true;
}
-FX_BOOL CFX_AndroidFontInfo::EnumFontList(CFX_FontMapper* pMapper) {
- return FALSE;
+bool CFX_AndroidFontInfo::EnumFontList(CFX_FontMapper* pMapper) {
+ return false;
}
void* CFX_AndroidFontInfo::MapFont(int weight,
- FX_BOOL bItalic,
+ bool bItalic,
int charset,
int pitch_family,
const FX_CHAR* face,
@@ -63,20 +63,20 @@ uint32_t CFX_AndroidFontInfo::GetFontData(void* hFont,
return static_cast<CFPF_SkiaFont*>(hFont)->GetFontData(table, buffer, size);
}
-FX_BOOL CFX_AndroidFontInfo::GetFaceName(void* hFont, CFX_ByteString& name) {
+bool CFX_AndroidFontInfo::GetFaceName(void* hFont, CFX_ByteString& name) {
if (!hFont)
- return FALSE;
+ return false;
name = static_cast<CFPF_SkiaFont*>(hFont)->GetFamilyName();
- return TRUE;
+ return true;
}
-FX_BOOL CFX_AndroidFontInfo::GetFontCharset(void* hFont, int& charset) {
+bool CFX_AndroidFontInfo::GetFontCharset(void* hFont, int& charset) {
if (!hFont)
- return FALSE;
+ return false;
charset = static_cast<CFPF_SkiaFont*>(hFont)->GetCharset();
- return FALSE;
+ return false;
}
void CFX_AndroidFontInfo::DeleteFont(void* hFont) {
diff --git a/core/fxge/android/cfx_androidfontinfo.h b/core/fxge/android/cfx_androidfontinfo.h
index 135a2cdae7..94e1db88ac 100644
--- a/core/fxge/android/cfx_androidfontinfo.h
+++ b/core/fxge/android/cfx_androidfontinfo.h
@@ -19,12 +19,12 @@ class CFX_AndroidFontInfo : public IFX_SystemFontInfo {
CFX_AndroidFontInfo();
~CFX_AndroidFontInfo() override;
- FX_BOOL Init(CFPF_SkiaFontMgr* pFontMgr);
+ bool Init(CFPF_SkiaFontMgr* pFontMgr);
// IFX_SystemFontInfo:
- FX_BOOL EnumFontList(CFX_FontMapper* pMapper) override;
+ bool EnumFontList(CFX_FontMapper* pMapper) override;
void* MapFont(int weight,
- FX_BOOL bItalic,
+ bool bItalic,
int charset,
int pitch_family,
const FX_CHAR* face,
@@ -34,8 +34,8 @@ class CFX_AndroidFontInfo : public IFX_SystemFontInfo {
uint32_t table,
uint8_t* buffer,
uint32_t size) override;
- FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) override;
- FX_BOOL GetFontCharset(void* hFont, int& charset) override;
+ bool GetFaceName(void* hFont, CFX_ByteString& name) override;
+ bool GetFontCharset(void* hFont, int& charset) override;
void DeleteFont(void* hFont) override;
protected: