diff options
author | Nicolas Pena <npm@chromium.org> | 2017-04-20 15:29:25 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-20 20:12:17 +0000 |
commit | ddfc3dcce42ad1dc805f29102f7d056a5809d489 (patch) | |
tree | 686e0f28269a8d1e3c9eb2e9806f76ee2cb4b9f5 /core/fxge/dib/fx_dib_main.cpp | |
parent | 58532b670716d5fe3ab024475fa1aa1580ecfe5b (diff) | |
download | pdfium-ddfc3dcce42ad1dc805f29102f7d056a5809d489.tar.xz |
Let {Argb,Cmyk}Decode return tuples
Change-Id: Ic4e766d9417f9a9ece5f9e4269d0f96e1e91639b
Reviewed-on: https://pdfium-review.googlesource.com/4392
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxge/dib/fx_dib_main.cpp')
-rw-r--r-- | core/fxge/dib/fx_dib_main.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/core/fxge/dib/fx_dib_main.cpp b/core/fxge/dib/fx_dib_main.cpp index 97b1aa7cca..3ede85c480 100644 --- a/core/fxge/dib/fx_dib_main.cpp +++ b/core/fxge/dib/fx_dib_main.cpp @@ -6,6 +6,7 @@ #include "core/fxge/fx_dib.h" +#include <tuple> #include <utility> #include "third_party/base/ptr_util.h" @@ -72,16 +73,14 @@ FX_RECT FXDIB_SwapClipBox(FX_RECT& clip, return rect; } -void ArgbDecode(uint32_t argb, int& a, int& r, int& g, int& b) { - a = FXARGB_A(argb); - r = FXARGB_R(argb); - g = FXARGB_G(argb); - b = FXARGB_B(argb); +std::tuple<int, int, int, int> ArgbDecode(FX_ARGB argb) { + return std::make_tuple(FXARGB_A(argb), FXARGB_R(argb), FXARGB_G(argb), + FXARGB_B(argb)); } -void ArgbDecode(uint32_t argb, int& a, FX_COLORREF& rgb) { - a = FXARGB_A(argb); - rgb = FXSYS_RGB(FXARGB_R(argb), FXARGB_G(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))}; } uint32_t ArgbEncode(int a, FX_COLORREF rgb) { |