diff options
author | Lei Zhang <thestig@chromium.org> | 2018-05-29 18:45:39 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-29 18:45:39 +0000 |
commit | 162a31a6af1538acf7ac9835111626161287d742 (patch) | |
tree | 7235629237d6ff187e68a116604acd83c6700b1a /core/fpdfapi/render/cpdf_dibsource.cpp | |
parent | ac8357b3ec7e1fe4000ebcae5ce65a38bfeb5cb1 (diff) | |
download | pdfium-162a31a6af1538acf7ac9835111626161287d742.tar.xz |
Get rid of FXARGB_MAKE macro.
ArgbEncode() does the same thing.
Change-Id: Ibb05ed4aae720c0a5ba66771699c0d7e11230921
Reviewed-on: https://pdfium-review.googlesource.com/32230
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/render/cpdf_dibsource.cpp')
-rw-r--r-- | core/fpdfapi/render/cpdf_dibsource.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/fpdfapi/render/cpdf_dibsource.cpp b/core/fpdfapi/render/cpdf_dibsource.cpp index 4241fb1b40..3a4ca02cc2 100644 --- a/core/fpdfapi/render/cpdf_dibsource.cpp +++ b/core/fpdfapi/render/cpdf_dibsource.cpp @@ -669,8 +669,8 @@ CPDF_DIBSource::LoadState CPDF_DIBSource::StartLoadMask() { float G; float B; m_pColorSpace->GetRGB(colors.data(), &R, &G, &B); - m_MatteColor = FXARGB_MAKE(0, FXSYS_round(R * 255), FXSYS_round(G * 255), - FXSYS_round(B * 255)); + m_MatteColor = ArgbEncode(0, FXSYS_round(R * 255), FXSYS_round(G * 255), + FXSYS_round(B * 255)); } return StartLoadMaskDIB(); } @@ -1257,7 +1257,7 @@ void CPDF_DIBSource::DownSampleScanline32Bit(int orig_Bpp, // last_src_x used to store the last seen src_x position which should be // in [0, src_width). Set the initial value to be an invalid src_x value. uint32_t last_src_x = src_width; - FX_ARGB last_argb = FXARGB_MAKE(0xFF, 0xFF, 0xFF, 0xFF); + FX_ARGB last_argb = ArgbEncode(0xFF, 0xFF, 0xFF, 0xFF); float unit_To8Bpc = 255.0f / ((1 << m_bpc) - 1); for (int i = 0; i < clip_width; i++) { int dest_x = clip_left + i; @@ -1311,9 +1311,9 @@ void CPDF_DIBSource::DownSampleScanline32Bit(int orig_Bpp, const uint8_t* pSrc = m_bDefaultDecode ? pSrcPixel : extracted_components; m_pColorSpace->TranslateImageLine(color, pSrc, 1, 0, 0, bTransMask); - argb = FXARGB_MAKE(0xFF, color[2], color[1], color[0]); + argb = ArgbEncode(0xFF, color[2], color[1], color[0]); } else { - argb = FXARGB_MAKE(0xFF, pSrcPixel[2], pSrcPixel[1], pSrcPixel[0]); + argb = ArgbEncode(0xFF, pSrcPixel[2], pSrcPixel[1], pSrcPixel[0]); } if (m_bColorKey) { int alpha = 0xFF; |