RepositoryExternal.mk        |    1 +
 vcl/headless/CairoCommon.cxx |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 84ed46d7ee195e7bb10b7e480dc596c76f4af40f
Author:     Caolán McNamara <[email protected]>
AuthorDate: Thu Oct 17 12:53:12 2024 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Thu Oct 17 17:49:07 2024 +0200

    don't need to use dlsym for cairo_surface_set_device_scale...
    
    for bundled cairo case
    
    Change-Id: I8ca48433b3be144d8347defe3831b92cc87d7cbe
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175081
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 4a421d6f08e6..23e397263254 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1188,6 +1188,7 @@ define gb_LinkTarget__use_cairo
 $(call gb_LinkTarget_set_include,$(1),\
        $$(INCLUDE) \
        $(CAIRO_CFLAGS) \
+       -DSYSTEM_CAIRO \
 )
 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
diff --git a/vcl/headless/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx
index f72046ddda53..a0c780d755b5 100644
--- a/vcl/headless/CairoCommon.cxx
+++ b/vcl/headless/CairoCommon.cxx
@@ -39,7 +39,7 @@
 
 void dl_cairo_surface_set_device_scale(cairo_surface_t* surface, double 
x_scale, double y_scale)
 {
-#if !HAVE_DLAPI
+#if !HAVE_DLAPI || !defined(SYSTEM_CAIRO)
     cairo_surface_set_device_scale(surface, x_scale, y_scale);
 #else
     static auto func = reinterpret_cast<void (*)(cairo_surface_t*, double, 
double)>(
@@ -51,7 +51,7 @@ void dl_cairo_surface_set_device_scale(cairo_surface_t* 
surface, double x_scale,
 
 void dl_cairo_surface_get_device_scale(cairo_surface_t* surface, double* 
x_scale, double* y_scale)
 {
-#if !HAVE_DLAPI
+#if !HAVE_DLAPI || !defined(SYSTEM_CAIRO)
     cairo_surface_get_device_scale(surface, x_scale, y_scale);
 #else
     static auto func = reinterpret_cast<void (*)(cairo_surface_t*, double*, 
double*)>(

Reply via email to