提交 31d03de0 编写于 作者: G George Kulakowski 提交者: GitHub

Rename mtl to fsl (#4094)

上级 952798cc
......@@ -61,7 +61,7 @@ template("flutter_content_handler") {
"//garnet/public/dart-pkg/fuchsia",
"//garnet/public/lib/fxl",
"//garnet/public/lib/icu_data/cpp",
"//garnet/public/lib/mtl",
"//garnet/public/lib/fsl",
"//garnet/public/lib/zip",
"//lib/tonic",
"//magenta/system/ulib/trace-provider",
......
......@@ -13,7 +13,7 @@
#include "lib/fxl/macros.h"
#include "lib/fxl/tasks/task_runner.h"
#include "lib/icu_data/cpp/icu_data.h"
#include "lib/mtl/tasks/message_loop.h"
#include "lib/fsl/tasks/message_loop.h"
namespace flutter_runner {
namespace {
......@@ -21,7 +21,7 @@ namespace {
static App* g_app = nullptr;
void QuitMessageLoop() {
mtl::MessageLoop::GetCurrent()->QuitNow();
fsl::MessageLoop::GetCurrent()->QuitNow();
}
std::string GetLabelFromURL(const std::string& url) {
......@@ -37,8 +37,8 @@ App::App() {
g_app = this;
context_ = app::ApplicationContext::CreateFromStartupInfo();
gpu_thread_ = std::make_unique<mtl::Thread>();
io_thread_ = std::make_unique<mtl::Thread>();
gpu_thread_ = std::make_unique<fsl::Thread>();
io_thread_ = std::make_unique<fsl::Thread>();
auto gpu_thread_success = gpu_thread_->Run();
auto io_thread_success = io_thread_->Run();
......@@ -46,7 +46,7 @@ App::App() {
FXL_CHECK(gpu_thread_success) << "Must be able to create the GPU thread";
FXL_CHECK(io_thread_success) << "Must be able to create the IO thread";
auto ui_task_runner = mtl::MessageLoop::GetCurrent()->task_runner();
auto ui_task_runner = fsl::MessageLoop::GetCurrent()->task_runner();
auto gpu_task_runner = gpu_thread_->TaskRunner();
auto io_task_runner = io_thread_->TaskRunner();
......
......@@ -13,7 +13,7 @@
#include "flutter/content_handler/application_controller_impl.h"
#include "lib/fxl/macros.h"
#include "lib/fxl/synchronization/waitable_event.h"
#include "lib/mtl/threading/thread.h"
#include "lib/fsl/threading/thread.h"
namespace flutter_runner {
......@@ -48,8 +48,8 @@ class App : public app::ApplicationRunner {
void UpdateProcessLabel();
std::unique_ptr<app::ApplicationContext> context_;
std::unique_ptr<mtl::Thread> gpu_thread_;
std::unique_ptr<mtl::Thread> io_thread_;
std::unique_ptr<fsl::Thread> gpu_thread_;
std::unique_ptr<fsl::Thread> io_thread_;
fidl::BindingSet<app::ApplicationRunner> runner_bindings_;
std::unordered_map<ApplicationControllerImpl*,
std::unique_ptr<ApplicationControllerImpl>>
......
......@@ -13,7 +13,7 @@
#include "flutter/content_handler/app.h"
#include "flutter/content_handler/runtime_holder.h"
#include "lib/fxl/logging.h"
#include "lib/mtl/vmo/vector.h"
#include "lib/fsl/vmo/vector.h"
namespace flutter_runner {
......@@ -32,7 +32,7 @@ ApplicationControllerImpl::ApplicationControllerImpl(
}
std::vector<char> bundle;
if (!mtl::VectorFromVmo(std::move(application->data), &bundle)) {
if (!fsl::VectorFromVmo(std::move(application->data), &bundle)) {
FXL_LOG(ERROR) << "Failed to receive bundle.";
return;
}
......
......@@ -5,10 +5,10 @@
#include <trace-provider/provider.h>
#include "flutter/content_handler/app.h"
#include "lib/mtl/tasks/message_loop.h"
#include "lib/fsl/tasks/message_loop.h"
int main(int argc, const char** argv) {
mtl::MessageLoop loop;
fsl::MessageLoop loop;
trace::TraceProvider provider(loop.async());
flutter_runner::App app;
loop.Run();
......
......@@ -25,7 +25,7 @@
#include "lib/fxl/functional/make_copyable.h"
#include "lib/fxl/logging.h"
#include "lib/fxl/time/time_delta.h"
#include "lib/mtl/vmo/vector.h"
#include "lib/fsl/vmo/vector.h"
#include "lib/zip/create_unzipper.h"
#include "third_party/rapidjson/rapidjson/document.h"
#include "third_party/rapidjson/rapidjson/stringbuffer.h"
......@@ -127,7 +127,7 @@ void RuntimeHolder::Init(
}
mx::vmo dylib_vmo;
if (!mtl::VmoFromVector(dylib_blob, &dylib_vmo)) {
if (!fsl::VmoFromVector(dylib_blob, &dylib_vmo)) {
FXL_LOG(ERROR) << "Failed to load app dylib";
return;
}
......
......@@ -40,7 +40,7 @@ VulkanSurface::VulkanSurface(vulkan::VulkanProcTable& p_vk,
return;
}
event_handler_key_ = mtl::MessageLoop::GetCurrent()->AddHandler(
event_handler_key_ = fsl::MessageLoop::GetCurrent()->AddHandler(
this, release_event_.get(), MX_EVENT_SIGNALED);
// Probably not necessary as the events should be in the unsignalled state
......@@ -53,7 +53,7 @@ VulkanSurface::VulkanSurface(vulkan::VulkanProcTable& p_vk,
VulkanSurface::~VulkanSurface() {
ASSERT_IS_GPU_THREAD;
if (event_handler_key_ != 0) {
mtl::MessageLoop::GetCurrent()->RemoveHandler(event_handler_key_);
fsl::MessageLoop::GetCurrent()->RemoveHandler(event_handler_key_);
event_handler_key_ = 0;
}
}
......
......@@ -10,8 +10,8 @@
#include "flutter/vulkan/vulkan_handle.h"
#include "flutter/vulkan/vulkan_proc_table.h"
#include "lib/fxl/macros.h"
#include "lib/mtl/tasks/message_loop.h"
#include "lib/mtl/tasks/message_loop_handler.h"
#include "lib/fsl/tasks/message_loop.h"
#include "lib/fsl/tasks/message_loop_handler.h"
#include "mx/event.h"
#include "mx/vmo.h"
#include "third_party/skia/include/core/SkSurface.h"
......@@ -20,7 +20,7 @@
namespace flutter_runner {
class VulkanSurface : public flow::SceneUpdateContext::SurfaceProducerSurface,
public mtl::MessageLoopHandler {
public fsl::MessageLoopHandler {
public:
VulkanSurface(vulkan::VulkanProcTable& p_vk,
sk_sp<GrContext> context,
......@@ -66,12 +66,12 @@ private:
mx::event acquire_event_;
vulkan::VulkanHandle<VkSemaphore> acquire_semaphore_;
mx::event release_event_;
mtl::MessageLoop::HandlerKey event_handler_key_ = 0;
fsl::MessageLoop::HandlerKey event_handler_key_ = 0;
std::function<void(void)> pending_on_writes_committed_;
size_t age_ = 0;
bool valid_ = false;
// |mtl::MessageLoopHandler|
// |fsl::MessageLoopHandler|
void OnHandleReady(mx_handle_t handle,
mx_signals_t pending,
uint64_t count) override;
......
......@@ -14,7 +14,7 @@
#include "flutter/vulkan/vulkan_device.h"
#include "flutter/vulkan/vulkan_proc_table.h"
#include "lib/fxl/macros.h"
#include "lib/mtl/tasks/message_loop.h"
#include "lib/fsl/tasks/message_loop.h"
#include "third_party/skia/include/gpu/vk/GrVkBackendContext.h"
namespace flutter_runner {
......
......@@ -19,7 +19,7 @@ source_set("web") {
]
if (is_fuchsia) {
deps += [ "//garnet/public/lib/mtl" ]
deps += [ "//garnet/public/lib/fsl" ]
} else {
deps += [ "//flutter/fml" ]
}
......
......@@ -43,7 +43,7 @@
#if defined(OS_FUCHSIA)
#include "lib/mtl/tasks/message_loop.h" // nogncheck
#include "lib/fsl/tasks/message_loop.h" // nogncheck
#else // defined(OS_FUCHSIA)
......@@ -63,11 +63,11 @@ void didProcessTask() {
#if defined(OS_FUCHSIA)
void addMessageLoopObservers() {
mtl::MessageLoop::GetCurrent()->SetAfterTaskCallback(didProcessTask);
fsl::MessageLoop::GetCurrent()->SetAfterTaskCallback(didProcessTask);
}
void removeMessageLoopObservers() {
mtl::MessageLoop::GetCurrent()->ClearAfterTaskCallback();
fsl::MessageLoop::GetCurrent()->ClearAfterTaskCallback();
}
#else // defined(OS_FUCHSIA)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册