summaryrefslogtreecommitdiff
path: root/vcl/headless
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/headless')
-rw-r--r--vcl/headless/CairoCommon.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/vcl/headless/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx
index 163007e46823..f72046ddda53 100644
--- a/vcl/headless/CairoCommon.cxx
+++ b/vcl/headless/CairoCommon.cxx
@@ -558,15 +558,15 @@ void CairoCommon::doXorOnRelease(sal_Int32 nExtentsLeft, sal_Int32 nExtentsTop,
sal_uInt8 a = true_data[SVP_CAIRO_ALPHA];
sal_uInt8 xor_a = xor_data[SVP_CAIRO_ALPHA];
#if ENABLE_WASM_STRIP_PREMULTIPLY
- sal_uInt8 b = vcl::bitmap::unpremultiply(a, true_data[SVP_CAIRO_BLUE])
- ^ vcl::bitmap::unpremultiply(xor_a, xor_data[SVP_CAIRO_BLUE]);
- sal_uInt8 g = vcl::bitmap::unpremultiply(a, true_data[SVP_CAIRO_GREEN])
- ^ vcl::bitmap::unpremultiply(xor_a, xor_data[SVP_CAIRO_GREEN]);
- sal_uInt8 r = vcl::bitmap::unpremultiply(a, true_data[SVP_CAIRO_RED])
- ^ vcl::bitmap::unpremultiply(xor_a, xor_data[SVP_CAIRO_RED]);
- true_data[SVP_CAIRO_BLUE] = vcl::bitmap::premultiply(a, b);
- true_data[SVP_CAIRO_GREEN] = vcl::bitmap::premultiply(a, g);
- true_data[SVP_CAIRO_RED] = vcl::bitmap::premultiply(a, r);
+ sal_uInt8 b = vcl::bitmap::unpremultiply(true_data[SVP_CAIRO_BLUE], a)
+ ^ vcl::bitmap::unpremultiply(xor_data[SVP_CAIRO_BLUE], xor_a);
+ sal_uInt8 g = vcl::bitmap::unpremultiply(true_data[SVP_CAIRO_GREEN], a)
+ ^ vcl::bitmap::unpremultiply(xor_data[SVP_CAIRO_GREEN], xor_a);
+ sal_uInt8 r = vcl::bitmap::unpremultiply(true_data[SVP_CAIRO_RED], a)
+ ^ vcl::bitmap::unpremultiply(xor_data[SVP_CAIRO_RED], xor_a);
+ true_data[SVP_CAIRO_BLUE] = vcl::bitmap::premultiply(b, a);
+ true_data[SVP_CAIRO_GREEN] = vcl::bitmap::premultiply(g, a);
+ true_data[SVP_CAIRO_RED] = vcl::bitmap::premultiply(r, a);
#else
sal_uInt8 b = unpremultiply_table[a][true_data[SVP_CAIRO_BLUE]]
^ unpremultiply_table[xor_a][xor_data[SVP_CAIRO_BLUE]];
@@ -731,9 +731,9 @@ Color CairoCommon::getPixel(cairo_surface_t* pSurface, tools::Long nX, tools::Lo
unsigned char* data = cairo_image_surface_get_data(target);
sal_uInt8 a = data[SVP_CAIRO_ALPHA];
#if ENABLE_WASM_STRIP_PREMULTIPLY
- sal_uInt8 b = vcl::bitmap::unpremultiply(a, data[SVP_CAIRO_BLUE]);
- sal_uInt8 g = vcl::bitmap::unpremultiply(a, data[SVP_CAIRO_GREEN]);
- sal_uInt8 r = vcl::bitmap::unpremultiply(a, data[SVP_CAIRO_RED]);
+ sal_uInt8 b = vcl::bitmap::unpremultiply(data[SVP_CAIRO_BLUE], a);
+ sal_uInt8 g = vcl::bitmap::unpremultiply(data[SVP_CAIRO_GREEN], a);
+ sal_uInt8 r = vcl::bitmap::unpremultiply(data[SVP_CAIRO_RED], a);
#else
sal_uInt8 b = unpremultiply_table[a][data[SVP_CAIRO_BLUE]];
sal_uInt8 g = unpremultiply_table[a][data[SVP_CAIRO_GREEN]];
@@ -1840,9 +1840,9 @@ void CairoCommon::drawMask(const SalTwoRect& rTR, const SalBitmap& rSalBitmap, C
{
sal_uInt8 a = data[SVP_CAIRO_ALPHA];
#if ENABLE_WASM_STRIP_PREMULTIPLY
- sal_uInt8 b = vcl::bitmap::unpremultiply(a, data[SVP_CAIRO_BLUE]);
- sal_uInt8 g = vcl::bitmap::unpremultiply(a, data[SVP_CAIRO_GREEN]);
- sal_uInt8 r = vcl::bitmap::unpremultiply(a, data[SVP_CAIRO_RED]);
+ sal_uInt8 b = vcl::bitmap::unpremultiply(data[SVP_CAIRO_BLUE], a);
+ sal_uInt8 g = vcl::bitmap::unpremultiply(data[SVP_CAIRO_GREEN], a);
+ sal_uInt8 r = vcl::bitmap::unpremultiply(data[SVP_CAIRO_RED], a);
#else
sal_uInt8 b = unpremultiply_table[a][data[SVP_CAIRO_BLUE]];
sal_uInt8 g = unpremultiply_table[a][data[SVP_CAIRO_GREEN]];