Skip to content

Commit

Permalink
[Fuchsia] Use SkFontMgr_Fuchsia instead of FuchsiaFontManager
Browse files Browse the repository at this point in the history
Skia now contains SkFontMgr implementation for Fuchsia. Updated
SkFontMgr::Factory() to use it and removed the old implementation from
//skia/ext. The new implementation adds some features that were
previously missing, particularly font collection and character
matching.

Bug: 900395
Change-Id: I545bb33b20d34e3ab02b04f6a1b705e5420d65d7
Reviewed-on: https://chromium-review.googlesource.com/c/1370500
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615626}
  • Loading branch information
SergeyUlanov authored and Commit Bot committed Dec 11, 2018
1 parent 947e0b1 commit a02ef2b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 519 deletions.
4 changes: 2 additions & 2 deletions skia/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -485,13 +485,13 @@ component("skia") {
if (is_fuchsia) {
sources += [
"//third_party/skia/src/ports/SkFontMgr_custom.cpp",
"//third_party/skia/src/ports/SkFontMgr_fuchsia.cpp",
"ext/fontmgr_default_fuchsia.cc",
"ext/fontmgr_default_fuchsia.h",
"ext/fontmgr_fuchsia.cc",
"ext/fontmgr_fuchsia.h",
]
deps += [
"//third_party/fuchsia-sdk/sdk:fonts",
"//third_party/fuchsia-sdk/sdk:zx",
"//third_party/icu:icuuc",
]
}
Expand Down
5 changes: 3 additions & 2 deletions skia/ext/fontmgr_default_fuchsia.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
#include <fuchsia/fonts/cpp/fidl.h>

#include "base/fuchsia/component_context.h"
#include "skia/ext/fontmgr_fuchsia.h"
#include "third_party/skia/include/core/SkFontMgr.h"
#include "third_party/skia/include/ports/SkFontMgr_fuchsia.h"

namespace {
// This is a purposefully leaky pointer that has ownership of the FontMgr.
Expand All @@ -23,7 +24,7 @@ SK_API sk_sp<SkFontMgr> SkFontMgr::Factory() {
if (g_default_fontmgr) {
return sk_ref_sp(g_default_fontmgr);
}
return sk_make_sp<skia::FuchsiaFontManager>(
return SkFontMgr_New_Fuchsia(
base::fuchsia::ComponentContext::GetDefault()
->ConnectToServiceSync<fuchsia::fonts::Provider>());
}
339 changes: 0 additions & 339 deletions skia/ext/fontmgr_fuchsia.cc

This file was deleted.

Loading

0 comments on commit a02ef2b

Please sign in to comment.