aports/testing/flutter/unbundle-icu.patch.engine
2025-02-23 21:16:00 +00:00

75 lines
2.5 KiB
Text

--- ./flutter/shell/platform/embedder/BUILD.gn.orig
+++ ./flutter/shell/platform/embedder/BUILD.gn
@@ -458,13 +458,6 @@
]
}
- copy("copy_icu") {
- visibility = [ ":*" ]
- sources = [ "//flutter/third_party/icu/flutter/icudtl.dat" ]
- outputs =
- [ "$_flutter_embedder_framework_dir/Versions/A/Resources/icudtl.dat" ]
- }
-
action("copy_info_plist") {
script = "//flutter/build/copy_info_plist.py"
visibility = [ ":*" ]
@@ -522,7 +515,6 @@
deps = [
":copy_dylib",
":copy_framework_headers",
- ":copy_icu",
":copy_info_plist",
":copy_module_map",
]
diff --git a/flutter/impeller/toolkit/interop/BUILD.gn b/flutter/impeller/toolkit/interop/BUILD.gn
index 500410359d..a78c1fa418 100644
--- a/flutter/impeller/toolkit/interop/BUILD.gn
+++ b/flutter/impeller/toolkit/interop/BUILD.gn
@@ -5,14 +5,6 @@
import("//flutter/build/zip_bundle.gni")
import("//flutter/impeller/tools/impeller.gni")
-embed_blob("embedded_icu_data") {
- symbol_name = "embedded_icu_data"
- blob = "//flutter/third_party/icu/flutter/icudtl.dat"
- hdr = "$target_gen_dir/embedded_icu_data.h"
- cc = "$target_gen_dir/embedded_icu_data.cc"
- deps = []
-}
-
impeller_component("interop") {
sources = [
"color_filter.cc",
@@ -67,8 +59,6 @@ impeller_component("interop") {
"//flutter/fml",
"//flutter/third_party/txt",
]
-
- deps = [ ":embedded_icu_data" ]
}
impeller_component("library") {
diff --git a/flutter/impeller/toolkit/interop/typography_context.cc b/flutter/impeller/toolkit/interop/typography_context.cc
index ed863fa61e..737d087907 100644
--- a/flutter/impeller/toolkit/interop/typography_context.cc
+++ b/flutter/impeller/toolkit/interop/typography_context.cc
@@ -9,7 +9,6 @@
#include "flutter/fml/icu_util.h"
#include "flutter/third_party/txt/src/txt/platform.h"
#include "impeller/base/validation.h"
-#include "impeller/toolkit/interop/embedded_icu_data.h"
namespace impeller::interop {
@@ -17,9 +16,7 @@
: collection_(std::make_shared<txt::FontCollection>()) {
static std::once_flag sICUInitOnceFlag;
std::call_once(sICUInitOnceFlag, []() {
- auto icu_data = std::make_unique<fml::NonOwnedMapping>(
- impeller_embedded_icu_data_data, impeller_embedded_icu_data_length);
- fml::icu::InitializeICUFromMapping(std::move(icu_data));
+ fml::icu::InitializeICU("/usr/lib/flutter/icudtl.dat");
});
// The fallback for all fonts. Looks in platform specific locations.
collection_->SetupDefaultFontManager(0u);