From 31d03de019794a4b0e3c98c04cf7be501fb962fb Mon Sep 17 00:00:00 2001 From: George Kulakowski Date: Mon, 11 Sep 2017 17:56:02 -0700 Subject: [PATCH] Rename mtl to fsl (#4094) --- content_handler/BUILD.gn | 2 +- content_handler/app.cc | 10 +++++----- content_handler/app.h | 6 +++--- content_handler/application_controller_impl.cc | 4 ++-- content_handler/main.cc | 4 ++-- content_handler/runtime_holder.cc | 4 ++-- content_handler/vulkan_surface.cc | 4 ++-- content_handler/vulkan_surface.h | 10 +++++----- content_handler/vulkan_surface_producer.h | 2 +- sky/engine/web/BUILD.gn | 2 +- sky/engine/web/Sky.cpp | 6 +++--- 11 files changed, 27 insertions(+), 27 deletions(-) diff --git a/content_handler/BUILD.gn b/content_handler/BUILD.gn index a8f31c7a5..fa2204950 100644 --- a/content_handler/BUILD.gn +++ b/content_handler/BUILD.gn @@ -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", diff --git a/content_handler/app.cc b/content_handler/app.cc index e171ff0aa..1c7c2a560 100644 --- a/content_handler/app.cc +++ b/content_handler/app.cc @@ -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(); - io_thread_ = std::make_unique(); + gpu_thread_ = std::make_unique(); + io_thread_ = std::make_unique(); 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(); diff --git a/content_handler/app.h b/content_handler/app.h index ac6949046..45b656232 100644 --- a/content_handler/app.h +++ b/content_handler/app.h @@ -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 context_; - std::unique_ptr gpu_thread_; - std::unique_ptr io_thread_; + std::unique_ptr gpu_thread_; + std::unique_ptr io_thread_; fidl::BindingSet runner_bindings_; std::unordered_map> diff --git a/content_handler/application_controller_impl.cc b/content_handler/application_controller_impl.cc index 15f5dfd9c..8201b6b8d 100644 --- a/content_handler/application_controller_impl.cc +++ b/content_handler/application_controller_impl.cc @@ -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 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; } diff --git a/content_handler/main.cc b/content_handler/main.cc index f9fc8c92b..d3eac3c81 100644 --- a/content_handler/main.cc +++ b/content_handler/main.cc @@ -5,10 +5,10 @@ #include #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(); diff --git a/content_handler/runtime_holder.cc b/content_handler/runtime_holder.cc index d6ef6439d..afae008d5 100644 --- a/content_handler/runtime_holder.cc +++ b/content_handler/runtime_holder.cc @@ -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; } diff --git a/content_handler/vulkan_surface.cc b/content_handler/vulkan_surface.cc index cc3764b30..27e02c2d8 100644 --- a/content_handler/vulkan_surface.cc +++ b/content_handler/vulkan_surface.cc @@ -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; } } diff --git a/content_handler/vulkan_surface.h b/content_handler/vulkan_surface.h index 547af6392..10a6b692a 100644 --- a/content_handler/vulkan_surface.h +++ b/content_handler/vulkan_surface.h @@ -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 context, @@ -66,12 +66,12 @@ private: mx::event acquire_event_; vulkan::VulkanHandle acquire_semaphore_; mx::event release_event_; - mtl::MessageLoop::HandlerKey event_handler_key_ = 0; + fsl::MessageLoop::HandlerKey event_handler_key_ = 0; std::function 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; diff --git a/content_handler/vulkan_surface_producer.h b/content_handler/vulkan_surface_producer.h index 443afeb77..e238de54f 100644 --- a/content_handler/vulkan_surface_producer.h +++ b/content_handler/vulkan_surface_producer.h @@ -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 { diff --git a/sky/engine/web/BUILD.gn b/sky/engine/web/BUILD.gn index 8b92cdb0b..83e0e93ed 100644 --- a/sky/engine/web/BUILD.gn +++ b/sky/engine/web/BUILD.gn @@ -19,7 +19,7 @@ source_set("web") { ] if (is_fuchsia) { - deps += [ "//garnet/public/lib/mtl" ] + deps += [ "//garnet/public/lib/fsl" ] } else { deps += [ "//flutter/fml" ] } diff --git a/sky/engine/web/Sky.cpp b/sky/engine/web/Sky.cpp index c4897419d..e90539e96 100644 --- a/sky/engine/web/Sky.cpp +++ b/sky/engine/web/Sky.cpp @@ -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) -- GitLab