summaryrefslogtreecommitdiff
path: root/core/fxge/dib/cfx_scanlinecompositor.cpp
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-04-04 12:12:49 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-04 16:25:29 +0000
commit37cc5fb6b3407ce8e079bc1bdd0606713b975532 (patch)
treea816f60f67dc4deb6db42aa98b5aca4a419243ff /core/fxge/dib/cfx_scanlinecompositor.cpp
parent29479f6380942515b06240c4933bf3b4cf502013 (diff)
downloadpdfium-37cc5fb6b3407ce8e079bc1bdd0606713b975532.tar.xz
Finish splitting up fx_dib.h
After this CL, fx_dib.h only has some definitions used in multiple places. Definitions that were of restricted usage were moved out to the corresponding place. Includes in fx_dib were reduced, thus revealing other needed includes. Change-Id: I3607da0af81c491256d64c0aa085225631efbdcc Reviewed-on: https://pdfium-review.googlesource.com/3594 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxge/dib/cfx_scanlinecompositor.cpp')
-rw-r--r--core/fxge/dib/cfx_scanlinecompositor.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/fxge/dib/cfx_scanlinecompositor.cpp b/core/fxge/dib/cfx_scanlinecompositor.cpp
index ff7dd06c3e..f8f0b14090 100644
--- a/core/fxge/dib/cfx_scanlinecompositor.cpp
+++ b/core/fxge/dib/cfx_scanlinecompositor.cpp
@@ -11,6 +11,15 @@
#include "core/fxcodec/fx_codec.h"
#include "core/fxge/cfx_gemodule.h"
+#define FX_CCOLOR(val) (255 - (val))
+#define FXDIB_ALPHA_UNION(dest, src) ((dest) + (src) - (dest) * (src) / 255)
+#define FXARGB_COPY(dest, src) \
+ *(dest) = *(src), *((dest) + 1) = *((src) + 1), \
+ *((dest) + 2) = *((src) + 2), *((dest) + 3) = *((src) + 3)
+#define FXARGB_RGBORDERCOPY(dest, src) \
+ *((dest) + 3) = *((src) + 3), *(dest) = *((src) + 2), \
+ *((dest) + 1) = *((src) + 1), *((dest) + 2) = *((src))
+
namespace {
const uint8_t color_sqrt[256] = {