diff --git a/DEPS b/DEPS index 66543b3550..a80b671d65 100644 --- a/DEPS +++ b/DEPS @@ -125,7 +125,7 @@ deps = { Var('fuchsia_git') + '/garnet' + '@' + '954225c071a8e44e83e9b0da4d3972771a5ed03a', 'src/lib/tonic': - Var('fuchsia_git') + '/tonic' + '@' + 'fca532244483192e961cb826d9d0c05947cf288c', + Var('fuchsia_git') + '/tonic' + '@' + 'ce1c9992ddefb940f549e6a9f94252ef2963dd2e', 'src/third_party/benchmark': Var('fuchsia_git') + '/third_party/benchmark' + '@' + '296537bc48d380adf21567c5d736ab79f5363d22', diff --git a/engine/src/flutter/BUILD.gn b/engine/src/flutter/BUILD.gn index 978b6e74b5..36080a48e6 100644 --- a/engine/src/flutter/BUILD.gn +++ b/engine/src/flutter/BUILD.gn @@ -45,7 +45,7 @@ group("flutter") { "//flutter/synchronization:synchronization_unittests", "//flutter/third_party/txt:txt_benchmarks", "//flutter/third_party/txt:txt_unittests", - "//garnet/public/lib/ftl:ftl_unittests", + "//garnet/public/lib/fxl:fxl_unittests", ] } } diff --git a/engine/src/flutter/assets/BUILD.gn b/engine/src/flutter/assets/BUILD.gn index 0b3d1c970a..dbdeb464ce 100644 --- a/engine/src/flutter/assets/BUILD.gn +++ b/engine/src/flutter/assets/BUILD.gn @@ -14,7 +14,7 @@ source_set("assets") { deps = [ "//flutter/glue", - "//garnet/public/lib/ftl", + "//garnet/public/lib/fxl", "//garnet/public/lib/zip", ] diff --git a/engine/src/flutter/common/BUILD.gn b/engine/src/flutter/common/BUILD.gn index a0d9194595..239f33bea0 100644 --- a/engine/src/flutter/common/BUILD.gn +++ b/engine/src/flutter/common/BUILD.gn @@ -17,7 +17,7 @@ source_set("common") { ] deps = [ - "//garnet/public/lib/ftl", + "//garnet/public/lib/fxl", ] public_configs = [ ":flutter_config" ] diff --git a/engine/src/flutter/fml/BUILD.gn b/engine/src/flutter/fml/BUILD.gn index 0e3dbb4f1e..2bd6555233 100644 --- a/engine/src/flutter/fml/BUILD.gn +++ b/engine/src/flutter/fml/BUILD.gn @@ -25,7 +25,7 @@ source_set("fml") { deps = [ "//dart/runtime:dart_api", - "//garnet/public/lib/ftl", + "//garnet/public/lib/fxl", # These need to be in sync with the Fuchsia buildroot. "//third_party/icu", @@ -113,6 +113,6 @@ executable("fml_unittests") { "//dart/runtime:libdart_jit", "//flutter/fml", "//flutter/testing", - "//garnet/public/lib/ftl", + "//garnet/public/lib/fxl", ] } diff --git a/engine/src/flutter/fml/platform/darwin/message_loop_darwin.mm b/engine/src/flutter/fml/platform/darwin/message_loop_darwin.mm index 0f61c66112..6693ab23ba 100644 --- a/engine/src/flutter/fml/platform/darwin/message_loop_darwin.mm +++ b/engine/src/flutter/fml/platform/darwin/message_loop_darwin.mm @@ -13,7 +13,7 @@ static constexpr CFTimeInterval kDistantFuture = 1.0e10; MessageLoopDarwin::MessageLoopDarwin() : running_(false), loop_((CFRunLoopRef)CFRetain(CFRunLoopGetCurrent())) { - FTL_DCHECK(loop_ != nullptr); + FXL_DCHECK(loop_ != nullptr); // Setup the delayed wake source. CFRunLoopTimerContext timer_context = { @@ -25,7 +25,7 @@ MessageLoopDarwin::MessageLoopDarwin() reinterpret_cast(&MessageLoopDarwin::OnTimerFire) /* callout */, &timer_context /* context */)); - FTL_DCHECK(delayed_wake_timer_ != nullptr); + FXL_DCHECK(delayed_wake_timer_ != nullptr); CFRunLoopAddTimer(loop_, delayed_wake_timer_, kCFRunLoopCommonModes); } @@ -35,7 +35,7 @@ MessageLoopDarwin::~MessageLoopDarwin() { } void MessageLoopDarwin::Run() { - FTL_DCHECK(loop_ == CFRunLoopGetCurrent()); + FXL_DCHECK(loop_ == CFRunLoopGetCurrent()); running_ = true; @@ -59,12 +59,12 @@ void MessageLoopDarwin::Terminate() { CFRunLoopStop(loop_); } -void MessageLoopDarwin::WakeUp(ftl::TimePoint time_point) { - // Rearm the timer. The time bases used by CoreFoundation and FTL are +void MessageLoopDarwin::WakeUp(fxl::TimePoint time_point) { + // Rearm the timer. The time bases used by CoreFoundation and FXL are // different and must be accounted for. CFRunLoopTimerSetNextFireDate( delayed_wake_timer_, - CFAbsoluteTimeGetCurrent() + (time_point - ftl::TimePoint::Now()).ToSecondsF()); + CFAbsoluteTimeGetCurrent() + (time_point - fxl::TimePoint::Now()).ToSecondsF()); } void MessageLoopDarwin::OnTimerFire(CFRunLoopTimerRef timer, MessageLoopDarwin* loop) { diff --git a/engine/src/flutter/fml/platform/darwin/paths_darwin.mm b/engine/src/flutter/fml/platform/darwin/paths_darwin.mm index eea87ffd49..4419edeffb 100644 --- a/engine/src/flutter/fml/platform/darwin/paths_darwin.mm +++ b/engine/src/flutter/fml/platform/darwin/paths_darwin.mm @@ -6,7 +6,7 @@ #include -#include "lib/ftl/files/path.h" +#include "lib/fxl/files/path.h" namespace fml { namespace paths { diff --git a/engine/src/flutter/glue/BUILD.gn b/engine/src/flutter/glue/BUILD.gn index 76d1c039d9..9f15c4c076 100644 --- a/engine/src/flutter/glue/BUILD.gn +++ b/engine/src/flutter/glue/BUILD.gn @@ -9,7 +9,7 @@ source_set("glue") { ] deps = [ - "//garnet/public/lib/ftl", + "//garnet/public/lib/fxl", ] if (is_fuchsia) { diff --git a/engine/src/flutter/lib/io/BUILD.gn b/engine/src/flutter/lib/io/BUILD.gn index b2cc68f8ad..4e34b054d6 100644 --- a/engine/src/flutter/lib/io/BUILD.gn +++ b/engine/src/flutter/lib/io/BUILD.gn @@ -11,7 +11,7 @@ source_set("io") { deps = [ "//dart/runtime:dart_api", "//dart/runtime/bin:embedded_dart_io", - "//garnet/public/lib/ftl", + "//garnet/public/lib/fxl", "//lib/tonic/converter", ] } diff --git a/engine/src/flutter/runtime/BUILD.gn b/engine/src/flutter/runtime/BUILD.gn index fbeaf65974..ae0941fc77 100644 --- a/engine/src/flutter/runtime/BUILD.gn +++ b/engine/src/flutter/runtime/BUILD.gn @@ -79,7 +79,7 @@ source_set("runtime") { "//flutter/lib/io", "//flutter/lib/ui", "//flutter/sky/engine/platform", - "//garnet/public/lib/ftl", + "//garnet/public/lib/fxl", "//lib/tonic", "//third_party/rapidjson", "//third_party/skia", diff --git a/engine/src/flutter/shell/common/BUILD.gn b/engine/src/flutter/shell/common/BUILD.gn index ea6c82354e..b9694a80aa 100644 --- a/engine/src/flutter/shell/common/BUILD.gn +++ b/engine/src/flutter/shell/common/BUILD.gn @@ -113,7 +113,7 @@ source_set("common") { "//flutter/sky/engine/wtf", "//flutter/synchronization", "//flutter/third_party/txt", - "//garnet/public/lib/ftl", + "//garnet/public/lib/fxl", "//lib/tonic", "//third_party/rapidjson", "//third_party/skia", diff --git a/engine/src/flutter/shell/gpu/BUILD.gn b/engine/src/flutter/shell/gpu/BUILD.gn index 792b2f58b0..f58d0d8b80 100644 --- a/engine/src/flutter/shell/gpu/BUILD.gn +++ b/engine/src/flutter/shell/gpu/BUILD.gn @@ -27,7 +27,7 @@ source_set("gpu") { "//flutter/glue", "//flutter/shell/common", "//flutter/synchronization", - "//garnet/public/lib/ftl", + "//garnet/public/lib/fxl", "//third_party/skia", "//third_party/skia:gpu", ] diff --git a/engine/src/flutter/shell/platform/android/BUILD.gn b/engine/src/flutter/shell/platform/android/BUILD.gn index 04ebd01116..dcea867e9a 100644 --- a/engine/src/flutter/shell/platform/android/BUILD.gn +++ b/engine/src/flutter/shell/platform/android/BUILD.gn @@ -44,7 +44,7 @@ shared_library("flutter_shell_native") { "//flutter/runtime", "//flutter/shell/common", "//flutter/shell/gpu", - "//garnet/public/lib/ftl", + "//garnet/public/lib/fxl", "//third_party/skia", ] if (flutter_runtime_mode == "debug") { diff --git a/engine/src/flutter/shell/platform/darwin/BUILD.gn b/engine/src/flutter/shell/platform/darwin/BUILD.gn index f296858af3..63409c8e66 100644 --- a/engine/src/flutter/shell/platform/darwin/BUILD.gn +++ b/engine/src/flutter/shell/platform/darwin/BUILD.gn @@ -47,7 +47,7 @@ source_set("flutter_channels") { "//flutter/shell/gpu", "//flutter/shell/testing", "//flutter/sky/engine/wtf", - "//garnet/public/lib/ftl", + "//garnet/public/lib/fxl", "//third_party/skia", ] } diff --git a/engine/src/flutter/shell/platform/darwin/common/BUILD.gn b/engine/src/flutter/shell/platform/darwin/common/BUILD.gn index b8c63ae8ce..cda4ae6fbf 100644 --- a/engine/src/flutter/shell/platform/darwin/common/BUILD.gn +++ b/engine/src/flutter/shell/platform/darwin/common/BUILD.gn @@ -26,7 +26,7 @@ source_set("common") { "//flutter/shell/gpu", "//flutter/shell/testing", "//flutter/sky/engine/wtf", - "//garnet/public/lib/ftl", + "//garnet/public/lib/fxl", "//third_party/skia", ] } diff --git a/engine/src/flutter/shell/platform/darwin/common/platform_mac.mm b/engine/src/flutter/shell/platform/darwin/common/platform_mac.mm index 6b59e3488b..622c18238d 100644 --- a/engine/src/flutter/shell/platform/darwin/common/platform_mac.mm +++ b/engine/src/flutter/shell/platform/darwin/common/platform_mac.mm @@ -14,19 +14,19 @@ #include "flutter/shell/common/switches.h" #include "flutter/shell/common/tracing_controller.h" #include "flutter/sky/engine/wtf/MakeUnique.h" -#include "lib/ftl/command_line.h" -#include "lib/ftl/strings/string_view.h" +#include "lib/fxl/command_line.h" +#include "lib/fxl/strings/string_view.h" namespace shell { -static ftl::CommandLine InitializedCommandLine() { +static fxl::CommandLine InitializedCommandLine() { std::vector args_vector; for (NSString* arg in [NSProcessInfo processInfo].arguments) { args_vector.emplace_back(arg.UTF8String); } - return ftl::CommandLineFromIterators(args_vector.begin(), args_vector.end()); + return fxl::CommandLineFromIterators(args_vector.begin(), args_vector.end()); } class EmbedderState { @@ -37,7 +37,7 @@ class EmbedderState { // See https://github.com/flutter/flutter/issues/4006 blink::engine_main_enter_ts = Dart_TimelineGetMicros(); #endif - FTL_DCHECK([NSThread isMainThread]) + FXL_DCHECK([NSThread isMainThread]) << "Embedder initialization must occur on the main platform thread"; auto command_line = InitializedCommandLine(); @@ -52,7 +52,7 @@ class EmbedderState { ~EmbedderState() {} private: - FTL_DISALLOW_COPY_AND_ASSIGN(EmbedderState); + FXL_DISALLOW_COPY_AND_ASSIGN(EmbedderState); }; void PlatformMacMain(std::string icu_data_path, std::string application_library_path) { @@ -92,7 +92,7 @@ static bool FlagsValidForCommandLineLaunch(const std::string& bundle_path, return true; } -static std::string ResolveCommandLineLaunchFlag(const ftl::StringView name) { +static std::string ResolveCommandLineLaunchFlag(const fxl::StringView name) { const auto& command_line = shell::Shell::Shared().GetCommandLine(); std::string command_line_option; diff --git a/engine/src/flutter/shell/platform/darwin/desktop/BUILD.gn b/engine/src/flutter/shell/platform/darwin/desktop/BUILD.gn index 316b0bc151..bf3371da55 100644 --- a/engine/src/flutter/shell/platform/darwin/desktop/BUILD.gn +++ b/engine/src/flutter/shell/platform/darwin/desktop/BUILD.gn @@ -30,7 +30,7 @@ source_set("mac_desktop_platform") { "//flutter/shell/platform/darwin/common", "//flutter/shell/testing", "//flutter/synchronization", - "//garnet/public/lib/ftl", + "//garnet/public/lib/fxl", "//third_party/skia", ] } diff --git a/engine/src/flutter/shell/platform/darwin/desktop/platform_view_mac.mm b/engine/src/flutter/shell/platform/darwin/desktop/platform_view_mac.mm index c2878f1e6a..78fff791c5 100644 --- a/engine/src/flutter/shell/platform/darwin/desktop/platform_view_mac.mm +++ b/engine/src/flutter/shell/platform/darwin/desktop/platform_view_mac.mm @@ -14,8 +14,8 @@ #include "flutter/shell/platform/darwin/common/platform_mac.h" #include "flutter/shell/platform/darwin/common/process_info_mac.h" #include "flutter/shell/platform/darwin/desktop/vsync_waiter_mac.h" -#include "lib/ftl/command_line.h" -#include "lib/ftl/synchronization/waitable_event.h" +#include "lib/fxl/command_line.h" +#include "lib/fxl/synchronization/waitable_event.h" namespace shell { @@ -146,7 +146,7 @@ bool PlatformViewMac::IsValid() const { void PlatformViewMac::RunFromSource(const std::string& assets_directory, const std::string& main, const std::string& packages) { - auto latch = new ftl::ManualResetWaitableEvent(); + auto latch = new fxl::ManualResetWaitableEvent(); dispatch_async(dispatch_get_main_queue(), ^{ SetupAndLoadFromSource(assets_directory, main, packages); diff --git a/engine/src/flutter/shell/platform/darwin/ios/BUILD.gn b/engine/src/flutter/shell/platform/darwin/ios/BUILD.gn index 368d677f1a..5fd71c72b7 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/BUILD.gn +++ b/engine/src/flutter/shell/platform/darwin/ios/BUILD.gn @@ -75,7 +75,7 @@ shared_library("flutter_framework_dylib") { "//flutter/shell/platform/darwin/common", "//flutter/sky/engine/platform", "//flutter/sky/engine/wtf", - "//garnet/public/lib/ftl", + "//garnet/public/lib/fxl", "//third_party/skia", ] if (flutter_runtime_mode == "debug") { diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterAppDelegate.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterAppDelegate.mm index 07aabfc6c5..ba011a89ad 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterAppDelegate.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterAppDelegate.mm @@ -4,7 +4,7 @@ #include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterAppDelegate.h" #include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterViewController.h" -#include "lib/ftl/logging.h" +#include "lib/fxl/logging.h" @interface FlutterAppDelegate () @property(readonly, nonatomic) NSMutableArray* pluginDelegates; @@ -74,7 +74,7 @@ _debugBackgroundTask = [application beginBackgroundTaskWithName:@"Flutter debug task" expirationHandler:^{ - FTL_LOG(WARNING) + FXL_LOG(WARNING) << "\nThe OS has terminated the Flutter debug connection for being " "inactive in the background for too long.\n\n" "There are no errors with your Flutter application.\n\n" diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm index 1b411654fa..ca056955c0 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm @@ -10,9 +10,9 @@ #include "flutter/shell/common/switches.h" #include "flutter/shell/platform/darwin/ios/framework/Source/FlutterDartSource.h" #include "flutter/shell/platform/darwin/ios/framework/Source/flutter_main_ios.h" -#include "lib/ftl/strings/string_view.h" +#include "lib/fxl/strings/string_view.h" -static NSURL* URLForSwitch(const ftl::StringView name) { +static NSURL* URLForSwitch(const fxl::StringView name) { const auto& cmd = shell::Shell::Shared().GetCommandLine(); NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterView.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterView.mm index c28e7de633..b38b3bbc79 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterView.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterView.mm @@ -9,7 +9,7 @@ #include "flutter/flow/layers/layer_tree.h" #include "flutter/shell/common/rasterizer.h" #include "flutter/shell/common/shell.h" -#include "lib/ftl/synchronization/waitable_event.h" +#include "lib/fxl/synchronization/waitable_event.h" #include "third_party/skia/include/utils/mac/SkCGUtils.h" @interface FlutterView () @@ -43,7 +43,7 @@ return YES; } -void SnapshotRasterizer(ftl::WeakPtr rasterizer, +void SnapshotRasterizer(fxl::WeakPtr rasterizer, CGContextRef context, bool is_opaque) { if (!rasterizer) { @@ -94,7 +94,7 @@ void SnapshotContents(CGContextRef context, bool is_opaque) { // platform view. So use that. Once we support multiple platform views, the // shell will need to provide a way to get the rasterizer for a specific // platform view. - std::vector> registered_rasterizers; + std::vector> registered_rasterizers; shell::Shell::Shared().GetRasterizers(®istered_rasterizers); for (auto& rasterizer : registered_rasterizers) { SnapshotRasterizer(rasterizer, context, is_opaque); @@ -108,7 +108,7 @@ void SnapshotContentsSync(CGContextRef context, UIView* view) { return; } - ftl::AutoResetWaitableEvent latch; + fxl::AutoResetWaitableEvent latch; gpu_thread->PostTask([&latch, context, view]() { SnapshotContents(context, [view isOpaque]); latch.Signal(); diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm index 449cb9aed8..abda71d42d 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm @@ -20,8 +20,8 @@ #include "flutter/shell/platform/darwin/ios/framework/Source/flutter_main_ios.h" #include "flutter/shell/platform/darwin/ios/framework/Source/flutter_touch_mapper.h" #include "flutter/shell/platform/darwin/ios/platform_view_ios.h" -#include "lib/ftl/functional/make_copyable.h" -#include "lib/ftl/time/time_delta.h" +#include "lib/fxl/functional/make_copyable.h" +#include "lib/fxl/time/time_delta.h" namespace { @@ -32,17 +32,17 @@ class PlatformMessageResponseDarwin : public blink::PlatformMessageResponse { public: void Complete(std::vector data) override { - ftl::RefPtr self(this); + fxl::RefPtr self(this); blink::Threads::Platform()->PostTask( - ftl::MakeCopyable([ self, data = std::move(data) ]() mutable { + fxl::MakeCopyable([ self, data = std::move(data) ]() mutable { self->callback_.get()(shell::GetNSDataFromVector(data)); })); } void CompleteEmpty() override { - ftl::RefPtr self(this); + fxl::RefPtr self(this); blink::Threads::Platform()->PostTask( - ftl::MakeCopyable([self]() mutable { self->callback_.get()(nil); })); + fxl::MakeCopyable([self]() mutable { self->callback_.get()(nil); })); } private: @@ -311,7 +311,7 @@ class PlatformMessageResponseDarwin : public blink::PlatformMessageResponse { #pragma mark - Surface creation and teardown updates - (void)surfaceUpdated:(BOOL)appeared { - FTL_CHECK(_platformView != nullptr); + FXL_CHECK(_platformView != nullptr); // NotifyCreated/NotifyDestroyed are synchronous and require hops between the UI and GPU thread. if (appeared) { @@ -459,7 +459,7 @@ static inline blink::PointerData::DeviceKind DeviceKindFromTouchType(UITouch* to break; } - FTL_DCHECK(device_id != 0); + FXL_DCHECK(device_id != 0); CGPoint windowCoordinates = [touch locationInView:nil]; blink::PointerData pointer_data; @@ -533,7 +533,7 @@ static inline blink::PointerData::DeviceKind DeviceKindFromTouchType(UITouch* to packet->SetPointerData(i++, pointer_data); } - blink::Threads::UI()->PostTask(ftl::MakeCopyable( + blink::Threads::UI()->PostTask(fxl::MakeCopyable( [ engine = _platformView->engine().GetWeakPtr(), packet = std::move(packet) ] { if (engine.get()) engine->DispatchPointerDataPacket(*packet); @@ -752,14 +752,14 @@ constexpr CGFloat kStandardStatusBarHeight = 20.0; message:(NSData*)message binaryReply:(FlutterBinaryReply)callback { NSAssert(channel, @"The channel must not be null"); - ftl::RefPtr response = + fxl::RefPtr response = (callback == nil) ? nullptr - : ftl::MakeRefCounted(^(NSData* reply) { + : fxl::MakeRefCounted(^(NSData* reply) { callback(reply); }); - ftl::RefPtr platformMessage = - (message == nil) ? ftl::MakeRefCounted(channel.UTF8String, response) - : ftl::MakeRefCounted( + fxl::RefPtr platformMessage = + (message == nil) ? fxl::MakeRefCounted(channel.UTF8String, response) + : fxl::MakeRefCounted( channel.UTF8String, shell::GetVectorFromNSData(message), response); _platformView->DispatchPlatformMessage(platformMessage); } diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm index a20110647d..02e508d7bd 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm @@ -10,7 +10,7 @@ #import #include "flutter/shell/platform/darwin/ios/platform_view_ios.h" -#include "lib/ftl/logging.h" +#include "lib/fxl/logging.h" namespace { @@ -35,7 +35,7 @@ blink::SemanticsAction GetSemanticsActionForScrollDirection( case UIAccessibilityScrollDirectionDown: return blink::SemanticsAction::kScrollUp; } - FTL_DCHECK(false); // Unreachable + FXL_DCHECK(false); // Unreachable return blink::SemanticsAction::kScrollUp; } @@ -69,8 +69,8 @@ bool GeometryComparator(SemanticsObject* a, SemanticsObject* b) { #pragma mark - Designated initializers - (instancetype)initWithBridge:(shell::AccessibilityBridge*)bridge uid:(int32_t)uid { - FTL_DCHECK(bridge != nil) << "bridge must be set"; - FTL_DCHECK(uid >= kRootNodeId); + FXL_DCHECK(bridge != nil) << "bridge must be set"; + FXL_DCHECK(uid >= kRootNodeId); self = [super init]; if (self) { diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/platform_message_router.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/platform_message_router.mm index 8dee005f34..70625143b6 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/platform_message_router.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/platform_message_router.mm @@ -14,8 +14,8 @@ PlatformMessageRouter::PlatformMessageRouter() = default; PlatformMessageRouter::~PlatformMessageRouter() = default; -void PlatformMessageRouter::HandlePlatformMessage(ftl::RefPtr message) { - ftl::RefPtr completer = message->response(); +void PlatformMessageRouter::HandlePlatformMessage(fxl::RefPtr message) { + fxl::RefPtr completer = message->response(); auto it = message_handlers_.find(message->channel()); if (it != message_handlers_.end()) { FlutterBinaryMessageHandler handler = it->second; diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/vsync_waiter_ios.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/vsync_waiter_ios.mm index 41686eaae9..24a6aa175f 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/vsync_waiter_ios.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/vsync_waiter_ios.mm @@ -12,7 +12,7 @@ #include "flutter/common/threads.h" #include "flutter/glue/trace_event.h" -#include "lib/ftl/logging.h" +#include "lib/fxl/logging.h" @interface VSyncClient : NSObject @@ -41,16 +41,16 @@ } - (void)await:(shell::VsyncWaiter::Callback)callback { - FTL_DCHECK(!_pendingCallback); + FXL_DCHECK(!_pendingCallback); _pendingCallback = std::move(callback); _displayLink.paused = NO; } - (void)onDisplayLink:(CADisplayLink*)link { - // ftl::TimePoint and CATimeInterval both use mach_absolute_time. - ftl::TimePoint frame_start_time = ftl::TimePoint::Now(); - ftl::TimePoint frame_target_time = - ftl::TimePoint::FromEpochDelta(ftl::TimeDelta::FromSecondsF(link.targetTimestamp)); + // fxl::TimePoint and CATimeInterval both use mach_absolute_time. + fxl::TimePoint frame_start_time = fxl::TimePoint::Now(); + fxl::TimePoint frame_target_time = + fxl::TimePoint::FromEpochDelta(fxl::TimeDelta::FromSecondsF(link.targetTimestamp)); _displayLink.paused = YES; diff --git a/engine/src/flutter/shell/platform/darwin/ios/ios_surface_software.mm b/engine/src/flutter/shell/platform/darwin/ios/ios_surface_software.mm index 759571696c..be830484cc 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/ios_surface_software.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/ios_surface_software.mm @@ -10,7 +10,7 @@ #include "flutter/fml/platform/darwin/cf_utils.h" #include "flutter/fml/trace_event.h" -#include "lib/ftl/logging.h" +#include "lib/fxl/logging.h" #include "third_party/skia/include/utils/mac/SkCGUtils.h" namespace shell { diff --git a/engine/src/flutter/shell/platform/darwin/ios/platform_view_ios.mm b/engine/src/flutter/shell/platform/darwin/ios/platform_view_ios.mm index dd3db9915c..b4d574d0dc 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/platform_view_ios.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/platform_view_ios.mm @@ -13,7 +13,7 @@ #include "flutter/shell/gpu/gpu_rasterizer.h" #include "flutter/shell/platform/darwin/common/process_info_mac.h" #include "flutter/shell/platform/darwin/ios/framework/Source/vsync_waiter_ios.h" -#include "lib/ftl/synchronization/waitable_event.h" +#include "lib/fxl/synchronization/waitable_event.h" namespace shell { @@ -29,7 +29,7 @@ void PlatformViewIOS::Attach() { Attach(NULL); } -void PlatformViewIOS::Attach(ftl::Closure firstFrameCallback) { +void PlatformViewIOS::Attach(fxl::Closure firstFrameCallback) { CreateEngine(); PostAddToShellTask(); if (firstFrameCallback) { @@ -68,7 +68,7 @@ void PlatformViewIOS::SetupAndLoadFromSource(const std::string& assets_directory }); } -ftl::WeakPtr PlatformViewIOS::GetWeakPtr() { +fxl::WeakPtr PlatformViewIOS::GetWeakPtr() { return weak_factory_.GetWeakPtr(); } @@ -96,14 +96,14 @@ void PlatformViewIOS::UpdateSemantics(std::vector update) accessibility_bridge_->UpdateSemantics(std::move(update)); } -void PlatformViewIOS::HandlePlatformMessage(ftl::RefPtr message) { +void PlatformViewIOS::HandlePlatformMessage(fxl::RefPtr message) { platform_message_router_.HandlePlatformMessage(std::move(message)); } void PlatformViewIOS::RunFromSource(const std::string& assets_directory, const std::string& main, const std::string& packages) { - auto latch = new ftl::ManualResetWaitableEvent(); + auto latch = new fxl::ManualResetWaitableEvent(); dispatch_async(dispatch_get_main_queue(), ^{ SetupAndLoadFromSource(assets_directory, main, packages); diff --git a/engine/src/flutter/shell/platform/embedder/BUILD.gn b/engine/src/flutter/shell/platform/embedder/BUILD.gn index 079bc29387..156b8f4710 100644 --- a/engine/src/flutter/shell/platform/embedder/BUILD.gn +++ b/engine/src/flutter/shell/platform/embedder/BUILD.gn @@ -18,7 +18,7 @@ source_set("embedder") { "//flutter/fml", "//flutter/shell/common", "//flutter/shell/gpu", - "//garnet/public/lib/ftl", + "//garnet/public/lib/fxl", "//lib/tonic", "//third_party/skia", ] diff --git a/engine/src/flutter/shell/platform/linux/BUILD.gn b/engine/src/flutter/shell/platform/linux/BUILD.gn index 8af0925b59..8c43c7000f 100644 --- a/engine/src/flutter/shell/platform/linux/BUILD.gn +++ b/engine/src/flutter/shell/platform/linux/BUILD.gn @@ -16,7 +16,7 @@ executable("linux") { "//flutter/fml", "//flutter/shell/common", "//flutter/shell/testing", - "//garnet/public/lib/ftl", + "//garnet/public/lib/fxl", "//lib/tonic", "//third_party/skia", ] diff --git a/engine/src/flutter/shell/testing/BUILD.gn b/engine/src/flutter/shell/testing/BUILD.gn index 95894b502d..768166cf7f 100644 --- a/engine/src/flutter/shell/testing/BUILD.gn +++ b/engine/src/flutter/shell/testing/BUILD.gn @@ -15,7 +15,7 @@ source_set("testing") { deps = [ "//flutter/common", "//flutter/shell/common", - "//garnet/public/lib/ftl", + "//garnet/public/lib/fxl", "//third_party/skia", ] } diff --git a/engine/src/flutter/synchronization/BUILD.gn b/engine/src/flutter/synchronization/BUILD.gn index c12fbc9f86..82bee1c2b5 100644 --- a/engine/src/flutter/synchronization/BUILD.gn +++ b/engine/src/flutter/synchronization/BUILD.gn @@ -13,7 +13,7 @@ source_set("synchronization") { public_deps = [ "//flutter/glue", - "//garnet/public/lib/ftl", + "//garnet/public/lib/fxl", ] } diff --git a/engine/src/flutter/third_party/txt/BUILD.gn b/engine/src/flutter/third_party/txt/BUILD.gn index cbcd00aae1..8221a8328d 100644 --- a/engine/src/flutter/third_party/txt/BUILD.gn +++ b/engine/src/flutter/third_party/txt/BUILD.gn @@ -114,7 +114,7 @@ source_set("txt") { public_configs = [ ":txt_config" ] public_deps = [ - "//garnet/public/lib/ftl", + "//garnet/public/lib/fxl", "//third_party/harfbuzz", "//third_party/icu", "//third_party/skia", diff --git a/engine/src/flutter/vulkan/BUILD.gn b/engine/src/flutter/vulkan/BUILD.gn index d926ce9d74..1f69c32f18 100644 --- a/engine/src/flutter/vulkan/BUILD.gn +++ b/engine/src/flutter/vulkan/BUILD.gn @@ -58,7 +58,7 @@ source_set("vulkan") { } deps = [ - "//garnet/public/lib/ftl", + "//garnet/public/lib/fxl", "//third_party/skia", "//third_party/skia:gpu", ]