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/fpdfapi/render/cpdf_type3cache.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/fpdfapi/render/cpdf_type3cache.cpp')
-rw-r--r-- | core/fpdfapi/render/cpdf_type3cache.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/core/fpdfapi/render/cpdf_type3cache.cpp b/core/fpdfapi/render/cpdf_type3cache.cpp index 7fe552108d..ba92142dbf 100644 --- a/core/fpdfapi/render/cpdf_type3cache.cpp +++ b/core/fpdfapi/render/cpdf_type3cache.cpp @@ -34,24 +34,24 @@ void CPDF_UniqueKeyGen::Generate(int count, ...) { m_KeyLen = count * sizeof(uint32_t); } -FX_BOOL IsScanLine1bpp(uint8_t* pBuf, int width) { +bool IsScanLine1bpp(uint8_t* pBuf, int width) { int size = width / 8; for (int i = 0; i < size; i++) { if (pBuf[i]) - return TRUE; + return true; } return (width % 8) && (pBuf[width / 8] & (0xff << (8 - width % 8))); } -FX_BOOL IsScanLine8bpp(uint8_t* pBuf, int width) { +bool IsScanLine8bpp(uint8_t* pBuf, int width) { for (int i = 0; i < width; i++) { if (pBuf[i] > 0x40) - return TRUE; + return true; } - return FALSE; + return false; } -int DetectFirstLastScan(const CFX_DIBitmap* pBitmap, FX_BOOL bFirst) { +int DetectFirstLastScan(const CFX_DIBitmap* pBitmap, bool bFirst) { int height = pBitmap->GetHeight(); int pitch = pBitmap->GetPitch(); int width = pBitmap->GetWidth(); @@ -131,12 +131,12 @@ CFX_GlyphBitmap* CPDF_Type3Cache::RenderGlyph(CPDF_Type3Glyphs* pSize, int top = 0; if (FXSYS_fabs(image_matrix.b) < FXSYS_fabs(image_matrix.a) / 100 && FXSYS_fabs(image_matrix.c) < FXSYS_fabs(image_matrix.d) / 100) { - int top_line = DetectFirstLastScan(pBitmap, TRUE); - int bottom_line = DetectFirstLastScan(pBitmap, FALSE); + int top_line = DetectFirstLastScan(pBitmap, true); + int bottom_line = DetectFirstLastScan(pBitmap, false); if (top_line == 0 && bottom_line == pBitmap->GetHeight() - 1) { FX_FLOAT top_y = image_matrix.d + image_matrix.f; FX_FLOAT bottom_y = image_matrix.f; - FX_BOOL bFlipped = top_y > bottom_y; + bool bFlipped = top_y > bottom_y; if (bFlipped) { FX_FLOAT temp = top_y; top_y = bottom_y; |