diff options
author | tsepez <tsepez@chromium.org> | 2016-11-02 15:17:29 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-02 15:17:30 -0700 |
commit | 12f3e4a58f05850b93af35619cb04f0231d86acc (patch) | |
tree | 9851d8e46e5c168f5d148864caa2eebf814529dd /core/fxge/apple/fx_apple_platform.cpp | |
parent | 3b3ce1a242f8445848d3f23d6c35ba01d7c645f4 (diff) | |
download | pdfium-12f3e4a58f05850b93af35619cb04f0231d86acc.tar.xz |
Remove FX_BOOL from core
Review-Url: https://codereview.chromium.org/2477443002
Diffstat (limited to 'core/fxge/apple/fx_apple_platform.cpp')
-rw-r--r-- | core/fxge/apple/fx_apple_platform.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/core/fxge/apple/fx_apple_platform.cpp b/core/fxge/apple/fx_apple_platform.cpp index 6428c1d9e5..403ed4a12e 100644 --- a/core/fxge/apple/fx_apple_platform.cpp +++ b/core/fxge/apple/fx_apple_platform.cpp @@ -28,18 +28,18 @@ namespace { void DoNothing(void* info, const void* data, size_t size) {} -FX_BOOL CGDrawGlyphRun(CGContextRef pContext, - int nChars, - const FXTEXT_CHARPOS* pCharPos, - CFX_Font* pFont, - const CFX_Matrix* pObject2Device, - FX_FLOAT font_size, - uint32_t argb) { +bool CGDrawGlyphRun(CGContextRef pContext, + int nChars, + const FXTEXT_CHARPOS* pCharPos, + CFX_Font* pFont, + const CFX_Matrix* pObject2Device, + FX_FLOAT font_size, + uint32_t argb) { if (nChars == 0) - return TRUE; + return true; CFX_Matrix new_matrix; - FX_BOOL bNegSize = font_size < 0; + bool bNegSize = font_size < 0; if (bNegSize) font_size = -font_size; @@ -53,12 +53,12 @@ FX_BOOL CGDrawGlyphRun(CGContextRef pContext, ->m_quartz2d; if (!pFont->GetPlatformFont()) { if (pFont->GetPsName() == "DFHeiStd-W5") - return FALSE; + return false; pFont->SetPlatformFont( quartz2d.CreateFont(pFont->GetFontData(), pFont->GetSize())); if (!pFont->GetPlatformFont()) - return FALSE; + return false; } CFX_FixedBufGrow<uint16_t, 32> glyph_indices(nChars); CFX_FixedBufGrow<CGPoint, 32> glyph_positions(nChars); @@ -103,28 +103,28 @@ void CFX_AggDeviceDriver::DestroyPlatform() { } } -FX_BOOL CFX_AggDeviceDriver::DrawDeviceText(int nChars, - const FXTEXT_CHARPOS* pCharPos, - CFX_Font* pFont, - const CFX_Matrix* pObject2Device, - FX_FLOAT font_size, - uint32_t argb) { +bool CFX_AggDeviceDriver::DrawDeviceText(int nChars, + const FXTEXT_CHARPOS* pCharPos, + CFX_Font* pFont, + const CFX_Matrix* pObject2Device, + FX_FLOAT font_size, + uint32_t argb) { if (!pFont) - return FALSE; + return false; - FX_BOOL bBold = pFont->IsBold(); + bool bBold = pFont->IsBold(); if (!bBold && pFont->GetSubstFont() && pFont->GetSubstFont()->m_Weight >= 500 && pFont->GetSubstFont()->m_Weight <= 600) { - return FALSE; + return false; } for (int i = 0; i < nChars; i++) { if (pCharPos[i].m_bGlyphAdjust) - return FALSE; + return false; } CGContextRef ctx = CGContextRef(m_pPlatformGraphics); if (!ctx) - return FALSE; + return false; CGContextSaveGState(ctx); CGContextSetTextDrawingMode(ctx, kCGTextFillClip); @@ -142,7 +142,7 @@ FX_BOOL CFX_AggDeviceDriver::DrawDeviceText(int nChars, CGFloat decode_f[2] = {255.f, 0.f}; pImageCG = CGImageMaskCreate( pClipMask->GetWidth(), pClipMask->GetHeight(), 8, 8, - pClipMask->GetPitch(), pClipMaskDataProvider, decode_f, FALSE); + pClipMask->GetPitch(), pClipMaskDataProvider, decode_f, false); CGDataProviderRelease(pClipMaskDataProvider); } } else { @@ -154,8 +154,8 @@ FX_BOOL CFX_AggDeviceDriver::DrawDeviceText(int nChars, else CGContextClipToRect(ctx, rect_cg); - FX_BOOL ret = CGDrawGlyphRun(ctx, nChars, pCharPos, pFont, pObject2Device, - font_size, argb); + bool ret = CGDrawGlyphRun(ctx, nChars, pCharPos, pFont, pObject2Device, + font_size, argb); if (pImageCG) CGImageRelease(pImageCG); CGContextRestoreGState(ctx); |