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_renderstatus.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_renderstatus.cpp')
-rw-r--r-- | core/fpdfapi/render/cpdf_renderstatus.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp index f99000bb69..d63d321b9f 100644 --- a/core/fpdfapi/render/cpdf_renderstatus.cpp +++ b/core/fpdfapi/render/cpdf_renderstatus.cpp @@ -171,8 +171,8 @@ void DrawAxialShading(const RetainPtr<CFX_DIBitmap>& pBitmap, float B = 0.0f; pCS->GetRGB(pResults, &R, &G, &B); rgb_array[i] = - FXARGB_TODIB(FXARGB_MAKE(alpha, FXSYS_round(R * 255), - FXSYS_round(G * 255), FXSYS_round(B * 255))); + FXARGB_TODIB(ArgbEncode(alpha, FXSYS_round(R * 255), + FXSYS_round(G * 255), FXSYS_round(B * 255))); } int pitch = pBitmap->GetPitch(); CFX_Matrix matrix = pObject2Bitmap->GetInverse(); @@ -257,8 +257,8 @@ void DrawRadialShading(const RetainPtr<CFX_DIBitmap>& pBitmap, float B = 0.0f; pCS->GetRGB(pResults, &R, &G, &B); rgb_array[i] = - FXARGB_TODIB(FXARGB_MAKE(alpha, FXSYS_round(R * 255), - FXSYS_round(G * 255), FXSYS_round(B * 255))); + FXARGB_TODIB(ArgbEncode(alpha, FXSYS_round(R * 255), + FXSYS_round(G * 255), FXSYS_round(B * 255))); } float a = ((start_x - end_x) * (start_x - end_x)) + ((start_y - end_y) * (start_y - end_y)) - @@ -392,7 +392,7 @@ void DrawFuncShading(const RetainPtr<CFX_DIBitmap>& pBitmap, float G = 0.0f; float B = 0.0f; pCS->GetRGB(pResults, &R, &G, &B); - dib_buf[column] = FXARGB_TODIB(FXARGB_MAKE( + dib_buf[column] = FXARGB_TODIB(ArgbEncode( alpha, (int32_t)(R * 255), (int32_t)(G * 255), (int32_t)(B * 255))); } } @@ -489,8 +489,8 @@ void DrawGouraud(const RetainPtr<CFX_DIBitmap>& pBitmap, G += g_unit; B += b_unit; FXARGB_SETDIB(dib_buf, - FXARGB_MAKE(alpha, (int32_t)(R * 255), (int32_t)(G * 255), - (int32_t)(B * 255))); + ArgbEncode(alpha, (int32_t)(R * 255), (int32_t)(G * 255), + (int32_t)(B * 255))); dib_buf += 4; } } @@ -799,8 +799,8 @@ struct CPDF_PatchDrawer { } pDevice->DrawPath( &path, nullptr, nullptr, - FXARGB_MAKE(alpha, div_colors[0].comp[0], div_colors[0].comp[1], - div_colors[0].comp[2]), + ArgbEncode(alpha, div_colors[0].comp[0], div_colors[0].comp[1], + div_colors[0].comp[2]), 0, fillFlags); } else { if (d_bottom < COONCOLOR_THRESHOLD && d_top < COONCOLOR_THRESHOLD) { |