From 7fa6d7123c98519055e4c5d11f9b602d74f4bc50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20H=C4=83loiu?= Date: Thu, 25 May 2023 19:43:06 +0100 Subject: [PATCH] Dynamically link against system fontconfig (flutter/engine#40725) This is the engine counterpart for https://github.com/flutter/buildroot/pull/701. That pull-request contains more context and the main motivation for this change. This should fix some startup performance issues related to font loading on desktop linux: https://github.com/flutter/flutter/issues/118911. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- DEPS | 2 +- engine/src/flutter/third_party/txt/BUILD.gn | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/DEPS b/DEPS index b82be73a42..52cde5a2fb 100644 --- a/DEPS +++ b/DEPS @@ -256,7 +256,7 @@ allowed_hosts = [ ] deps = { - 'src': 'https://github.com/flutter/buildroot.git' + '@' + 'aee1094b10465e32972932e23b6799c3f8de244f', + 'src': 'https://github.com/flutter/buildroot.git' + '@' + 'e522d38d629d7522f0589e754886ed2b82232d9e', # Fuchsia compatibility # diff --git a/engine/src/flutter/third_party/txt/BUILD.gn b/engine/src/flutter/third_party/txt/BUILD.gn index ca3d6234f2..6abab7cba0 100644 --- a/engine/src/flutter/third_party/txt/BUILD.gn +++ b/engine/src/flutter/third_party/txt/BUILD.gn @@ -38,11 +38,6 @@ config("allow_posix_names") { } source_set("txt") { - defines = [] - if (flutter_use_fontconfig) { - defines += [ "FLUTTER_USE_FONTCONFIG" ] - } - sources = [ "src/skia/paragraph_builder_skia.cc", "src/skia/paragraph_builder_skia.h", @@ -96,8 +91,9 @@ source_set("txt") { "//third_party/skia/modules/skparagraph", ] + libs = [] if (flutter_use_fontconfig) { - deps += [ "//third_party/fontconfig" ] + libs += [ "fontconfig" ] } if (is_mac || is_ios) {