Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 70de3ec

Browse files
kpozinjason-simmons
authored andcommitted
[fuchsia] Migrate from custom FuchsiaFontManager to SkFontMgr_fuchsia (#10700)
Use Skia's own implementation of SkFontMgr for Fuchsia, for consistency with other Skia clients on Fuchsia. FL-290
1 parent e0beaff commit 70de3ec

File tree

7 files changed

+4
-758
lines changed

7 files changed

+4
-758
lines changed

ci/licenses_golden/licenses_flutter

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -897,9 +897,6 @@ FILE: ../../../flutter/shell/platform/fuchsia/flutter/compositor_context.cc
897897
FILE: ../../../flutter/shell/platform/fuchsia/flutter/compositor_context.h
898898
FILE: ../../../flutter/shell/platform/fuchsia/flutter/engine.cc
899899
FILE: ../../../flutter/shell/platform/fuchsia/flutter/engine.h
900-
FILE: ../../../flutter/shell/platform/fuchsia/flutter/fuchsia_font_manager.cc
901-
FILE: ../../../flutter/shell/platform/fuchsia/flutter/fuchsia_font_manager.h
902-
FILE: ../../../flutter/shell/platform/fuchsia/flutter/fuchsia_font_manager_unittest.cc
903900
FILE: ../../../flutter/shell/platform/fuchsia/flutter/isolate_configurator.cc
904901
FILE: ../../../flutter/shell/platform/fuchsia/flutter/isolate_configurator.h
905902
FILE: ../../../flutter/shell/platform/fuchsia/flutter/kernel/extract_far.dart

shell/platform/fuchsia/flutter/BUILD.gn

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ template("flutter_runner") {
5656
"compositor_context.h",
5757
"engine.cc",
5858
"engine.h",
59-
"fuchsia_font_manager.cc",
60-
"fuchsia_font_manager.h",
6159
"isolate_configurator.cc",
6260
"isolate_configurator.h",
6361
"logging.h",
@@ -128,6 +126,7 @@ template("flutter_runner") {
128126
"$fuchsia_sdk_root/pkg:zx",
129127
"$fuchsia_sdk_root/pkg/lib/sys/cpp",
130128
"$fuchsia_sdk_root/pkg/lib/vfs/cpp",
129+
"//third_party/skia",
131130
"//third_party/tonic",
132131
] + extra_deps
133132

shell/platform/fuchsia/flutter/engine.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
#include "flutter/runtime/dart_vm_lifecycle.h"
1515
#include "flutter/shell/common/rasterizer.h"
1616
#include "flutter/shell/common/run_configuration.h"
17-
#include "runtime/dart/utils/files.h"
18-
19-
#include "fuchsia_font_manager.h"
2017
#include "platform_view.h"
18+
#include "runtime/dart/utils/files.h"
2119
#include "task_runner_adapter.h"
20+
#include "third_party/skia/include/ports/SkFontMgr_fuchsia.h"
2221
#include "thread.h"
2322

2423
namespace flutter_runner {
@@ -275,7 +274,7 @@ Engine::Engine(Delegate& delegate,
275274

276275
// Set default font manager.
277276
engine->GetFontCollection().GetFontCollection()->SetDefaultFontManager(
278-
sk_make_sp<txt::FuchsiaFontManager>(std::move(sync_font_provider)));
277+
SkFontMgr_New_Fuchsia(std::move(sync_font_provider)));
279278

280279
if (engine->Run(std::move(run_configuration)) ==
281280
flutter::Engine::RunStatus::Failure) {

0 commit comments

Comments
 (0)