Skip to content

Commit 60642a1

Browse files
jason-simmons0xZOne
authored andcommitted
Remove Libtxt and Minikin (flutter#39499)
1 parent fa1faba commit 60642a1

File tree

190 files changed

+40
-32660
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+40
-32660
lines changed

ci/licenses_golden/excluded_files

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,6 @@
398398
../../../flutter/third_party/txt/.clang-format
399399
../../../flutter/third_party/txt/.gitattributes
400400
../../../flutter/third_party/txt/.gitignore
401-
../../../flutter/third_party/txt/PATENTS
402401
../../../flutter/third_party/txt/tests
403402
../../../flutter/third_party/txt/third_party/fonts
404403
../../../flutter/third_party/web_locale_keymap/CHANGELOG.md

ci/licenses_golden/licenses_flutter

Lines changed: 0 additions & 116 deletions
Large diffs are not rendered by default.

common/config.gni

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@ declare_args() {
1414
# The runtime mode ("debug", "profile", "release", or "jit_release")
1515
flutter_runtime_mode = "debug"
1616

17-
# Whether to link the Skia text shaper module into the engine
18-
flutter_enable_skshaper = false
19-
20-
# Whether to use the Skia text shaper module for all text rendering
21-
flutter_always_use_skshaper = false
22-
2317
# Whether to use a prebuilt Dart SDK instead of building one.
2418
flutter_prebuilt_dart_sdk = false
2519

common/settings.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,6 @@ struct Settings {
205205
// manager before creating the engine.
206206
bool prefetched_default_font_manager = false;
207207

208-
// Selects the SkParagraph implementation of the text layout engine.
209-
bool enable_skparagraph = false;
210-
211208
// Enable the rendering of colors outside of the sRGB gamut.
212209
bool enable_wide_gamut = false;
213210

lib/ui/BUILD.gn

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,6 @@ source_set("ui") {
182182
if (!defined(defines)) {
183183
defines = []
184184
}
185-
if (flutter_enable_skshaper) {
186-
defines += [ "FLUTTER_ENABLE_SKSHAPER" ]
187-
}
188-
if (flutter_always_use_skshaper) {
189-
defines += [ "FLUTTER_ALWAYS_USE_SKSHAPER" ]
190-
}
191185
if (is_win) {
192186
# Required for M_PI and others.
193187
defines += [ "_USE_MATH_DEFINES" ]

lib/ui/text/paragraph.cc

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,8 @@ void Paragraph::paint(Canvas* canvas, double x, double y) {
6565
}
6666

6767
DisplayListBuilder* builder = canvas->builder();
68-
if (builder && m_paragraph->Paint(builder, x, y)) {
69-
return;
70-
}
71-
// Fall back to SkCanvas if painting to DisplayListBuilder is not supported.
72-
SkCanvas* sk_canvas = canvas->canvas();
73-
if (sk_canvas) {
74-
m_paragraph->Paint(sk_canvas, x, y);
68+
if (builder) {
69+
m_paragraph->Paint(builder, x, y);
7570
}
7671
}
7772

lib/ui/text/paragraph_builder.cc

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -297,23 +297,8 @@ ParagraphBuilder::ParagraphBuilder(
297297
->client()
298298
->GetFontCollection();
299299

300-
typedef std::unique_ptr<txt::ParagraphBuilder> (*ParagraphBuilderFactory)(
301-
const txt::ParagraphStyle& style,
302-
std::shared_ptr<txt::FontCollection> font_collection);
303-
ParagraphBuilderFactory factory = txt::ParagraphBuilder::CreateTxtBuilder;
304-
305-
#if FLUTTER_ENABLE_SKSHAPER
306-
#if FLUTTER_ALWAYS_USE_SKSHAPER
307-
bool enable_skparagraph = true;
308-
#else
309-
bool enable_skparagraph = UIDartState::Current()->enable_skparagraph();
310-
#endif
311-
if (enable_skparagraph) {
312-
factory = txt::ParagraphBuilder::CreateSkiaBuilder;
313-
}
314-
#endif // FLUTTER_ENABLE_SKSHAPER
315-
316-
m_paragraphBuilder = factory(style, font_collection.GetFontCollection());
300+
m_paragraphBuilder = txt::ParagraphBuilder::CreateSkiaBuilder(
301+
style, font_collection.GetFontCollection());
317302
}
318303

319304
ParagraphBuilder::~ParagraphBuilder() = default;

lib/ui/ui_dart_state.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ UIDartState::UIDartState(
6060
LogMessageCallback log_message_callback,
6161
std::shared_ptr<IsolateNameServer> isolate_name_server,
6262
bool is_root_isolate,
63-
bool enable_skparagraph,
6463
const UIDartState::Context& context)
6564
: add_callback_(std::move(add_callback)),
6665
remove_callback_(std::move(remove_callback)),
@@ -69,7 +68,6 @@ UIDartState::UIDartState(
6968
unhandled_exception_callback_(std::move(unhandled_exception_callback)),
7069
log_message_callback_(std::move(log_message_callback)),
7170
isolate_name_server_(std::move(isolate_name_server)),
72-
enable_skparagraph_(enable_skparagraph),
7371
context_(context) {
7472
AddOrRemoveTaskObserver(true /* add */);
7573
}
@@ -234,10 +232,6 @@ void UIDartState::LogMessage(const std::string& tag,
234232
}
235233
}
236234

237-
bool UIDartState::enable_skparagraph() const {
238-
return enable_skparagraph_;
239-
}
240-
241235
Dart_Handle UIDartState::HandlePlatformMessage(
242236
std::unique_ptr<PlatformMessage> message) {
243237
if (platform_configuration_) {

lib/ui/ui_dart_state.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,6 @@ class UIDartState : public tonic::DartState {
153153
// @param[in] message The message to be logged.
154154
void LogMessage(const std::string& tag, const std::string& message) const;
155155

156-
bool enable_skparagraph() const;
157-
158156
template <class T>
159157
static flutter::SkiaGPUObject<T> CreateGPUObject(sk_sp<T> object) {
160158
if (!object) {
@@ -185,7 +183,6 @@ class UIDartState : public tonic::DartState {
185183
LogMessageCallback log_message_callback,
186184
std::shared_ptr<IsolateNameServer> isolate_name_server,
187185
bool is_root_isolate_,
188-
bool enable_skparagraph,
189186
const UIDartState::Context& context);
190187

191188
~UIDartState() override;
@@ -210,7 +207,6 @@ class UIDartState : public tonic::DartState {
210207
UnhandledExceptionCallback unhandled_exception_callback_;
211208
LogMessageCallback log_message_callback_;
212209
const std::shared_ptr<IsolateNameServer> isolate_name_server_;
213-
const bool enable_skparagraph_;
214210
UIDartState::Context context_;
215211

216212
void AddOrRemoveTaskObserver(bool add);

runtime/dart_isolate.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ DartIsolate::DartIsolate(const Settings& settings,
284284
settings.log_message_callback,
285285
DartVMRef::GetIsolateNameServer(),
286286
is_root_isolate,
287-
settings.enable_skparagraph,
288287
context),
289288
may_insecurely_connect_to_all_domains_(
290289
settings.may_insecurely_connect_to_all_domains),

0 commit comments

Comments
 (0)