summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-04-25 20:03:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-04-26 11:37:08 +0200
commit90057e372cd07b41c8dbba4e7b7f107568a5f451 (patch)
tree51c49e09858d566c783e8efdee807eb1ff3a8e27
parent44cab8856db1a2b5cbf09522b513d876c491a7e9 (diff)
Related: tdf#148433 test if CAIRO_OPERATOR_DIFFERENCE is the problem
export SAL_DISABLE_CAIRO_DIFFERENCE=1 to experiment with this Change-Id: I61ec30c818727cb6ab382b4cf9fe9bd29d8d179d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133419 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/headless/CairoCommon.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/vcl/headless/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx
index cc5d9df10243..02c281fea3cb 100644
--- a/vcl/headless/CairoCommon.cxx
+++ b/vcl/headless/CairoCommon.cxx
@@ -957,6 +957,13 @@ cairo_pattern_t* create_stipple()
}
} // end anonymous ns
+namespace
+{
+// check for env var that deciding to disable CAIRO_OPERATOR_DIFFERENCE
+const char* pDisableDifference(getenv("SAL_DISABLE_CAIRO_DIFFERENCE"));
+bool bDisableDifference(nullptr != pDisableDifference);
+}
+
#if defined CAIRO_VERSION && CAIRO_VERSION < CAIRO_VERSION_ENCODE(1, 10, 0)
#define CAIRO_OPERATOR_DIFFERENCE (static_cast<cairo_operator_t>(23))
#endif
@@ -973,7 +980,7 @@ void CairoCommon::invert(const basegfx::B2DPolygon& rPoly, SalInvert nFlags, boo
cairo_set_source_rgb(cr, 1.0, 1.0, 1.0);
- if (cairo_version() >= CAIRO_VERSION_ENCODE(1, 10, 0))
+ if (cairo_version() >= CAIRO_VERSION_ENCODE(1, 10, 0) && !bDisableDifference)
{
cairo_set_operator(cr, CAIRO_OPERATOR_DIFFERENCE);
}