From 12f3e4a58f05850b93af35619cb04f0231d86acc Mon Sep 17 00:00:00 2001 From: tsepez Date: Wed, 2 Nov 2016 15:17:29 -0700 Subject: Remove FX_BOOL from core Review-Url: https://codereview.chromium.org/2477443002 --- core/fxge/apple/fx_apple_platform.cpp | 50 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'core/fxge/apple/fx_apple_platform.cpp') 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 glyph_indices(nChars); CFX_FixedBufGrow 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); -- cgit v1.2.3