Skip to content

Commit

Permalink
[fuchsia] Migrate from custom FuchsiaFontManager to SkFontMgr_fuchsia (
Browse files Browse the repository at this point in the history
…#10700)

Use Skia's own implementation of SkFontMgr for Fuchsia, for consistency with
other Skia clients on Fuchsia.

FL-290
  • Loading branch information
kpozin authored and jason-simmons committed Aug 9, 2019
1 parent e0beaff commit 70de3ec
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 758 deletions.
3 changes: 0 additions & 3 deletions ci/licenses_golden/licenses_flutter
Expand Up @@ -897,9 +897,6 @@ FILE: ../../../flutter/shell/platform/fuchsia/flutter/compositor_context.cc
FILE: ../../../flutter/shell/platform/fuchsia/flutter/compositor_context.h
FILE: ../../../flutter/shell/platform/fuchsia/flutter/engine.cc
FILE: ../../../flutter/shell/platform/fuchsia/flutter/engine.h
FILE: ../../../flutter/shell/platform/fuchsia/flutter/fuchsia_font_manager.cc
FILE: ../../../flutter/shell/platform/fuchsia/flutter/fuchsia_font_manager.h
FILE: ../../../flutter/shell/platform/fuchsia/flutter/fuchsia_font_manager_unittest.cc
FILE: ../../../flutter/shell/platform/fuchsia/flutter/isolate_configurator.cc
FILE: ../../../flutter/shell/platform/fuchsia/flutter/isolate_configurator.h
FILE: ../../../flutter/shell/platform/fuchsia/flutter/kernel/extract_far.dart
Expand Down
3 changes: 1 addition & 2 deletions shell/platform/fuchsia/flutter/BUILD.gn
Expand Up @@ -56,8 +56,6 @@ template("flutter_runner") {
"compositor_context.h",
"engine.cc",
"engine.h",
"fuchsia_font_manager.cc",
"fuchsia_font_manager.h",
"isolate_configurator.cc",
"isolate_configurator.h",
"logging.h",
Expand Down Expand Up @@ -128,6 +126,7 @@ template("flutter_runner") {
"$fuchsia_sdk_root/pkg:zx",
"$fuchsia_sdk_root/pkg/lib/sys/cpp",
"$fuchsia_sdk_root/pkg/lib/vfs/cpp",
"//third_party/skia",
"//third_party/tonic",
] + extra_deps

Expand Down
7 changes: 3 additions & 4 deletions shell/platform/fuchsia/flutter/engine.cc
Expand Up @@ -14,11 +14,10 @@
#include "flutter/runtime/dart_vm_lifecycle.h"
#include "flutter/shell/common/rasterizer.h"
#include "flutter/shell/common/run_configuration.h"
#include "runtime/dart/utils/files.h"

#include "fuchsia_font_manager.h"
#include "platform_view.h"
#include "runtime/dart/utils/files.h"
#include "task_runner_adapter.h"
#include "third_party/skia/include/ports/SkFontMgr_fuchsia.h"
#include "thread.h"

namespace flutter_runner {
Expand Down Expand Up @@ -275,7 +274,7 @@ Engine::Engine(Delegate& delegate,

// Set default font manager.
engine->GetFontCollection().GetFontCollection()->SetDefaultFontManager(
sk_make_sp<txt::FuchsiaFontManager>(std::move(sync_font_provider)));
SkFontMgr_New_Fuchsia(std::move(sync_font_provider)));

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

0 comments on commit 70de3ec

Please sign in to comment.