Skip to content

Commit

Permalink
Remove Blink code (flutter#5218)
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-simmons authored May 10, 2018
1 parent f2acd0a commit 4a4cff9
Show file tree
Hide file tree
Showing 682 changed files with 1,912 additions and 157,760 deletions.
1 change: 0 additions & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ group("flutter") {
"$flutter_root/fml:fml_unittests",
"$flutter_root/runtime:runtime_unittests",
"$flutter_root/shell/common:shell_unittests",
"$flutter_root/sky/engine/wtf:wtf_unittests",
"$flutter_root/synchronization:synchronization_unittests",
"$flutter_root/third_party/txt:txt_unittests",
"//garnet/public/lib/fxl:fxl_unittests",
Expand Down
1 change: 0 additions & 1 deletion common/settings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ std::string Settings::ToString() const {
stream << "use_test_fonts: " << use_test_fonts << std::endl;
stream << "enable_software_rendering: " << enable_software_rendering
<< std::endl;
stream << "using_blink: " << using_blink << std::endl;
stream << "log_tag: " << log_tag << std::endl;
stream << "icu_data_path: " << icu_data_path << std::endl;
stream << "assets_dir: " << assets_dir << std::endl;
Expand Down
1 change: 0 additions & 1 deletion common/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ struct Settings {
// call is made.
fxl::Closure root_isolate_shutdown_callback;
bool enable_software_rendering = false;
bool using_blink = false;
bool skia_deterministic_rendering_on_cpu = false;
bool verbose_logging = false;
std::string log_tag = "flutter";
Expand Down
1 change: 0 additions & 1 deletion content_handler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ template("flutter_content_handler") {
"$flutter_root/glue",
"$flutter_root/lib/ui",
"$flutter_root/runtime",
"$flutter_root/sky/engine/platform",
"$flutter_root/third_party/txt",
"$flutter_root/vulkan",
"$flutter_root/fml",
Expand Down
2 changes: 0 additions & 2 deletions content_handler/application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@ Application::Application(

settings_.icu_data_path = "";

settings_.using_blink = false;

settings_.assets_dir = application_assets_directory_.get();

settings_.script_snapshot_path = "snapshot_blob.bin";
Expand Down
4 changes: 1 addition & 3 deletions lib/ui/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ source_set("ui") {
"text/paragraph_builder.h",
"text/paragraph_impl.cc",
"text/paragraph_impl.h",
"text/paragraph_impl_blink.cc",
"text/paragraph_impl_blink.h",
"text/paragraph_impl_txt.cc",
"text/paragraph_impl_txt.h",
"text/text_box.cc",
Expand Down Expand Up @@ -94,11 +92,11 @@ source_set("ui") {
"$flutter_root/fml",
"$flutter_root/glue",
"$flutter_root/runtime:test_font",
"$flutter_root/sky/engine",
"$flutter_root/third_party/txt",
"//third_party/dart/runtime/bin:embedded_dart_io",
"//third_party/rapidjson",
"//third_party/skia",
"//third_party/skia:effects",
"//third_party/skia:gpu",
"//topaz/lib/tonic",
]
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/dart_runtime_hooks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,13 @@ void Logger_PrintString(Dart_NativeArguments args) {
std::stringstream stream;
const auto& logger_prefix = UIDartState::Current()->logger_prefix();

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

// Append the log buffer obtained from Dart code.
{
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/painting/image_encoding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ sk_sp<SkData> EncodeImage(sk_sp<SkImage> image, ImageByteFormat format) {
return SkData::MakeWithCopy(pixmap.addr(), pixmap.computeByteSize());
}

ASSERT(format == kRawRGBA);
FXL_CHECK(format == kRawRGBA);
if (pixmap.colorType() != kRGBA_8888_SkColorType) {
TRACE_EVENT0("flutter", "ConvertToRGBA");

Expand Down
19 changes: 1 addition & 18 deletions lib/ui/text/paragraph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@

#include "flutter/common/settings.h"
#include "flutter/common/task_runners.h"
#include "flutter/sky/engine/core/rendering/PaintInfo.h"
#include "flutter/sky/engine/core/rendering/RenderParagraph.h"
#include "flutter/sky/engine/core/rendering/RenderText.h"
#include "flutter/sky/engine/core/rendering/style/RenderStyle.h"
#include "flutter/sky/engine/platform/fonts/FontCache.h"
#include "flutter/sky/engine/platform/graphics/GraphicsContext.h"
#include "flutter/sky/engine/platform/text/TextBoundaries.h"
#include "flutter/sky/engine/wtf/PassOwnPtr.h"
#include "lib/fxl/logging.h"
#include "lib/fxl/tasks/task_runner.h"
#include "lib/tonic/converter/dart_converter.h"
Expand Down Expand Up @@ -43,20 +35,11 @@ IMPLEMENT_WRAPPERTYPEINFO(ui, Paragraph);

DART_BIND_ALL(Paragraph, FOR_EACH_BINDING)

Paragraph::Paragraph(PassOwnPtr<RenderView> renderView)
: m_paragraphImpl(std::make_unique<ParagraphImplBlink>(renderView)) {}

Paragraph::Paragraph(std::unique_ptr<txt::Paragraph> paragraph)
: m_paragraphImpl(
std::make_unique<ParagraphImplTxt>(std::move(paragraph))) {}

Paragraph::~Paragraph() {
if (m_renderView) {
RenderView* renderView = m_renderView.leakPtr();
destruction_task_runner_->PostTask(
[renderView]() { renderView->destroy(); });
}
}
Paragraph::~Paragraph() = default;

size_t Paragraph::GetAllocationSize() {
// We don't have an accurate accounting of the paragraph's memory consumption,
Expand Down
17 changes: 0 additions & 17 deletions lib/ui/text/paragraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@
#include "flutter/fml/message_loop.h"
#include "flutter/lib/ui/painting/canvas.h"
#include "flutter/lib/ui/text/paragraph_impl.h"
#include "flutter/lib/ui/text/paragraph_impl_blink.h"
#include "flutter/lib/ui/text/paragraph_impl_txt.h"
#include "flutter/lib/ui/text/text_box.h"
#include "flutter/sky/engine/core/rendering/RenderView.h"
#include "flutter/sky/engine/wtf/PassOwnPtr.h"
#include "flutter/third_party/txt/src/txt/paragraph.h"
#include "lib/tonic/dart_wrappable.h"

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

public:
static fxl::RefPtr<Paragraph> Create(PassOwnPtr<RenderView> renderView) {
return fxl::MakeRefCounted<Paragraph>(renderView);
}

static fxl::RefPtr<Paragraph> Create(
std::unique_ptr<txt::Paragraph> paragraph) {
return fxl::MakeRefCounted<Paragraph>(std::move(paragraph));
Expand All @@ -54,24 +47,14 @@ class Paragraph : public fxl::RefCountedThreadSafe<Paragraph>,
Dart_Handle getPositionForOffset(double dx, double dy);
Dart_Handle getWordBoundary(unsigned offset);

RenderView* renderView() const { return m_renderView.get(); }

virtual size_t GetAllocationSize() override;

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

private:
std::unique_ptr<ParagraphImpl> m_paragraphImpl;

explicit Paragraph(PassOwnPtr<RenderView> renderView);

explicit Paragraph(std::unique_ptr<txt::Paragraph> paragraph);

// TODO: This can be removed when the render view association for the legacy
// runtime is removed.
fxl::RefPtr<fxl::TaskRunner> destruction_task_runner_ =
UIDartState::Current()->GetTaskRunners().GetUITaskRunner();
OwnPtr<RenderView> m_renderView;
};

} // namespace blink
Expand Down
Loading

0 comments on commit 4a4cff9

Please sign in to comment.