Skip to content

Commit

Permalink
Fix remaining ftl->fxl conversions (flutter#4091)
Browse files Browse the repository at this point in the history
* Fix remaining ftl->fxl conversions

The previous scripting pass at this did not account for objective c file endings

* Update tonic DEPS reference to the post-fxl version
  • Loading branch information
George Kulakowski authored Sep 11, 2017
1 parent 3aa7522 commit 6502090
Show file tree
Hide file tree
Showing 41 changed files with 229 additions and 229 deletions.
2 changes: 1 addition & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion assets/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ source_set("assets") {

deps = [
"//flutter/glue",
"//garnet/public/lib/ftl",
"//garnet/public/lib/fxl",
"//garnet/public/lib/zip",
]

Expand Down
2 changes: 1 addition & 1 deletion common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ source_set("common") {
]

deps = [
"//garnet/public/lib/ftl",
"//garnet/public/lib/fxl",
]

public_configs = [ ":flutter_config" ]
Expand Down
4 changes: 2 additions & 2 deletions fml/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -113,6 +113,6 @@ executable("fml_unittests") {
"//dart/runtime:libdart_jit",
"//flutter/fml",
"//flutter/testing",
"//garnet/public/lib/ftl",
"//garnet/public/lib/fxl",
]
}
12 changes: 6 additions & 6 deletions fml/platform/darwin/message_loop_darwin.mm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

MessageLoopDarwin::MessageLoopDarwin()
: running_(false), loop_((CFRunLoopRef)CFRetain(CFRunLoopGetCurrent())) {
FTL_DCHECK(loop_ != nullptr);
FXL_DCHECK(loop_ != nullptr);

// Setup the delayed wake source.
CFRunLoopTimerContext timer_context = {
Expand All @@ -25,7 +25,7 @@
reinterpret_cast<CFRunLoopTimerCallBack>(&MessageLoopDarwin::OnTimerFire)
/* callout */,
&timer_context /* context */));
FTL_DCHECK(delayed_wake_timer_ != nullptr);
FXL_DCHECK(delayed_wake_timer_ != nullptr);
CFRunLoopAddTimer(loop_, delayed_wake_timer_, kCFRunLoopCommonModes);
}

Expand All @@ -35,7 +35,7 @@
}

void MessageLoopDarwin::Run() {
FTL_DCHECK(loop_ == CFRunLoopGetCurrent());
FXL_DCHECK(loop_ == CFRunLoopGetCurrent());

running_ = true;

Expand All @@ -59,12 +59,12 @@
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) {
Expand Down
2 changes: 1 addition & 1 deletion fml/platform/darwin/paths_darwin.mm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <Foundation/Foundation.h>

#include "lib/ftl/files/path.h"
#include "lib/fxl/files/path.h"

namespace fml {
namespace paths {
Expand Down
2 changes: 1 addition & 1 deletion glue/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ source_set("glue") {
]

deps = [
"//garnet/public/lib/ftl",
"//garnet/public/lib/fxl",
]

if (is_fuchsia) {
Expand Down
2 changes: 1 addition & 1 deletion lib/io/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
}
2 changes: 1 addition & 1 deletion runtime/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion shell/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion shell/gpu/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/android/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/darwin/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
}
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/darwin/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
}
14 changes: 7 additions & 7 deletions shell/platform/darwin/common/platform_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string> 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 {
Expand All @@ -37,7 +37,7 @@
// 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();
Expand All @@ -52,7 +52,7 @@
~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) {
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/darwin/desktop/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
}
Expand Down
6 changes: 3 additions & 3 deletions shell/platform/darwin/desktop/platform_view_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down Expand Up @@ -146,7 +146,7 @@
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);
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/darwin/ios/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -74,7 +74,7 @@ - (void)applicationDidEnterBackground:(UIApplication*)application {
_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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down
8 changes: 4 additions & 4 deletions shell/platform/darwin/ios/framework/Source/FlutterView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()<UIInputViewAudioFeedback>
Expand Down Expand Up @@ -43,7 +43,7 @@ - (BOOL)enableInputClicksWhenVisible {
return YES;
}

void SnapshotRasterizer(ftl::WeakPtr<shell::Rasterizer> rasterizer,
void SnapshotRasterizer(fxl::WeakPtr<shell::Rasterizer> rasterizer,
CGContextRef context,
bool is_opaque) {
if (!rasterizer) {
Expand Down Expand Up @@ -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<ftl::WeakPtr<shell::Rasterizer>> registered_rasterizers;
std::vector<fxl::WeakPtr<shell::Rasterizer>> registered_rasterizers;
shell::Shell::Shared().GetRasterizers(&registered_rasterizers);
for (auto& rasterizer : registered_rasterizers) {
SnapshotRasterizer(rasterizer, context, is_opaque);
Expand All @@ -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();
Expand Down
Loading

0 comments on commit 6502090

Please sign in to comment.