From bc2acf7bddd855898ceb245a8a2ecf83c634ec8d Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Wed, 8 Nov 2017 16:48:00 -0800 Subject: [PATCH] Revert "Roll Fuchsia buildtools to 85907c59e97527d79bbfdfd849d8e85c24959cc5 (#4331)" (#4340) With the update to HEAD of the Fuchsia buildtools repo, the new clang toolchain picked up caused link-time breakage in android x86_64 libFlutter.so builds. Sample log: https://build.chromium.org/p/client.flutter/builders/Linux%20Engine/builds/1974/steps/build%20android_debug_x64/logs/stdio Sample failure: FAILED: libflutter.so libflutter.so.TOC lib.stripped/libflutter.so ../../third_party/android_tools/ndk/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld.gold: error: obj/flutter/shell/platform/android/libflutter/android_context_gl.o: unsupported reloc 42 against global symbol std::__ndk1::num_put > >::id This reverts commit 8ad42f0dae3cb1267c2b9ab99db80e4696ddbc3d. --- DEPS | 4 +- content_handler/runtime_holder.cc | 97 ++++++++++--------- lib/ui/painting/codec.cc | 40 ++++---- lib/ui/painting/image_decoding.cc | 22 ++--- .../window/platform_message_response_dart.cc | 8 +- shell/common/animator.cc | 45 ++++----- shell/common/engine.cc | 24 ++--- shell/common/platform_view.cc | 37 ++++--- shell/common/shell.cc | 40 ++++---- shell/gpu/gpu_surface_software.cc | 7 +- shell/gpu/gpu_surface_vulkan.cc | 8 +- .../platform/android/platform_view_android.cc | 61 ++++++------ shell/platform/darwin/common/platform_mac.mm | 2 +- .../platform/darwin/desktop/flutter_window.mm | 4 +- .../darwin/desktop/platform_view_mac.mm | 6 +- .../framework/Source/FlutterDartProject.mm | 20 ++-- .../framework/Source/FlutterViewController.mm | 6 +- .../ios/framework/Source/vsync_waiter_ios.mm | 7 +- .../platform/darwin/ios/platform_view_ios.mm | 2 +- shell/platform/embedder/embedder.cc | 75 +++++++------- shell/testing/test_runner.cc | 4 +- .../fonts/opentype/OpenTypeVerticalData.cpp | 2 +- sky/engine/wtf/HexNumber.h | 2 +- sky/engine/wtf/PartitionAlloc.h | 6 +- sky/engine/wtf/PassOwnPtr.h | 2 +- sky/engine/wtf/PassRefPtr.h | 2 +- sky/engine/wtf/PrintStream.h | 2 +- sky/engine/wtf/Threading.h | 2 +- sky/engine/wtf/dtoa.h | 4 +- sky/engine/wtf/text/StringImpl.h | 4 +- sky/engine/wtf/text/WTFString.h | 10 +- sky/engine/wtf/unicode/CharacterNames.h | 2 +- 32 files changed, 292 insertions(+), 265 deletions(-) diff --git a/DEPS b/DEPS index 19a7bd4d01e..4b7795e1f11 100644 --- a/DEPS +++ b/DEPS @@ -101,7 +101,7 @@ vars = { # Build bot tooling for iOS 'ios_tools_revision': '69b7c1b160e7107a6a98d948363772dc9caea46f', - 'buildtools_revision': '85907c59e97527d79bbfdfd849d8e85c24959cc5', + 'buildtools_revision': '5b8eb38aaf523f0124756454276cd0a5b720c17e', } # Only these hosts are allowed for dependencies in this DEPS file. @@ -114,7 +114,7 @@ allowed_hosts = [ ] deps = { - 'src': 'https://github.com/flutter/buildroot.git' + '@' + 'a457e1429ed9e4a1869c8192b846bebb481f333a', + 'src': 'https://github.com/flutter/buildroot.git' + '@' + 'd65893e469b3cdff75e0a157a5a219096ca6193a', # Fuchsia compatibility # diff --git a/content_handler/runtime_holder.cc b/content_handler/runtime_holder.cc index f2fbb9c837c..8cffdbd2023 100644 --- a/content_handler/runtime_holder.cc +++ b/content_handler/runtime_holder.cc @@ -96,8 +96,8 @@ RuntimeHolder::RuntimeHolder() RuntimeHolder::~RuntimeHolder() { blink::Threads::Gpu()->PostTask( - fxl::MakeCopyable([rasterizer = std::move(rasterizer_)]() { - // Deletes rasterizer. + fxl::MakeCopyable([rasterizer = std::move(rasterizer_)](){ + // Deletes rasterizer. })); } @@ -227,32 +227,33 @@ void RuntimeHolder::CreateView( fidl::InterfaceHandle scene_manager; view_manager_->GetSceneManager(scene_manager.NewRequest()); - blink::Threads::Gpu()->PostTask( - fxl::MakeCopyable([rasterizer = rasterizer_.get(), // - scene_manager = std::move(scene_manager), // - import_token = std::move(import_token), // - weak_runtime_holder = GetWeakPtr()]() mutable { - ASSERT_IS_GPU_THREAD; - rasterizer->SetScene( - std::move(scene_manager), std::move(import_token), - // TODO(MZ-222): Ideally we would immediately redraw the previous - // layer tree when the metrics change since there's no need to - // rerecord it. However, we want to make sure there's only one - // outstanding frame. We should improve the frame scheduling so that - // the rasterizer thread can self-schedule re-rasterization. - [weak_runtime_holder] { - // This is on the GPU thread thread. Post to the Platform/UI - // thread for the completion callback. - ASSERT_IS_GPU_THREAD; - blink::Threads::Platform()->PostTask([weak_runtime_holder]() { - // On the Platform/UI thread. - ASSERT_IS_UI_THREAD; - if (weak_runtime_holder) { - weak_runtime_holder->OnRedrawFrame(); - } - }); - }); - })); + blink::Threads::Gpu()->PostTask(fxl::MakeCopyable([ + rasterizer = rasterizer_.get(), // + scene_manager = std::move(scene_manager), // + import_token = std::move(import_token), // + weak_runtime_holder = GetWeakPtr() + ]() mutable { + ASSERT_IS_GPU_THREAD; + rasterizer->SetScene( + std::move(scene_manager), std::move(import_token), + // TODO(MZ-222): Ideally we would immediately redraw the previous layer + // tree when the metrics change since there's no need to rerecord it. + // However, we want to make sure there's only one outstanding frame. + // We should improve the frame scheduling so that the rasterizer thread + // can self-schedule re-rasterization. + [weak_runtime_holder] { + // This is on the GPU thread thread. Post to the Platform/UI + // thread for the completion callback. + ASSERT_IS_GPU_THREAD; + blink::Threads::Platform()->PostTask([weak_runtime_holder]() { + // On the Platform/UI thread. + ASSERT_IS_UI_THREAD; + if (weak_runtime_holder) { + weak_runtime_holder->OnRedrawFrame(); + } + }); + }); + })); runtime_ = blink::RuntimeController::Create(this); const uint8_t* isolate_snapshot_data; @@ -330,27 +331,27 @@ void RuntimeHolder::Render(std::unique_ptr layer_tree) { // We are on the Platform/UI thread. Post to the GPU thread to render. ASSERT_IS_PLATFORM_THREAD; - blink::Threads::Gpu()->PostTask( - fxl::MakeCopyable([rasterizer = rasterizer_.get(), // - layer_tree = std::move(layer_tree), // - weak_runtime_holder = GetWeakPtr() // + blink::Threads::Gpu()->PostTask(fxl::MakeCopyable([ + rasterizer = rasterizer_.get(), // + layer_tree = std::move(layer_tree), // + weak_runtime_holder = GetWeakPtr() // ]() mutable { - // On the GPU Thread. - ASSERT_IS_GPU_THREAD; - rasterizer->Draw(std::move(layer_tree), [weak_runtime_holder]() { - // This is on the GPU thread thread. Post to the Platform/UI thread - // for the completion callback. - ASSERT_IS_GPU_THREAD; - blink::Threads::Platform()->PostTask([weak_runtime_holder]() { - // On the Platform/UI thread. - ASSERT_IS_UI_THREAD; - if (weak_runtime_holder) { - weak_runtime_holder->frame_rendering_ = false; - weak_runtime_holder->OnFrameComplete(); - } - }); - }); - })); + // On the GPU Thread. + ASSERT_IS_GPU_THREAD; + rasterizer->Draw(std::move(layer_tree), [weak_runtime_holder]() { + // This is on the GPU thread thread. Post to the Platform/UI thread + // for the completion callback. + ASSERT_IS_GPU_THREAD; + blink::Threads::Platform()->PostTask([weak_runtime_holder]() { + // On the Platform/UI thread. + ASSERT_IS_UI_THREAD; + if (weak_runtime_holder) { + weak_runtime_holder->frame_rendering_ = false; + weak_runtime_holder->OnFrameComplete(); + } + }); + }); + })); } void RuntimeHolder::UpdateSemantics(std::vector update) { diff --git a/lib/ui/painting/codec.cc b/lib/ui/painting/codec.cc index 0bf95b82f47..6a5de26aafb 100644 --- a/lib/ui/painting/codec.cc +++ b/lib/ui/painting/codec.cc @@ -93,11 +93,11 @@ void InitCodecAndInvokeCodecCallback( sk_sp buffer, size_t trace_id) { auto codec = InitCodec(std::move(buffer), trace_id); - Threads::UI()->PostTask( - fxl::MakeCopyable([callback = std::move(callback), - codec = std::move(codec), trace_id]() mutable { - InvokeCodecCallback(std::move(codec), std::move(callback), trace_id); - })); + Threads::UI()->PostTask(fxl::MakeCopyable([ + callback = std::move(callback), codec = std::move(codec), trace_id + ]() mutable { + InvokeCodecCallback(std::move(codec), std::move(callback), trace_id); + })); } void InstantiateImageCodec(Dart_NativeArguments args) { @@ -124,13 +124,14 @@ void InstantiateImageCodec(Dart_NativeArguments args) { auto buffer = SkData::MakeWithCopy(list.data(), list.num_elements()); - Threads::IO()->PostTask( - fxl::MakeCopyable([callback = std::make_unique( - tonic::DartState::Current(), callback_handle), - buffer = std::move(buffer), trace_id]() mutable { - InitCodecAndInvokeCodecCallback(std::move(callback), std::move(buffer), - trace_id); - })); + Threads::IO()->PostTask(fxl::MakeCopyable([ + callback = std::make_unique( + tonic::DartState::Current(), callback_handle), + buffer = std::move(buffer), trace_id + ]() mutable { + InitCodecAndInvokeCodecCallback(std::move(callback), std::move(buffer), + trace_id); + })); } bool copy_to(SkBitmap* dst, SkColorType dstColorType, const SkBitmap& src) { @@ -252,7 +253,7 @@ void MultiFrameCodec::GetNextFrameAndInvokeCallback( nextFrameIndex_ = (nextFrameIndex_ + 1) % frameInfos_.size(); Threads::UI()->PostTask(fxl::MakeCopyable( - [callback = std::move(callback), frameInfo, trace_id]() mutable { + [ callback = std::move(callback), frameInfo, trace_id ]() mutable { InvokeNextFrameCallback(frameInfo, std::move(callback), trace_id); })); @@ -269,12 +270,13 @@ Dart_Handle MultiFrameCodec::getNextFrame(Dart_Handle callback_handle) { return ToDart("Callback must be a function"); } - Threads::IO()->PostTask( - fxl::MakeCopyable([callback = std::make_unique( - tonic::DartState::Current(), callback_handle), - this, trace_id]() mutable { - GetNextFrameAndInvokeCallback(std::move(callback), trace_id); - })); + Threads::IO()->PostTask(fxl::MakeCopyable([ + callback = std::make_unique( + tonic::DartState::Current(), callback_handle), + this, trace_id + ]() mutable { + GetNextFrameAndInvokeCallback(std::move(callback), trace_id); + })); return Dart_Null(); } diff --git a/lib/ui/painting/image_decoding.cc b/lib/ui/painting/image_decoding.cc index 2ba6077d8c3..fdcff961b2c 100644 --- a/lib/ui/painting/image_decoding.cc +++ b/lib/ui/painting/image_decoding.cc @@ -68,10 +68,9 @@ void DecodeImageAndInvokeImageCallback( sk_sp buffer, size_t trace_id) { sk_sp image = DecodeImage(std::move(buffer), trace_id); - Threads::UI()->PostTask(fxl::MakeCopyable( - [callback = std::move(callback), image, trace_id]() mutable { - InvokeImageCallback(image, std::move(callback), trace_id); - })); + Threads::UI()->PostTask(fxl::MakeCopyable([ + callback = std::move(callback), image, trace_id + ]() mutable { InvokeImageCallback(image, std::move(callback), trace_id); })); } void DecodeImageFromList(Dart_NativeArguments args) { @@ -98,13 +97,14 @@ void DecodeImageFromList(Dart_NativeArguments args) { auto buffer = SkData::MakeWithCopy(list.data(), list.num_elements()); - Threads::IO()->PostTask( - fxl::MakeCopyable([callback = std::make_unique( - tonic::DartState::Current(), callback_handle), - buffer = std::move(buffer), trace_id]() mutable { - DecodeImageAndInvokeImageCallback(std::move(callback), - std::move(buffer), trace_id); - })); + Threads::IO()->PostTask(fxl::MakeCopyable([ + callback = std::make_unique( + tonic::DartState::Current(), callback_handle), + buffer = std::move(buffer), trace_id + ]() mutable { + DecodeImageAndInvokeImageCallback(std::move(callback), std::move(buffer), + trace_id); + })); } } // namespace diff --git a/lib/ui/window/platform_message_response_dart.cc b/lib/ui/window/platform_message_response_dart.cc index 6e93e99b99f..adddae83653 100644 --- a/lib/ui/window/platform_message_response_dart.cc +++ b/lib/ui/window/platform_message_response_dart.cc @@ -19,8 +19,10 @@ PlatformMessageResponseDart::PlatformMessageResponseDart( PlatformMessageResponseDart::~PlatformMessageResponseDart() { if (!callback_.is_empty()) { - Threads::UI()->PostTask(fxl::MakeCopyable( - [callback = std::move(callback_)]() mutable { callback.Clear(); })); + Threads::UI()->PostTask( + fxl::MakeCopyable([callback = std::move(callback_)]() mutable { + callback.Clear(); + })); } } @@ -30,7 +32,7 @@ void PlatformMessageResponseDart::Complete(std::vector data) { FXL_DCHECK(!is_complete_); is_complete_ = true; Threads::UI()->PostTask(fxl::MakeCopyable( - [callback = std::move(callback_), data = std::move(data)]() mutable { + [ callback = std::move(callback_), data = std::move(data) ]() mutable { tonic::DartState* dart_state = callback.dart_state().get(); if (!dart_state) return; diff --git a/shell/common/animator.cc b/shell/common/animator.cc index 1666a5fadaa..30deb0638b6 100644 --- a/shell/common/animator.cc +++ b/shell/common/animator.cc @@ -107,9 +107,10 @@ void Animator::Render(std::unique_ptr layer_tree) { // Commit the pending continuation. producer_continuation_.Complete(std::move(layer_tree)); - blink::Threads::Gpu()->PostTask([rasterizer = rasterizer_, - pipeline = layer_tree_pipeline_, - frame_id = FrameParity()]() { + blink::Threads::Gpu()->PostTask([ + rasterizer = rasterizer_, pipeline = layer_tree_pipeline_, + frame_id = FrameParity() + ]() { if (!rasterizer.get()) return; TRACE_EVENT2("flutter", "GPU Workload", "mode", "basic", "frame", frame_id); @@ -150,29 +151,29 @@ void Animator::RequestFrame(bool regenerate_layer_tree) { // started an expensive operation right after posting this message however. // To support that, we need edge triggered wakes on VSync. - blink::Threads::UI()->PostTask([self = weak_factory_.GetWeakPtr(), - frame_number = frame_number_]() { - if (!self.get()) { - return; - } - TRACE_EVENT_ASYNC_BEGIN0("flutter", "Frame Request Pending", frame_number); - self->AwaitVSync(); - }); + blink::Threads::UI()->PostTask( + [ self = weak_factory_.GetWeakPtr(), frame_number = frame_number_ ]() { + if (!self.get()) { + return; + } + TRACE_EVENT_ASYNC_BEGIN0("flutter", "Frame Request Pending", + frame_number); + self->AwaitVSync(); + }); frame_scheduled_ = true; } void Animator::AwaitVSync() { - waiter_->AsyncWaitForVsync( - [self = weak_factory_.GetWeakPtr()](fxl::TimePoint frame_start_time, - fxl::TimePoint frame_target_time) { - if (self) { - if (self->CanReuseLastLayerTree()) { - self->DrawLastLayerTree(); - } else { - self->BeginFrame(frame_start_time, frame_target_time); - } - } - }); + waiter_->AsyncWaitForVsync([self = weak_factory_.GetWeakPtr()]( + fxl::TimePoint frame_start_time, fxl::TimePoint frame_target_time) { + if (self) { + if (self->CanReuseLastLayerTree()) { + self->DrawLastLayerTree(); + } else { + self->BeginFrame(frame_start_time, frame_target_time); + } + } + }); engine_->NotifyIdle(dart_frame_deadline_); } diff --git a/shell/common/engine.cc b/shell/common/engine.cc index 16446073071..b092ab2addc 100644 --- a/shell/common/engine.cc +++ b/shell/common/engine.cc @@ -540,12 +540,12 @@ void Engine::Render(std::unique_ptr layer_tree) { } void Engine::UpdateSemantics(std::vector update) { - blink::Threads::Platform()->PostTask( - fxl::MakeCopyable([platform_view = platform_view_.lock(), - update = std::move(update)]() mutable { - if (platform_view) - platform_view->UpdateSemantics(std::move(update)); - })); + blink::Threads::Platform()->PostTask(fxl::MakeCopyable([ + platform_view = platform_view_.lock(), update = std::move(update) + ]() mutable { + if (platform_view) + platform_view->UpdateSemantics(std::move(update)); + })); } void Engine::HandlePlatformMessage( @@ -554,12 +554,12 @@ void Engine::HandlePlatformMessage( HandleAssetPlatformMessage(std::move(message)); return; } - blink::Threads::Platform()->PostTask( - [platform_view = platform_view_.lock(), - message = std::move(message)]() mutable { - if (platform_view) - platform_view->HandlePlatformMessage(std::move(message)); - }); + blink::Threads::Platform()->PostTask([ + platform_view = platform_view_.lock(), message = std::move(message) + ]() mutable { + if (platform_view) + platform_view->HandlePlatformMessage(std::move(message)); + }); } void Engine::HandleAssetPlatformMessage( diff --git a/shell/common/platform_view.cc b/shell/common/platform_view.cc index e7332404803..eaa293634e8 100644 --- a/shell/common/platform_view.cc +++ b/shell/common/platform_view.cc @@ -45,7 +45,7 @@ void PlatformView::CreateEngine() { void PlatformView::DispatchPlatformMessage( fxl::RefPtr message) { blink::Threads::UI()->PostTask( - [engine = engine_->GetWeakPtr(), message = std::move(message)] { + [ engine = engine_->GetWeakPtr(), message = std::move(message) ] { if (engine) { engine->DispatchPlatformMessage(message); } @@ -54,16 +54,17 @@ void PlatformView::DispatchPlatformMessage( void PlatformView::DispatchSemanticsAction(int32_t id, blink::SemanticsAction action) { - blink::Threads::UI()->PostTask([engine = engine_->GetWeakPtr(), id, action] { - if (engine) { - engine->DispatchSemanticsAction( - id, static_cast(action)); - } - }); + blink::Threads::UI()->PostTask( + [ engine = engine_->GetWeakPtr(), id, action ] { + if (engine) { + engine->DispatchSemanticsAction( + id, static_cast(action)); + } + }); } void PlatformView::SetSemanticsEnabled(bool enabled) { - blink::Threads::UI()->PostTask([engine = engine_->GetWeakPtr(), enabled] { + blink::Threads::UI()->PostTask([ engine = engine_->GetWeakPtr(), enabled ] { if (engine) engine->SetSemanticsEnabled(enabled); }); @@ -77,14 +78,18 @@ void PlatformView::NotifyCreated(std::unique_ptr surface, fxl::Closure caller_continuation) { fxl::AutoResetWaitableEvent latch; - auto ui_continuation = fxl::MakeCopyable([this, // - surface = std::move(surface), // - caller_continuation, // - &latch]() mutable { - auto gpu_continuation = fxl::MakeCopyable([this, // - surface = std::move(surface), // - caller_continuation, // - &latch]() mutable { + auto ui_continuation = fxl::MakeCopyable([ + this, // + surface = std::move(surface), // + caller_continuation, // + &latch + ]() mutable { + auto gpu_continuation = fxl::MakeCopyable([ + this, // + surface = std::move(surface), // + caller_continuation, // + &latch + ]() mutable { // Runs on the GPU Thread. So does the Caller Continuation. rasterizer_->Setup(std::move(surface), caller_continuation, &latch); }); diff --git a/shell/common/shell.cc b/shell/common/shell.cc index e2a799c785b..aa8b34f5c7a 100644 --- a/shell/common/shell.cc +++ b/shell/common/shell.cc @@ -262,25 +262,27 @@ void Shell::RunInPlatformViewUIThread(uintptr_t view_id, *view_existed = false; IteratePlatformViews( - [view_id, // argument - assets_directory = std::move(assets_directory), // argument - main = std::move(main), // argument - packages = std::move(packages), // argument - &view_existed, // out - &dart_isolate_id, // out - &isolate_name // out - ](PlatformView* view) -> bool { - if (reinterpret_cast(view) != view_id) { - // Keep looking. - return true; - } - *view_existed = true; - view->RunFromSource(assets_directory, main, packages); - *dart_isolate_id = view->engine().GetUIIsolateMainPort(); - *isolate_name = view->engine().GetUIIsolateName(); - // We found the requested view. Stop iterating over platform views. - return false; - }); + [ + view_id, // argument + assets_directory = std::move(assets_directory), // argument + main = std::move(main), // argument + packages = std::move(packages), // argument + &view_existed, // out + &dart_isolate_id, // out + &isolate_name // out + ](PlatformView * view) + ->bool { + if (reinterpret_cast(view) != view_id) { + // Keep looking. + return true; + } + *view_existed = true; + view->RunFromSource(assets_directory, main, packages); + *dart_isolate_id = view->engine().GetUIIsolateMainPort(); + *isolate_name = view->engine().GetUIIsolateName(); + // We found the requested view. Stop iterating over platform views. + return false; + }); latch->Signal(); } diff --git a/shell/gpu/gpu_surface_software.cc b/shell/gpu/gpu_surface_software.cc index 9dc444438b5..e340e605652 100644 --- a/shell/gpu/gpu_surface_software.cc +++ b/shell/gpu/gpu_surface_software.cc @@ -50,9 +50,10 @@ std::unique_ptr GPUSurfaceSoftware::AcquireFrame( canvas->resetMatrix(); canvas->scale(scale, scale); - SurfaceFrame::SubmitCallback on_submit = - [self = weak_factory_.GetWeakPtr()](const SurfaceFrame& surface_frame, - SkCanvas* canvas) -> bool { + SurfaceFrame::SubmitCallback + on_submit = [self = weak_factory_.GetWeakPtr()]( + const SurfaceFrame& surface_frame, SkCanvas* canvas) + ->bool { // If the surface itself went away, there is nothing more to do. if (!self || !self->IsValid() || canvas == nullptr) { return false; diff --git a/shell/gpu/gpu_surface_vulkan.cc b/shell/gpu/gpu_surface_vulkan.cc index 7ee946ccf30..5787469d4e4 100644 --- a/shell/gpu/gpu_surface_vulkan.cc +++ b/shell/gpu/gpu_surface_vulkan.cc @@ -27,9 +27,11 @@ std::unique_ptr GPUSurfaceVulkan::AcquireFrame( return nullptr; } - SurfaceFrame::SubmitCallback callback = - [weak_this = weak_factory_.GetWeakPtr()](const SurfaceFrame&, - SkCanvas* canvas) -> bool { + SurfaceFrame::SubmitCallback callback = [weak_this = + weak_factory_.GetWeakPtr()]( + const SurfaceFrame&, + SkCanvas* canvas) + ->bool { // Frames are only ever acquired on the GPU thread. This is also the thread // on which the weak pointer factory is collected (as this instance is owned // by the rasterizer). So this use of weak pointers is safe. diff --git a/shell/platform/android/platform_view_android.cc b/shell/platform/android/platform_view_android.cc index d1875ffa5af..1776d2744e6 100644 --- a/shell/platform/android/platform_view_android.cc +++ b/shell/platform/android/platform_view_android.cc @@ -38,7 +38,7 @@ class PlatformMessageResponseAndroid : public blink::PlatformMessageResponse { void Complete(std::vector data) override { fxl::RefPtr self(this); blink::Threads::Platform()->PostTask( - fxl::MakeCopyable([self, data = std::move(data)]() mutable { + fxl::MakeCopyable([ self, data = std::move(data) ]() mutable { std::shared_ptr view = self->view_.lock(); if (!view) return; @@ -182,11 +182,9 @@ void PlatformViewAndroid::SurfaceCreated(JNIEnv* env, return; } - NotifyCreated( - std::move(gpu_surface), - [this, backgroundColor, native_window_size = native_window->GetSize()] { - rasterizer().Clear(backgroundColor, native_window_size); - }); + NotifyCreated(std::move(gpu_surface), [ + this, backgroundColor, native_window_size = native_window->GetSize() + ] { rasterizer().Clear(backgroundColor, native_window_size); }); } void PlatformViewAndroid::SurfaceChanged(jint width, jint height) { @@ -213,28 +211,30 @@ void PlatformViewAndroid::RunBundleAndSnapshot(std::string bundle_path, std::string snapshot_override, std::string entrypoint, bool reuse_runtime_controller) { - blink::Threads::UI()->PostTask( - [engine = engine_->GetWeakPtr(), bundle_path = std::move(bundle_path), - snapshot_override = std::move(snapshot_override), - entrypoint = std::move(entrypoint), - reuse_runtime_controller = reuse_runtime_controller] { - if (engine) - engine->RunBundleAndSnapshot( - std::move(bundle_path), std::move(snapshot_override), - std::move(entrypoint), reuse_runtime_controller); - }); + blink::Threads::UI()->PostTask([ + engine = engine_->GetWeakPtr(), bundle_path = std::move(bundle_path), + snapshot_override = std::move(snapshot_override), + entrypoint = std::move(entrypoint), + reuse_runtime_controller = reuse_runtime_controller + ] { + if (engine) + engine->RunBundleAndSnapshot( + std::move(bundle_path), std::move(snapshot_override), + std::move(entrypoint), reuse_runtime_controller); + }); } void PlatformViewAndroid::RunBundleAndSource(std::string bundle_path, std::string main, std::string packages) { - blink::Threads::UI()->PostTask( - [engine = engine_->GetWeakPtr(), bundle_path = std::move(bundle_path), - main = std::move(main), packages = std::move(packages)] { - if (engine) - engine->RunBundleAndSource(std::move(bundle_path), std::move(main), - std::move(packages)); - }); + blink::Threads::UI()->PostTask([ + engine = engine_->GetWeakPtr(), bundle_path = std::move(bundle_path), + main = std::move(main), packages = std::move(packages) + ] { + if (engine) + engine->RunBundleAndSource(std::move(bundle_path), std::move(main), + std::move(packages)); + }); } void PlatformViewAndroid::SetViewportMetrics(jfloat device_pixel_ratio, @@ -253,7 +253,7 @@ void PlatformViewAndroid::SetViewportMetrics(jfloat device_pixel_ratio, metrics.physical_padding_bottom = physical_padding_bottom; metrics.physical_padding_left = physical_padding_left; - blink::Threads::UI()->PostTask([engine = engine_->GetWeakPtr(), metrics] { + blink::Threads::UI()->PostTask([ engine = engine_->GetWeakPtr(), metrics ] { if (engine) engine->SetViewportMetrics(metrics); }); @@ -299,12 +299,13 @@ void PlatformViewAndroid::DispatchPointerDataPacket(JNIEnv* env, jint position) { uint8_t* data = static_cast(env->GetDirectBufferAddress(buffer)); - blink::Threads::UI()->PostTask(fxl::MakeCopyable( - [engine = engine_->GetWeakPtr(), - packet = std::make_unique(data, position)] { - if (engine.get()) - engine->DispatchPointerDataPacket(*packet); - })); + blink::Threads::UI()->PostTask(fxl::MakeCopyable([ + engine = engine_->GetWeakPtr(), + packet = std::make_unique(data, position) + ] { + if (engine.get()) + engine->DispatchPointerDataPacket(*packet); + })); } void PlatformViewAndroid::InvokePlatformMessageResponseCallback( diff --git a/shell/platform/darwin/common/platform_mac.mm b/shell/platform/darwin/common/platform_mac.mm index 5270d192fa9..f0671955d43 100644 --- a/shell/platform/darwin/common/platform_mac.mm +++ b/shell/platform/darwin/common/platform_mac.mm @@ -146,7 +146,7 @@ bool AttemptLaunchFromCommandLineSwitches(Engine* engine) { [defaults synchronize]; - blink::Threads::UI()->PostTask([engine = engine->GetWeakPtr(), bundle_path, main, packages] { + blink::Threads::UI()->PostTask([ engine = engine->GetWeakPtr(), bundle_path, main, packages ] { if (engine) engine->RunBundleAndSource(bundle_path, main, packages); }); diff --git a/shell/platform/darwin/desktop/flutter_window.mm b/shell/platform/darwin/desktop/flutter_window.mm index 92f4eaca14e..ca080e92757 100644 --- a/shell/platform/darwin/desktop/flutter_window.mm +++ b/shell/platform/darwin/desktop/flutter_window.mm @@ -79,7 +79,7 @@ static inline blink::PointerData::Change PointerChangeFromNSEventPhase(NSEventPh metrics.physical_width = size.width; metrics.physical_height = size.height; - blink::Threads::UI()->PostTask([engine = _platformView->engine().GetWeakPtr(), metrics] { + blink::Threads::UI()->PostTask([ engine = _platformView->engine().GetWeakPtr(), metrics ] { if (engine.get()) { engine->SetViewportMetrics(metrics); } @@ -134,7 +134,7 @@ static inline blink::PointerData::Change PointerChangeFromNSEventPhase(NSEventPh break; } - blink::Threads::UI()->PostTask([engine = _platformView->engine().GetWeakPtr(), pointer_data] { + blink::Threads::UI()->PostTask([ engine = _platformView->engine().GetWeakPtr(), pointer_data ] { if (engine.get()) { blink::PointerDataPacket packet(1); packet.SetPointerData(0, pointer_data); diff --git a/shell/platform/darwin/desktop/platform_view_mac.mm b/shell/platform/darwin/desktop/platform_view_mac.mm index ed35f30c105..0faf1a2ce13 100644 --- a/shell/platform/darwin/desktop/platform_view_mac.mm +++ b/shell/platform/darwin/desktop/platform_view_mac.mm @@ -42,7 +42,7 @@ void PlatformViewMac::SetupAndLoadDart() { std::string bundle_path = command_line.GetOptionValueWithDefault(FlagForSwitch(Switch::FLX), ""); if (!bundle_path.empty()) { - blink::Threads::UI()->PostTask([engine = engine().GetWeakPtr(), bundle_path] { + blink::Threads::UI()->PostTask([ engine = engine().GetWeakPtr(), bundle_path ] { if (engine) engine->RunBundle(bundle_path); }); @@ -54,7 +54,7 @@ void PlatformViewMac::SetupAndLoadDart() { std::string main = args[0]; std::string packages = command_line.GetOptionValueWithDefault(FlagForSwitch(Switch::Packages), ""); - blink::Threads::UI()->PostTask([engine = engine().GetWeakPtr(), main, packages] { + blink::Threads::UI()->PostTask([ engine = engine().GetWeakPtr(), main, packages ] { if (engine) engine->RunBundleAndSource(std::string(), main, packages); }); @@ -66,7 +66,7 @@ void PlatformViewMac::SetupAndLoadFromSource(const std::string& assets_directory const std::string& main, const std::string& packages) { blink::Threads::UI()->PostTask( - [engine = engine().GetWeakPtr(), assets_directory, main, packages] { + [ engine = engine().GetWeakPtr(), assets_directory, main, packages ] { if (engine) engine->RunBundleAndSource(assets_directory, main, packages); }); diff --git a/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm b/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm index bbbd236dde3..e220b326ad0 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm @@ -268,8 +268,9 @@ static NSString* NSStringFromVMType(VMType type) { } std::string bundle_path = path.UTF8String; - blink::Threads::UI()->PostTask([engine = engine->GetWeakPtr(), bundle_path, - entrypoint = std::string([entrypoint UTF8String])] { + blink::Threads::UI()->PostTask([ + engine = engine->GetWeakPtr(), bundle_path, entrypoint = std::string([entrypoint UTF8String]) + ] { if (engine) engine->RunBundle(bundle_path, entrypoint); }); @@ -295,18 +296,21 @@ static NSString* NSStringFromVMType(VMType type) { std::string bundle_path = _dartSource.flxArchive.absoluteURL.path.UTF8String; if (_dartSource.archiveContainsScriptSnapshot) { - blink::Threads::UI()->PostTask([engine = engine->GetWeakPtr(), bundle_path, - entrypoint = std::string([entrypoint UTF8String])] { + blink::Threads::UI()->PostTask([ + engine = engine->GetWeakPtr(), bundle_path, + entrypoint = std::string([entrypoint UTF8String]) + ] { if (engine) engine->RunBundle(bundle_path, entrypoint); }); } else { std::string main = _dartSource.dartMain.absoluteURL.path.UTF8String; std::string packages = _dartSource.packages.absoluteURL.path.UTF8String; - blink::Threads::UI()->PostTask([engine = engine->GetWeakPtr(), bundle_path, main, packages] { - if (engine) - engine->RunBundleAndSource(bundle_path, main, packages); - }); + blink::Threads::UI()->PostTask( + [ engine = engine->GetWeakPtr(), bundle_path, main, packages ] { + if (engine) + engine->RunBundleAndSource(bundle_path, main, packages); + }); } result(YES, @"Success"); diff --git a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm index d0498fbd09b..248e5dcf14a 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm @@ -36,7 +36,7 @@ class PlatformMessageResponseDarwin : public blink::PlatformMessageResponse { void Complete(std::vector data) override { fxl::RefPtr self(this); blink::Threads::Platform()->PostTask( - fxl::MakeCopyable([self, data = std::move(data)]() mutable { + fxl::MakeCopyable([ self, data = std::move(data) ]() mutable { self->callback_.get()(shell::GetNSDataFromVector(data)); })); } @@ -553,7 +553,7 @@ static inline blink::PointerData::DeviceKind DeviceKindFromTouchType(UITouch* to } blink::Threads::UI()->PostTask(fxl::MakeCopyable( - [engine = _platformView->engine().GetWeakPtr(), packet = std::move(packet)] { + [ engine = _platformView->engine().GetWeakPtr(), packet = std::move(packet) ] { if (engine.get()) engine->DispatchPointerDataPacket(*packet); })); @@ -579,7 +579,7 @@ static inline blink::PointerData::DeviceKind DeviceKindFromTouchType(UITouch* to - (void)updateViewportMetrics { blink::Threads::UI()->PostTask( - [weak_platform_view = _platformView->GetWeakPtr(), metrics = _viewportMetrics] { + [ weak_platform_view = _platformView->GetWeakPtr(), metrics = _viewportMetrics ] { if (!weak_platform_view) { return; } diff --git a/shell/platform/darwin/ios/framework/Source/vsync_waiter_ios.mm b/shell/platform/darwin/ios/framework/Source/vsync_waiter_ios.mm index 630589d44f7..78d66781891 100644 --- a/shell/platform/darwin/ios/framework/Source/vsync_waiter_ios.mm +++ b/shell/platform/darwin/ios/framework/Source/vsync_waiter_ios.mm @@ -76,10 +76,9 @@ // // We are not using the PostTask for thread switching, but to make task // observers work. - blink::Threads::UI()->PostTask( - [callback = _pendingCallback, frame_start_time, frame_target_time]() { - callback(frame_start_time, frame_target_time); - }); + blink::Threads::UI()->PostTask([ + callback = _pendingCallback, frame_start_time, frame_target_time + ]() { callback(frame_start_time, frame_target_time); }); _pendingCallback = nullptr; } diff --git a/shell/platform/darwin/ios/platform_view_ios.mm b/shell/platform/darwin/ios/platform_view_ios.mm index 498399094c8..caefbed22e2 100644 --- a/shell/platform/darwin/ios/platform_view_ios.mm +++ b/shell/platform/darwin/ios/platform_view_ios.mm @@ -63,7 +63,7 @@ void PlatformViewIOS::SetupAndLoadFromSource(const std::string& assets_directory const std::string& main, const std::string& packages) { blink::Threads::UI()->PostTask( - [engine = engine().GetWeakPtr(), assets_directory, main, packages] { + [ engine = engine().GetWeakPtr(), assets_directory, main, packages ] { if (engine) engine->RunBundleAndSource(assets_directory, main, packages); }); diff --git a/shell/platform/embedder/embedder.cc b/shell/platform/embedder/embedder.cc index bed143a8e5c..c67986f5f52 100644 --- a/shell/platform/embedder/embedder.cc +++ b/shell/platform/embedder/embedder.cc @@ -82,18 +82,24 @@ FlutterResult FlutterEngineRun(size_t version, return kInvalidArguments; } - auto make_current = [ptr = config->open_gl.make_current, - user_data]() -> bool { return ptr(user_data); }; - - auto clear_current = [ptr = config->open_gl.clear_current, - user_data]() -> bool { return ptr(user_data); }; - - auto present = [ptr = config->open_gl.present, user_data]() -> bool { + auto make_current = + [ ptr = config->open_gl.make_current, user_data ]()->bool { return ptr(user_data); }; - auto fbo_callback = [ptr = config->open_gl.fbo_callback, - user_data]() -> intptr_t { return ptr(user_data); }; + auto clear_current = + [ ptr = config->open_gl.clear_current, user_data ]()->bool { + return ptr(user_data); + }; + + auto present = [ ptr = config->open_gl.present, user_data ]()->bool { + return ptr(user_data); + }; + + auto fbo_callback = + [ ptr = config->open_gl.fbo_callback, user_data ]()->intptr_t { + return ptr(user_data); + }; std::string icu_data_path; if (SAFE_ACCESS(args, icu_data_path, nullptr) != nullptr) { @@ -131,20 +137,20 @@ FlutterResult FlutterEngineRun(size_t version, std::string main(args->main_path); std::string packages(args->packages_path); - blink::Threads::UI()->PostTask( - [weak_engine = platform_view->engine().GetWeakPtr(), // - assets = std::move(assets), // - main = std::move(main), // - packages = std::move(packages) // + blink::Threads::UI()->PostTask([ + weak_engine = platform_view->engine().GetWeakPtr(), // + assets = std::move(assets), // + main = std::move(main), // + packages = std::move(packages) // ] { - if (auto engine = weak_engine) { - if (main.empty()) { - engine->RunBundle(assets); - } else { - engine->RunBundleAndSource(assets, main, packages); - } - } - }); + if (auto engine = weak_engine) { + if (main.empty()) { + engine->RunBundle(assets); + } else { + engine->RunBundleAndSource(assets, main, packages); + } + } + }); *engine_out = reinterpret_cast( new PlatformViewHolder(std::move(platform_view))); @@ -176,7 +182,7 @@ FlutterResult FlutterEngineSendWindowMetricsEvent( metrics.device_pixel_ratio = SAFE_ACCESS(flutter_metrics, pixel_ratio, 1.0); blink::Threads::UI()->PostTask( - [weak_engine = holder->view()->engine().GetWeakPtr(), metrics] { + [ weak_engine = holder->view()->engine().GetWeakPtr(), metrics ] { if (auto engine = weak_engine) { engine->SetViewportMetrics(metrics); } @@ -224,16 +230,17 @@ FlutterResult FlutterEngineSendPointerEvent(FlutterEngine engine, reinterpret_cast(current) + current->struct_size); } - blink::Threads::UI()->PostTask(fxl::MakeCopyable( - [weak_engine = reinterpret_cast(engine) - ->view() - ->engine() - .GetWeakPtr(), - packet = std::move(packet)] { - if (auto engine = weak_engine) { - engine->DispatchPointerDataPacket(*packet); - } - })); + blink::Threads::UI()->PostTask(fxl::MakeCopyable([ + weak_engine = reinterpret_cast(engine) + ->view() + ->engine() + .GetWeakPtr(), + packet = std::move(packet) + ] { + if (auto engine = weak_engine) { + engine->DispatchPointerDataPacket(*packet); + } + })); return kSuccess; } @@ -260,7 +267,7 @@ FlutterResult FlutterEngineSendPlatformMessage( nullptr); blink::Threads::UI()->PostTask( - [weak_engine = holder->view()->engine().GetWeakPtr(), message] { + [ weak_engine = holder->view()->engine().GetWeakPtr(), message ] { if (auto engine = weak_engine) { engine->DispatchPlatformMessage(message); } diff --git a/shell/testing/test_runner.cc b/shell/testing/test_runner.cc index 6c8977adae8..838b04120c7 100644 --- a/shell/testing/test_runner.cc +++ b/shell/testing/test_runner.cc @@ -22,7 +22,7 @@ TestRunner::TestRunner() metrics.physical_height = 1800; // 600 at 3x resolution blink::Threads::UI()->PostTask( - [engine = platform_view_->engine().GetWeakPtr(), metrics] { + [ engine = platform_view_->engine().GetWeakPtr(), metrics ] { if (engine) engine->SetViewportMetrics(metrics); }); @@ -39,7 +39,7 @@ TestRunner& TestRunner::Shared() { void TestRunner::Run(const TestDescriptor& test) { blink::Threads::UI()->PostTask( - [engine = platform_view_->engine().GetWeakPtr(), test] { + [ engine = platform_view_->engine().GetWeakPtr(), test ] { if (engine) engine->RunBundleAndSource(std::string(), test.path, test.packages); }); diff --git a/sky/engine/platform/fonts/opentype/OpenTypeVerticalData.cpp b/sky/engine/platform/fonts/opentype/OpenTypeVerticalData.cpp index 00fb7277c53..7addf33a1a2 100644 --- a/sky/engine/platform/fonts/opentype/OpenTypeVerticalData.cpp +++ b/sky/engine/platform/fonts/opentype/OpenTypeVerticalData.cpp @@ -238,7 +238,7 @@ void OpenTypeVerticalData::getVerticalTranslationsForGlyphs( bool useVORG = hasVORG(); size_t countTopSideBearings = m_topSideBearings.size(); float defaultVertOriginY = std::numeric_limits::quiet_NaN(); - for (float* end = &(outXYArray[count * 2]); outXYArray != end; + for (float *end = &(outXYArray[count * 2]); outXYArray != end; ++glyphs, outXYArray += 2) { Glyph glyph = *glyphs; uint16_t widthFUnit = diff --git a/sky/engine/wtf/HexNumber.h b/sky/engine/wtf/HexNumber.h index c45ff97a9dd..39fc0c35760 100644 --- a/sky/engine/wtf/HexNumber.h +++ b/sky/engine/wtf/HexNumber.h @@ -102,10 +102,10 @@ inline void appendUnsignedAsHexFixedSize(unsigned number, } // namespace WTF +using WTF::Lowercase; using WTF::appendByteAsHex; using WTF::appendUnsignedAsHex; using WTF::appendUnsignedAsHexFixedSize; -using WTF::Lowercase; using WTF::placeByteAsHex; using WTF::placeByteAsHexCompressIfPossible; diff --git a/sky/engine/wtf/PartitionAlloc.h b/sky/engine/wtf/PartitionAlloc.h index 2c8709ff3b5..6e81d1a1b32 100644 --- a/sky/engine/wtf/PartitionAlloc.h +++ b/sky/engine/wtf/PartitionAlloc.h @@ -697,9 +697,11 @@ class PartitionAllocatorGeneric { } // namespace WTF +using WTF::PartitionAllocatorGeneric; +using WTF::PartitionRoot; +using WTF::SizeSpecificPartitionAllocator; using WTF::partitionAlloc; using WTF::partitionAllocActualSize; -using WTF::PartitionAllocatorGeneric; using WTF::partitionAllocGeneric; using WTF::partitionAllocGetSize; using WTF::partitionAllocInit; @@ -708,7 +710,5 @@ using WTF::partitionAllocSupportsGetSize; using WTF::partitionFree; using WTF::partitionFreeGeneric; using WTF::partitionReallocGeneric; -using WTF::PartitionRoot; -using WTF::SizeSpecificPartitionAllocator; #endif // SKY_ENGINE_WTF_PARTITIONALLOC_H_ diff --git a/sky/engine/wtf/PassOwnPtr.h b/sky/engine/wtf/PassOwnPtr.h index a25bd0b3d7f..96594d93690 100644 --- a/sky/engine/wtf/PassOwnPtr.h +++ b/sky/engine/wtf/PassOwnPtr.h @@ -184,9 +184,9 @@ inline T* getPtr(const PassOwnPtr& p) { } // namespace WTF +using WTF::PassOwnPtr; using WTF::adoptArrayPtr; using WTF::adoptPtr; -using WTF::PassOwnPtr; using WTF::static_pointer_cast; #endif // SKY_ENGINE_WTF_PASSOWNPTR_H_ diff --git a/sky/engine/wtf/PassRefPtr.h b/sky/engine/wtf/PassRefPtr.h index 3461137919d..42b0918f290 100644 --- a/sky/engine/wtf/PassRefPtr.h +++ b/sky/engine/wtf/PassRefPtr.h @@ -224,8 +224,8 @@ inline T* getPtr(const PassRefPtr& p) { } // namespace WTF -using WTF::adoptRef; using WTF::PassRefPtr; +using WTF::adoptRef; using WTF::static_pointer_cast; #endif // SKY_ENGINE_WTF_PASSREFPTR_H_ diff --git a/sky/engine/wtf/PrintStream.h b/sky/engine/wtf/PrintStream.h index de6bcaa1f7b..59a5c1123d4 100644 --- a/sky/engine/wtf/PrintStream.h +++ b/sky/engine/wtf/PrintStream.h @@ -422,7 +422,7 @@ PointerDump pointerDump(const T* ptr) { using WTF::CharacterDump; using WTF::PointerDump; -using WTF::pointerDump; using WTF::PrintStream; +using WTF::pointerDump; #endif // SKY_ENGINE_WTF_PRINTSTREAM_H_ diff --git a/sky/engine/wtf/Threading.h b/sky/engine/wtf/Threading.h index c40cbc58d38..35fbf5969a1 100644 --- a/sky/engine/wtf/Threading.h +++ b/sky/engine/wtf/Threading.h @@ -56,7 +56,7 @@ WTF_EXPORT void unlockAtomicallyInitializedStaticMutex(); } // namespace WTF -using WTF::currentThread; using WTF::ThreadIdentifier; +using WTF::currentThread; #endif // SKY_ENGINE_WTF_THREADING_H_ diff --git a/sky/engine/wtf/dtoa.h b/sky/engine/wtf/dtoa.h index 53e3915a4c9..e69caa1bc0d 100644 --- a/sky/engine/wtf/dtoa.h +++ b/sky/engine/wtf/dtoa.h @@ -102,11 +102,11 @@ inline double parseDouble(const UChar* string, } // namespace WTF +using WTF::NumberToLStringBuffer; +using WTF::NumberToStringBuffer; using WTF::numberToFixedPrecisionString; using WTF::numberToFixedWidthString; -using WTF::NumberToLStringBuffer; using WTF::numberToString; -using WTF::NumberToStringBuffer; using WTF::parseDouble; #endif // SKY_ENGINE_WTF_DTOA_H_ diff --git a/sky/engine/wtf/text/StringImpl.h b/sky/engine/wtf/text/StringImpl.h index 824080ce29d..0244a031740 100644 --- a/sky/engine/wtf/text/StringImpl.h +++ b/sky/engine/wtf/text/StringImpl.h @@ -813,11 +813,11 @@ struct DefaultHash> { } // namespace WTF -using WTF::equal; -using WTF::equalNonNull; using WTF::StringImpl; using WTF::TextCaseInsensitive; using WTF::TextCaseSensitive; using WTF::TextCaseSensitivity; +using WTF::equal; +using WTF::equalNonNull; #endif // SKY_ENGINE_WTF_TEXT_STRINGIMPL_H_ diff --git a/sky/engine/wtf/text/WTFString.h b/sky/engine/wtf/text/WTFString.h index 852c41c366d..47d083dec29 100644 --- a/sky/engine/wtf/text/WTFString.h +++ b/sky/engine/wtf/text/WTFString.h @@ -825,6 +825,11 @@ WTF_EXPORT extern const String& xmlnsWithColon; WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(String); +using WTF::CString; +using WTF::KeepTrailingZeros; +using WTF::StrictUTF8Conversion; +using WTF::StrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD; +using WTF::String; using WTF::append; using WTF::appendNumber; using WTF::charactersAreAllASCII; @@ -840,18 +845,13 @@ using WTF::charactersToUInt; using WTF::charactersToUInt64; using WTF::charactersToUInt64Strict; using WTF::charactersToUIntStrict; -using WTF::CString; using WTF::emptyString; using WTF::equal; using WTF::equalIgnoringCase; using WTF::find; using WTF::isAllSpecialCharacters; using WTF::isSpaceOrNewline; -using WTF::KeepTrailingZeros; using WTF::reverseFind; -using WTF::StrictUTF8Conversion; -using WTF::StrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD; -using WTF::String; #include "flutter/sky/engine/wtf/text/AtomicString.h" #endif // SKY_ENGINE_WTF_TEXT_WTFSTRING_H_ diff --git a/sky/engine/wtf/unicode/CharacterNames.h b/sky/engine/wtf/unicode/CharacterNames.h index b3efb7944fc..c93ed2f1cf1 100644 --- a/sky/engine/wtf/unicode/CharacterNames.h +++ b/sky/engine/wtf/unicode/CharacterNames.h @@ -93,6 +93,7 @@ const UChar zeroWidthNoBreakSpace = 0xFEFF; } // namespace Unicode } // namespace WTF +using WTF::Unicode::HiraganaLetterSmallA; using WTF::Unicode::aegeanWordSeparatorDot; using WTF::Unicode::aegeanWordSeparatorLine; using WTF::Unicode::blackCircle; @@ -107,7 +108,6 @@ using WTF::Unicode::ethiopicWordspace; using WTF::Unicode::fisheye; using WTF::Unicode::hebrewPunctuationGeresh; using WTF::Unicode::hebrewPunctuationGershayim; -using WTF::Unicode::HiraganaLetterSmallA; using WTF::Unicode::horizontalEllipsis; using WTF::Unicode::hyphen; using WTF::Unicode::hyphenMinus;