summaryrefslogtreecommitdiff
path: root/core/fxge/fx_dib.h
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-04-20 15:29:25 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-20 20:12:17 +0000
commitddfc3dcce42ad1dc805f29102f7d056a5809d489 (patch)
tree686e0f28269a8d1e3c9eb2e9806f76ee2cb4b9f5 /core/fxge/fx_dib.h
parent58532b670716d5fe3ab024475fa1aa1580ecfe5b (diff)
downloadpdfium-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/fx_dib.h')
-rw-r--r--core/fxge/fx_dib.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/fxge/fx_dib.h b/core/fxge/fx_dib.h
index 17c7c8fd0a..fa38573df8 100644
--- a/core/fxge/fx_dib.h
+++ b/core/fxge/fx_dib.h
@@ -7,6 +7,9 @@
#ifndef CORE_FXGE_FX_DIB_H_
#define CORE_FXGE_FX_DIB_H_
+#include <tuple>
+#include <utility>
+
#include "core/fxcrt/fx_coordinates.h"
enum FXDIB_Format {
@@ -80,8 +83,10 @@ inline FX_CMYK CmykEncode(int c, int m, int y, int k) {
return (c << 24) | (m << 16) | (y << 8) | k;
}
-void ArgbDecode(FX_ARGB argb, int& a, int& r, int& g, int& b);
-void ArgbDecode(FX_ARGB argb, int& a, FX_COLORREF& rgb);
+// Returns tuple a, r, g, b
+std::tuple<int, int, int, int> ArgbDecode(FX_ARGB argb);
+// Returns pair a, rgb
+std::pair<int, FX_COLORREF> ArgbToColorRef(FX_ARGB argb);
inline FX_ARGB ArgbEncode(int a, int r, int g, int b) {
return (a << 24) | (r << 16) | (g << 8) | b;
}