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

New commits:
commit 71858e5e55a7b4fe3501df463a69cd5c0e9d4c7f
Author:     Caolán McNamara <[email protected]>
AuthorDate: Thu Oct 17 12:53:12 2024 +0100
Commit:     Noel Grandin <[email protected]>
CommitDate: Thu Oct 17 19:26:11 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/+/175042
    Reviewed-by: Noel Grandin <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 4d40129c0ab7..c4387142c067 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 2af8e0d892e2..3e8901cf9f2e 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