summaryrefslogtreecommitdiff
path: root/core/fxge/dib
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-03-20 15:25:57 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-03-20 15:25:57 +0000
commit2e6405c333d8daae4e3edaa6b48f5ac5a8d7675b (patch)
treedf8f6a28b695c34407b3bbe28220584f421afc0e /core/fxge/dib
parentb3a5240832fce3f0b706c16070a1e69c2c1edb86 (diff)
downloadpdfium-2e6405c333d8daae4e3edaa6b48f5ac5a8d7675b.tar.xz
Change ArgbToColorRef() to ArgbToAlphaAndColorRef().chromium/3377
Since that is what it really returns. Add a replacement ArgbToColorRef() that only returns a FX_COLORREF, and remove a duplicate implementation. Then update callers and only use ArgbToAlphaAndColorRef() where appropriate. Also update comments to explain what FX_COLORREF is. Change-Id: I5ed3d71683898dc2b3a66395dea0ec2562c14a68 Reviewed-on: https://pdfium-review.googlesource.com/28575 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxge/dib')
-rw-r--r--core/fxge/dib/fx_dib_main.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/core/fxge/dib/fx_dib_main.cpp b/core/fxge/dib/fx_dib_main.cpp
index 161d2bd32e..5d7b585979 100644
--- a/core/fxge/dib/fx_dib_main.cpp
+++ b/core/fxge/dib/fx_dib_main.cpp
@@ -79,9 +79,12 @@ std::tuple<int, int, int, int> ArgbDecode(FX_ARGB argb) {
FXARGB_B(argb));
}
-std::pair<int, FX_COLORREF> ArgbToColorRef(FX_ARGB argb) {
- return {FXARGB_A(argb),
- FXSYS_RGB(FXARGB_R(argb), FXARGB_G(argb), FXARGB_B(argb))};
+std::pair<int, FX_COLORREF> ArgbToAlphaAndColorRef(FX_ARGB argb) {
+ return {FXARGB_A(argb), ArgbToColorRef(argb)};
+}
+
+FX_COLORREF ArgbToColorRef(FX_ARGB argb) {
+ return FXSYS_RGB(FXARGB_R(argb), FXARGB_G(argb), FXARGB_B(argb));
}
uint32_t ArgbEncode(int a, FX_COLORREF bgr) {