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

Commit 4a4cff9

Browse files
Remove Blink code (#5218)
Fixes flutter/flutter#12212
1 parent f2acd0a commit 4a4cff9

File tree

682 files changed

+1912
-157760
lines changed

Some content is hidden

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

682 files changed

+1912
-157760
lines changed

BUILD.gn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ group("flutter") {
5252
"$flutter_root/fml:fml_unittests",
5353
"$flutter_root/runtime:runtime_unittests",
5454
"$flutter_root/shell/common:shell_unittests",
55-
"$flutter_root/sky/engine/wtf:wtf_unittests",
5655
"$flutter_root/synchronization:synchronization_unittests",
5756
"$flutter_root/third_party/txt:txt_unittests",
5857
"//garnet/public/lib/fxl:fxl_unittests",

common/settings.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ std::string Settings::ToString() const {
3939
stream << "use_test_fonts: " << use_test_fonts << std::endl;
4040
stream << "enable_software_rendering: " << enable_software_rendering
4141
<< std::endl;
42-
stream << "using_blink: " << using_blink << std::endl;
4342
stream << "log_tag: " << log_tag << std::endl;
4443
stream << "icu_data_path: " << icu_data_path << std::endl;
4544
stream << "assets_dir: " << assets_dir << std::endl;

common/settings.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ struct Settings {
6868
// call is made.
6969
fxl::Closure root_isolate_shutdown_callback;
7070
bool enable_software_rendering = false;
71-
bool using_blink = false;
7271
bool skia_deterministic_rendering_on_cpu = false;
7372
bool verbose_logging = false;
7473
std::string log_tag = "flutter";

content_handler/BUILD.gn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ template("flutter_content_handler") {
5959
"$flutter_root/glue",
6060
"$flutter_root/lib/ui",
6161
"$flutter_root/runtime",
62-
"$flutter_root/sky/engine/platform",
6362
"$flutter_root/third_party/txt",
6463
"$flutter_root/vulkan",
6564
"$flutter_root/fml",

content_handler/application.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,6 @@ Application::Application(
134134

135135
settings_.icu_data_path = "";
136136

137-
settings_.using_blink = false;
138-
139137
settings_.assets_dir = application_assets_directory_.get();
140138

141139
settings_.script_snapshot_path = "snapshot_blob.bin";

lib/ui/BUILD.gn

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ source_set("ui") {
6262
"text/paragraph_builder.h",
6363
"text/paragraph_impl.cc",
6464
"text/paragraph_impl.h",
65-
"text/paragraph_impl_blink.cc",
66-
"text/paragraph_impl_blink.h",
6765
"text/paragraph_impl_txt.cc",
6866
"text/paragraph_impl_txt.h",
6967
"text/text_box.cc",
@@ -94,11 +92,11 @@ source_set("ui") {
9492
"$flutter_root/fml",
9593
"$flutter_root/glue",
9694
"$flutter_root/runtime:test_font",
97-
"$flutter_root/sky/engine",
9895
"$flutter_root/third_party/txt",
9996
"//third_party/dart/runtime/bin:embedded_dart_io",
10097
"//third_party/rapidjson",
10198
"//third_party/skia",
99+
"//third_party/skia:effects",
102100
"//third_party/skia:gpu",
103101
"//topaz/lib/tonic",
104102
]

lib/ui/dart_runtime_hooks.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,13 @@ void Logger_PrintString(Dart_NativeArguments args) {
145145
std::stringstream stream;
146146
const auto& logger_prefix = UIDartState::Current()->logger_prefix();
147147

148-
#if !OS(ANDROID)
148+
#if !OS_ANDROID
149149
// Prepend all logs with the isolate debug name except on Android where that
150150
// prefix is specified in the log tag.
151151
if (logger_prefix.size() > 0) {
152152
stream << logger_prefix << ": ";
153153
}
154-
#endif // !OS(ANDROID)
154+
#endif // !OS_ANDROID
155155

156156
// Append the log buffer obtained from Dart code.
157157
{

lib/ui/painting/image_encoding.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ sk_sp<SkData> EncodeImage(sk_sp<SkImage> image, ImageByteFormat format) {
8282
return SkData::MakeWithCopy(pixmap.addr(), pixmap.computeByteSize());
8383
}
8484

85-
ASSERT(format == kRawRGBA);
85+
FXL_CHECK(format == kRawRGBA);
8686
if (pixmap.colorType() != kRGBA_8888_SkColorType) {
8787
TRACE_EVENT0("flutter", "ConvertToRGBA");
8888

lib/ui/text/paragraph.cc

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,6 @@
66

77
#include "flutter/common/settings.h"
88
#include "flutter/common/task_runners.h"
9-
#include "flutter/sky/engine/core/rendering/PaintInfo.h"
10-
#include "flutter/sky/engine/core/rendering/RenderParagraph.h"
11-
#include "flutter/sky/engine/core/rendering/RenderText.h"
12-
#include "flutter/sky/engine/core/rendering/style/RenderStyle.h"
13-
#include "flutter/sky/engine/platform/fonts/FontCache.h"
14-
#include "flutter/sky/engine/platform/graphics/GraphicsContext.h"
15-
#include "flutter/sky/engine/platform/text/TextBoundaries.h"
16-
#include "flutter/sky/engine/wtf/PassOwnPtr.h"
179
#include "lib/fxl/logging.h"
1810
#include "lib/fxl/tasks/task_runner.h"
1911
#include "lib/tonic/converter/dart_converter.h"
@@ -43,20 +35,11 @@ IMPLEMENT_WRAPPERTYPEINFO(ui, Paragraph);
4335

4436
DART_BIND_ALL(Paragraph, FOR_EACH_BINDING)
4537

46-
Paragraph::Paragraph(PassOwnPtr<RenderView> renderView)
47-
: m_paragraphImpl(std::make_unique<ParagraphImplBlink>(renderView)) {}
48-
4938
Paragraph::Paragraph(std::unique_ptr<txt::Paragraph> paragraph)
5039
: m_paragraphImpl(
5140
std::make_unique<ParagraphImplTxt>(std::move(paragraph))) {}
5241

53-
Paragraph::~Paragraph() {
54-
if (m_renderView) {
55-
RenderView* renderView = m_renderView.leakPtr();
56-
destruction_task_runner_->PostTask(
57-
[renderView]() { renderView->destroy(); });
58-
}
59-
}
42+
Paragraph::~Paragraph() = default;
6043

6144
size_t Paragraph::GetAllocationSize() {
6245
// We don't have an accurate accounting of the paragraph's memory consumption,

lib/ui/text/paragraph.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@
88
#include "flutter/fml/message_loop.h"
99
#include "flutter/lib/ui/painting/canvas.h"
1010
#include "flutter/lib/ui/text/paragraph_impl.h"
11-
#include "flutter/lib/ui/text/paragraph_impl_blink.h"
1211
#include "flutter/lib/ui/text/paragraph_impl_txt.h"
1312
#include "flutter/lib/ui/text/text_box.h"
14-
#include "flutter/sky/engine/core/rendering/RenderView.h"
15-
#include "flutter/sky/engine/wtf/PassOwnPtr.h"
1613
#include "flutter/third_party/txt/src/txt/paragraph.h"
1714
#include "lib/tonic/dart_wrappable.h"
1815

@@ -28,10 +25,6 @@ class Paragraph : public fxl::RefCountedThreadSafe<Paragraph>,
2825
FRIEND_MAKE_REF_COUNTED(Paragraph);
2926

3027
public:
31-
static fxl::RefPtr<Paragraph> Create(PassOwnPtr<RenderView> renderView) {
32-
return fxl::MakeRefCounted<Paragraph>(renderView);
33-
}
34-
3528
static fxl::RefPtr<Paragraph> Create(
3629
std::unique_ptr<txt::Paragraph> paragraph) {
3730
return fxl::MakeRefCounted<Paragraph>(std::move(paragraph));
@@ -54,24 +47,14 @@ class Paragraph : public fxl::RefCountedThreadSafe<Paragraph>,
5447
Dart_Handle getPositionForOffset(double dx, double dy);
5548
Dart_Handle getWordBoundary(unsigned offset);
5649

57-
RenderView* renderView() const { return m_renderView.get(); }
58-
5950
virtual size_t GetAllocationSize() override;
6051

6152
static void RegisterNatives(tonic::DartLibraryNatives* natives);
6253

6354
private:
6455
std::unique_ptr<ParagraphImpl> m_paragraphImpl;
6556

66-
explicit Paragraph(PassOwnPtr<RenderView> renderView);
67-
6857
explicit Paragraph(std::unique_ptr<txt::Paragraph> paragraph);
69-
70-
// TODO: This can be removed when the render view association for the legacy
71-
// runtime is removed.
72-
fxl::RefPtr<fxl::TaskRunner> destruction_task_runner_ =
73-
UIDartState::Current()->GetTaskRunners().GetUITaskRunner();
74-
OwnPtr<RenderView> m_renderView;
7558
};
7659

7760
} // namespace blink

0 commit comments

Comments
 (0)