From 3839488cce61df766d747f860c657666ee0f78bb Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 21 Jul 2023 12:35:47 -0400 Subject: [PATCH 1/3] Roll Skia from e3d13d1b1c42 to 1f84e9d51bba (1 revision) (#43896) https://skia.googlesource.com/skia.git/+log/e3d13d1b1c42..1f84e9d51bba 2023-07-21 kjlubick@google.com Allow Ganesh Mesh factories to take nullptr ctx If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 70565cef701fc..3a6ef44eb7614 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'e3d13d1b1c42810a5b8cca8cffcf2b502b62321b', + 'skia_revision': '1f84e9d51bbad13879dc03197cd64c3662a8bf03', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 4b2382e523d7a..fb77a332ea3d8 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 7f27c9a1b8daec36da6c7494a5f4b5fa +Signature: d953c235775e09831ba5294a0fddbb81 ==================================================================================================== LIBRARY: etc1 From 5d88e67fbee365da3c591ee3099b7f1ac60c71c4 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Fri, 21 Jul 2023 09:42:09 -0700 Subject: [PATCH 2/3] [engine] disable picture complexity raster caching (#43897) Test removing picture complexity based raster caching. --- display_list/benchmarking/dl_complexity_gl.h | 2 +- display_list/benchmarking/dl_complexity_metal.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/display_list/benchmarking/dl_complexity_gl.h b/display_list/benchmarking/dl_complexity_gl.h index 9fc7596687051..6b11155fa56cf 100644 --- a/display_list/benchmarking/dl_complexity_gl.h +++ b/display_list/benchmarking/dl_complexity_gl.h @@ -22,7 +22,7 @@ class DisplayListGLComplexityCalculator bool ShouldBeCached(unsigned int complexity_score) override { // Set cache threshold at 1ms - return complexity_score > 200000u; + return false; } void SetComplexityCeiling(unsigned int ceiling) override { diff --git a/display_list/benchmarking/dl_complexity_metal.h b/display_list/benchmarking/dl_complexity_metal.h index aa63863fa4d05..0a4310edb2a82 100644 --- a/display_list/benchmarking/dl_complexity_metal.h +++ b/display_list/benchmarking/dl_complexity_metal.h @@ -22,7 +22,7 @@ class DisplayListMetalComplexityCalculator bool ShouldBeCached(unsigned int complexity_score) override { // Set cache threshold at 1ms - return complexity_score > 200000u; + return false; } void SetComplexityCeiling(unsigned int ceiling) override { From 2d8cff44261bc8e04f204ca27da7d4554964b4bb Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Fri, 21 Jul 2023 10:06:34 -0700 Subject: [PATCH 3/3] Refactor: fix typo "setup" -> "set up" (#43824) There are several places in the engine using the word "setup" incorrectly. I have changed them to "set up" [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- impeller/docs/read_frame_captures.md | 2 +- impeller/docs/renderdoc_frame_capture.md | 2 +- impeller/docs/xcode_frame_capture.md | 2 +- .../backend/vulkan/playground_impl_vk.cc | 2 +- impeller/playground/playground.cc | 4 +- .../renderer/backend/metal/context_mtl.mm | 6 +- .../renderer/backend/vulkan/context_vk.cc | 4 +- impeller/renderer/backend/vulkan/queue_vk.cc | 2 +- impeller/renderer/command_buffer.h | 2 +- lib/ui/painting/image_decoder_unittests.cc | 12 +-- shell/common/shell.cc | 76 +++++++++---------- shell/common/shell.h | 2 +- .../FlutterActivityAndFragmentDelegate.java | 4 +- .../plugins/util/GeneratedPluginRegister.java | 4 +- .../android/FlutterActivityTest.java | 2 +- .../ios/framework/Source/FlutterEngine.mm | 12 +-- .../framework/Source/FlutterTextInputPlugin.h | 2 +- .../Source/FlutterTextInputPlugin.mm | 2 +- .../framework/Source/FlutterViewController.mm | 16 ++-- .../Source/FlutterViewControllerTest.mm | 32 ++++---- .../Source/FlutterViewControllerTest_mrc.mm | 6 +- 21 files changed, 98 insertions(+), 98 deletions(-) diff --git a/impeller/docs/read_frame_captures.md b/impeller/docs/read_frame_captures.md index 020796b1063a1..ae9a5cdce6ba8 100644 --- a/impeller/docs/read_frame_captures.md +++ b/impeller/docs/read_frame_captures.md @@ -211,7 +211,7 @@ function pipeline configuration. ![alt_text](assets/read_frame_captures/image7.png "image_tooltip") -You will get intimately familiar with this view when you setup a new pipeline +You will get intimately familiar with this view when you set up a new pipeline state object in Impeller or try to reason about the correctness of one of the pipeline state object variants. diff --git a/impeller/docs/renderdoc_frame_capture.md b/impeller/docs/renderdoc_frame_capture.md index 70641ba57883b..f6e9a030e1c9d 100644 --- a/impeller/docs/renderdoc_frame_capture.md +++ b/impeller/docs/renderdoc_frame_capture.md @@ -2,7 +2,7 @@ [RenderDoc](https://renderdoc.org/) is a graphics debugger that can be used to capture frames. With Impeller starting to support gles and Vulkan backends, RenderDoc can provide insights into the application's frames. -1. First step is to setup RenderDoc. Follow the instructions [here](https://renderdoc.org/docs/getting_started/quick_start.html). For the purposes of this guide it is assumed that you are able to get RenderDoc running. +1. First step is to set up RenderDoc. Follow the instructions [here](https://renderdoc.org/docs/getting_started/quick_start.html). For the purposes of this guide it is assumed that you are able to get RenderDoc running. 2. The next step would be to run the application you wish the capture the frames of. Typically these would be one of the playground tests. To build these, do: ```bash diff --git a/impeller/docs/xcode_frame_capture.md b/impeller/docs/xcode_frame_capture.md index e258f022ff6c0..a551994d1fe5f 100644 --- a/impeller/docs/xcode_frame_capture.md +++ b/impeller/docs/xcode_frame_capture.md @@ -89,7 +89,7 @@ that some of those diagnostics need Xcode to be able to re-compile the translation units in the engine. But, it doesn’t know how to do that, only GN/Ninja does. So some of those will be unavailable. -Any Impeller test that setup up a Playground will now automatically have GPU +Any Impeller test that sets up a Playground will now automatically have GPU frame capture enabled. # Select the Playground Enabled Test to Profile diff --git a/impeller/playground/backend/vulkan/playground_impl_vk.cc b/impeller/playground/backend/vulkan/playground_impl_vk.cc index 7783a8c31ece5..11bfead919442 100644 --- a/impeller/playground/backend/vulkan/playground_impl_vk.cc +++ b/impeller/playground/backend/vulkan/playground_impl_vk.cc @@ -108,7 +108,7 @@ PlaygroundImplVK::PlaygroundImplVK(PlaygroundSwitches switches) vk::UniqueSurfaceKHR surface{vk_surface, context->GetInstance()}; if (!context->SetWindowSurface(std::move(surface))) { - VALIDATION_LOG << "Could not setup surface for context."; + VALIDATION_LOG << "Could not set up surface for context."; return; } diff --git a/impeller/playground/playground.cc b/impeller/playground/playground.cc index 447da44b3d8ac..93eb4eb3ce204 100644 --- a/impeller/playground/playground.cc +++ b/impeller/playground/playground.cc @@ -125,8 +125,8 @@ void Playground::SetupContext(PlaygroundBackend backend) { void Playground::SetupWindow() { if (!context_) { - FML_LOG(WARNING) - << "Asked to setup a window with no context (call SetupContext first)."; + FML_LOG(WARNING) << "Asked to set up a window with no context (call " + "SetupContext first)."; return; } auto renderer = std::make_unique(context_); diff --git a/impeller/renderer/backend/metal/context_mtl.mm b/impeller/renderer/backend/metal/context_mtl.mm index 604ec6120786c..d5db774ef36cf 100644 --- a/impeller/renderer/backend/metal/context_mtl.mm +++ b/impeller/renderer/backend/metal/context_mtl.mm @@ -79,7 +79,7 @@ static bool DeviceSupportsComputeSubgroups(id device) { is_gpu_disabled_sync_switch_(std::move(is_gpu_disabled_sync_switch)) { // Validate device. if (!device_) { - VALIDATION_LOG << "Could not setup valid Metal device."; + VALIDATION_LOG << "Could not set up valid Metal device."; return; } @@ -135,7 +135,7 @@ static bool DeviceSupportsComputeSubgroups(id device) { resource_allocator_ = std::shared_ptr( new AllocatorMTL(device_, "Impeller Permanents Allocator")); if (!resource_allocator_) { - VALIDATION_LOG << "Could not setup the resource allocator."; + VALIDATION_LOG << "Could not set up the resource allocator."; return; } } @@ -219,7 +219,7 @@ static bool DeviceSupportsComputeSubgroups(id device) { static id CreateMetalCommandQueue(id device) { auto command_queue = device.newCommandQueue; if (!command_queue) { - VALIDATION_LOG << "Could not setup the command queue."; + VALIDATION_LOG << "Could not set up the command queue."; return nullptr; } command_queue.label = @"Impeller Command Queue"; diff --git a/impeller/renderer/backend/vulkan/context_vk.cc b/impeller/renderer/backend/vulkan/context_vk.cc index 443fe2fad8bb3..13939fe266df9 100644 --- a/impeller/renderer/backend/vulkan/context_vk.cc +++ b/impeller/renderer/backend/vulkan/context_vk.cc @@ -227,7 +227,7 @@ void ContextVK::Setup(Settings settings) { std::make_unique(*caps, device_holder->instance.get()); if (!debug_report->IsValid()) { - VALIDATION_LOG << "Could not setup debug report."; + VALIDATION_LOG << "Could not set up debug report."; return; } @@ -417,7 +417,7 @@ void ContextVK::Setup(Settings settings) { //---------------------------------------------------------------------------- /// Label all the relevant objects. This happens after setup so that the debug - /// messengers have had a chance to be setup. + /// messengers have had a chance to be set up. /// SetDebugName(GetDevice(), device_holder_->device.get(), "ImpellerDevice"); } diff --git a/impeller/renderer/backend/vulkan/queue_vk.cc b/impeller/renderer/backend/vulkan/queue_vk.cc index a0c82344d1fbb..edb2d2409da8b 100644 --- a/impeller/renderer/backend/vulkan/queue_vk.cc +++ b/impeller/renderer/backend/vulkan/queue_vk.cc @@ -43,7 +43,7 @@ QueuesVK::QueuesVK(const vk::Device& device, auto vk_compute = device.getQueue(compute.family, compute.index); auto vk_transfer = device.getQueue(transfer.family, transfer.index); - // Always setup the graphics queue. + // Always set up the graphics queue. graphics_queue = std::make_shared(graphics, vk_graphics); ContextVK::SetDebugName(device, vk_graphics, "ImpellerGraphicsQ"); diff --git a/impeller/renderer/command_buffer.h b/impeller/renderer/command_buffer.h index 096c4633b852a..98c772d78fa22 100644 --- a/impeller/renderer/command_buffer.h +++ b/impeller/renderer/command_buffer.h @@ -34,7 +34,7 @@ class CommandBufferMock; /// /// A command buffer is only meant to be used on a single thread. If /// a frame workload needs to be encoded from multiple threads, -/// setup and record into multiple command buffers. The order of +/// set up and record into multiple command buffers. The order of /// submission of commands encoded in multiple command buffers can /// be controlled via either the order in which the command buffers /// were created, or, using the `ReserveSpotInQueue` command which diff --git a/lib/ui/painting/image_decoder_unittests.cc b/lib/ui/painting/image_decoder_unittests.cc index f09bf87f79411..959c0b541ecb3 100644 --- a/lib/ui/painting/image_decoder_unittests.cc +++ b/lib/ui/painting/image_decoder_unittests.cc @@ -406,12 +406,12 @@ TEST_F(ImageDecoderFixtureTest, ValidImageResultsInSuccess) { callback); }; - auto setup_io_manager_and_decode = [&]() { + auto set_up_io_manager_and_decode = [&]() { io_manager = std::make_unique(runners.GetIOTaskRunner()); runners.GetUITaskRunner()->PostTask(decode_image); }; - runners.GetIOTaskRunner()->PostTask(setup_io_manager_and_decode); + runners.GetIOTaskRunner()->PostTask(set_up_io_manager_and_decode); latch.Wait(); } @@ -706,12 +706,12 @@ TEST_F(ImageDecoderFixtureTest, ExifDataIsRespectedOnDecode) { callback); }; - auto setup_io_manager_and_decode = [&]() { + auto set_up_io_manager_and_decode = [&]() { io_manager = std::make_unique(runners.GetIOTaskRunner()); runners.GetUITaskRunner()->PostTask(decode_image); }; - runners.GetIOTaskRunner()->PostTask(setup_io_manager_and_decode); + runners.GetIOTaskRunner()->PostTask(set_up_io_manager_and_decode); latch.Wait(); @@ -766,13 +766,13 @@ TEST_F(ImageDecoderFixtureTest, CanDecodeWithoutAGPUContext) { callback); }; - auto setup_io_manager_and_decode = [&]() { + auto set_up_io_manager_and_decode = [&]() { io_manager = std::make_unique(runners.GetIOTaskRunner(), false); runners.GetUITaskRunner()->PostTask(decode_image); }; - runners.GetIOTaskRunner()->PostTask(setup_io_manager_and_decode); + runners.GetIOTaskRunner()->PostTask(set_up_io_manager_and_decode); latch.Wait(); } diff --git a/shell/common/shell.cc b/shell/common/shell.cc index 82b3b831ebb68..aae9a456f3c91 100644 --- a/shell/common/shell.cc +++ b/shell/common/shell.cc @@ -618,7 +618,7 @@ void Shell::RunEngine( platform_runner->PostTask( [result_callback, run_result]() { result_callback(run_result); }); }; - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); FML_DCHECK(task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread()); fml::TaskRunner::RunNowOrPostTask( @@ -642,7 +642,7 @@ void Shell::RunEngine( } std::optional Shell::GetUIIsolateLastError() const { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); FML_DCHECK(task_runners_.GetUITaskRunner()->RunsTasksOnCurrentThread()); if (!weak_engine_) { @@ -662,7 +662,7 @@ std::optional Shell::GetUIIsolateLastError() const { } bool Shell::EngineHasLivePorts() const { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); FML_DCHECK(task_runners_.GetUITaskRunner()->RunsTasksOnCurrentThread()); if (!weak_engine_) { @@ -673,14 +673,14 @@ bool Shell::EngineHasLivePorts() const { } bool Shell::IsSetup() const { - return is_setup_; + return is_set_up_; } bool Shell::Setup(std::unique_ptr platform_view, std::unique_ptr engine, std::unique_ptr rasterizer, const std::shared_ptr& io_manager) { - if (is_setup_) { + if (is_set_up_) { return false; } @@ -723,7 +723,7 @@ bool Shell::Setup(std::unique_ptr platform_view, }); } - is_setup_ = true; + is_set_up_ = true; PersistentCache::GetCacheForProcess()->AddWorkerTaskRunner( task_runners_.GetIOTaskRunner()); @@ -752,22 +752,22 @@ const fml::RefPtr Shell::GetParentRasterThreadMerger() } fml::TaskRunnerAffineWeakPtr Shell::GetRasterizer() const { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); return weak_rasterizer_; } fml::WeakPtr Shell::GetEngine() { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); return weak_engine_; } fml::WeakPtr Shell::GetPlatformView() { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); return weak_platform_view_; } fml::WeakPtr Shell::GetIOManager() { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); return io_manager_->GetWeakPtr(); } @@ -778,7 +778,7 @@ DartVM* Shell::GetDartVM() { // |PlatformView::Delegate| void Shell::OnPlatformViewCreated(std::unique_ptr surface) { TRACE_EVENT0("flutter", "Shell::OnPlatformViewCreated"); - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); FML_DCHECK(task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread()); // Prevent any request to change the thread configuration for raster and @@ -869,7 +869,7 @@ void Shell::OnPlatformViewCreated(std::unique_ptr surface) { // |PlatformView::Delegate| void Shell::OnPlatformViewDestroyed() { TRACE_EVENT0("flutter", "Shell::OnPlatformViewDestroyed"); - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); FML_DCHECK(task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread()); // Prevent any request to change the thread configuration for raster and @@ -943,7 +943,7 @@ void Shell::OnPlatformViewDestroyed() { // |PlatformView::Delegate| void Shell::OnPlatformViewScheduleFrame() { TRACE_EVENT0("flutter", "Shell::OnPlatformViewScheduleFrame"); - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); FML_DCHECK(task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread()); task_runners_.GetUITaskRunner()->PostTask([engine = engine_->GetWeakPtr()]() { @@ -956,7 +956,7 @@ void Shell::OnPlatformViewScheduleFrame() { // |PlatformView::Delegate| void Shell::OnPlatformViewSetViewportMetrics(int64_t view_id, const ViewportMetrics& metrics) { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); FML_DCHECK(task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread()); if (metrics.device_pixel_ratio <= 0 || metrics.physical_width <= 0 || @@ -996,7 +996,7 @@ void Shell::OnPlatformViewSetViewportMetrics(int64_t view_id, // |PlatformView::Delegate| void Shell::OnPlatformViewDispatchPlatformMessage( std::unique_ptr message) { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); #if FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG if (!task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread()) { std::scoped_lock lock(misbehaving_message_channels_mutex_); @@ -1031,7 +1031,7 @@ void Shell::OnPlatformViewDispatchPointerDataPacket( std::unique_ptr packet) { TRACE_EVENT0("flutter", "Shell::OnPlatformViewDispatchPointerDataPacket"); TRACE_FLOW_BEGIN("flutter", "PointerEvent", next_pointer_flow_id_); - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); FML_DCHECK(task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread()); task_runners_.GetUITaskRunner()->PostTask( fml::MakeCopyable([engine = weak_engine_, packet = std::move(packet), @@ -1047,7 +1047,7 @@ void Shell::OnPlatformViewDispatchPointerDataPacket( void Shell::OnPlatformViewDispatchSemanticsAction(int32_t node_id, SemanticsAction action, fml::MallocMapping args) { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); FML_DCHECK(task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread()); task_runners_.GetUITaskRunner()->PostTask( @@ -1061,7 +1061,7 @@ void Shell::OnPlatformViewDispatchSemanticsAction(int32_t node_id, // |PlatformView::Delegate| void Shell::OnPlatformViewSetSemanticsEnabled(bool enabled) { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); FML_DCHECK(task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread()); task_runners_.GetUITaskRunner()->PostTask( @@ -1074,7 +1074,7 @@ void Shell::OnPlatformViewSetSemanticsEnabled(bool enabled) { // |PlatformView::Delegate| void Shell::OnPlatformViewSetAccessibilityFeatures(int32_t flags) { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); FML_DCHECK(task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread()); task_runners_.GetUITaskRunner()->PostTask( @@ -1088,7 +1088,7 @@ void Shell::OnPlatformViewSetAccessibilityFeatures(int32_t flags) { // |PlatformView::Delegate| void Shell::OnPlatformViewRegisterTexture( std::shared_ptr texture) { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); FML_DCHECK(task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread()); task_runners_.GetRasterTaskRunner()->PostTask( @@ -1103,7 +1103,7 @@ void Shell::OnPlatformViewRegisterTexture( // |PlatformView::Delegate| void Shell::OnPlatformViewUnregisterTexture(int64_t texture_id) { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); FML_DCHECK(task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread()); task_runners_.GetRasterTaskRunner()->PostTask( @@ -1118,7 +1118,7 @@ void Shell::OnPlatformViewUnregisterTexture(int64_t texture_id) { // |PlatformView::Delegate| void Shell::OnPlatformViewMarkTextureFrameAvailable(int64_t texture_id) { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); FML_DCHECK(task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread()); // Tell the rasterizer that one of its textures has a new frame available. @@ -1149,7 +1149,7 @@ void Shell::OnPlatformViewMarkTextureFrameAvailable(int64_t texture_id) { // |PlatformView::Delegate| void Shell::OnPlatformViewSetNextFrameCallback(const fml::closure& closure) { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); FML_DCHECK(task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread()); task_runners_.GetRasterTaskRunner()->PostTask( @@ -1168,7 +1168,7 @@ const Settings& Shell::OnPlatformViewGetSettings() const { // |Animator::Delegate| void Shell::OnAnimatorBeginFrame(fml::TimePoint frame_target_time, uint64_t frame_number) { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); FML_DCHECK(task_runners_.GetUITaskRunner()->RunsTasksOnCurrentThread()); // record the target time for use by rasterizer. @@ -1183,7 +1183,7 @@ void Shell::OnAnimatorBeginFrame(fml::TimePoint frame_target_time, // |Animator::Delegate| void Shell::OnAnimatorNotifyIdle(fml::TimeDelta deadline) { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); FML_DCHECK(task_runners_.GetUITaskRunner()->RunsTasksOnCurrentThread()); if (engine_) { @@ -1194,7 +1194,7 @@ void Shell::OnAnimatorNotifyIdle(fml::TimeDelta deadline) { void Shell::OnAnimatorUpdateLatestFrameTargetTime( fml::TimePoint frame_target_time) { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); // record the target time for use by rasterizer. { @@ -1209,7 +1209,7 @@ void Shell::OnAnimatorUpdateLatestFrameTargetTime( // |Animator::Delegate| void Shell::OnAnimatorDraw(std::shared_ptr pipeline) { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); auto discard_callback = [this](flutter::LayerTree& tree) { std::scoped_lock lock(resize_mutex_); @@ -1240,7 +1240,7 @@ void Shell::OnAnimatorDraw(std::shared_ptr pipeline) { // |Animator::Delegate| void Shell::OnAnimatorDrawLastLayerTree( std::unique_ptr frame_timings_recorder) { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); auto task = fml::MakeCopyable( [rasterizer = rasterizer_->GetWeakPtr(), @@ -1256,7 +1256,7 @@ void Shell::OnAnimatorDrawLastLayerTree( // |Engine::Delegate| void Shell::OnEngineUpdateSemantics(SemanticsNodeUpdates update, CustomAccessibilityActionUpdates actions) { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); FML_DCHECK(task_runners_.GetUITaskRunner()->RunsTasksOnCurrentThread()); task_runners_.GetPlatformTaskRunner()->PostTask( @@ -1271,7 +1271,7 @@ void Shell::OnEngineUpdateSemantics(SemanticsNodeUpdates update, // |Engine::Delegate| void Shell::OnEngineHandlePlatformMessage( std::unique_ptr message) { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); FML_DCHECK(task_runners_.GetUITaskRunner()->RunsTasksOnCurrentThread()); if (message->channel() == kSkiaChannel) { @@ -1366,7 +1366,7 @@ void Shell::HandleEngineSkiaMessage(std::unique_ptr message) { // |Engine::Delegate| void Shell::OnPreEngineRestart() { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); FML_DCHECK(task_runners_.GetUITaskRunner()->RunsTasksOnCurrentThread()); fml::AutoResetWaitableEvent latch; @@ -1471,7 +1471,7 @@ void Shell::RequestDartDeferredLibrary(intptr_t loading_unit_id) { } void Shell::ReportTimings() { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); FML_DCHECK(task_runners_.GetRasterTaskRunner()->RunsTasksOnCurrentThread()); auto timings = std::move(unreported_timings_); @@ -1491,7 +1491,7 @@ size_t Shell::UnreportedFramesCount() const { } void Shell::OnFrameRasterized(const FrameTiming& timing) { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); FML_DCHECK(task_runners_.GetRasterTaskRunner()->RunsTasksOnCurrentThread()); // The C++ callback defined in settings.h and set by Flutter runner. This is @@ -1579,7 +1579,7 @@ fml::TimePoint Shell::GetLatestFrameTargetTime() const { // |ServiceProtocol::Handler| fml::RefPtr Shell::GetServiceProtocolHandlerTaskRunner( std::string_view method) const { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); auto found = service_protocol_handlers_.find(method); if (found != service_protocol_handlers_.end()) { return found->second.first; @@ -1785,7 +1785,7 @@ double Shell::GetMainDisplayRefreshRate() { void Shell::RegisterImageDecoder(ImageGeneratorFactory factory, int32_t priority) { FML_DCHECK(task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread()); - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); fml::TaskRunner::RunNowOrPostTask( task_runners_.GetUITaskRunner(), @@ -2047,7 +2047,7 @@ Rasterizer::Screenshot Shell::Screenshot( } fml::Status Shell::WaitForFirstFrame(fml::TimeDelta timeout) { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); if (task_runners_.GetUITaskRunner()->RunsTasksOnCurrentThread() || task_runners_.GetRasterTaskRunner()->RunsTasksOnCurrentThread()) { return fml::Status(fml::StatusCode::kFailedPrecondition, @@ -2075,7 +2075,7 @@ fml::Status Shell::WaitForFirstFrame(fml::TimeDelta timeout) { } bool Shell::ReloadSystemFonts() { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); FML_DCHECK(task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread()); if (!engine_) { @@ -2120,7 +2120,7 @@ void Shell::SetGpuAvailability(GpuAvailability availability) { } void Shell::OnDisplayUpdates(std::vector> displays) { - FML_DCHECK(is_setup_); + FML_DCHECK(is_set_up_); FML_DCHECK(task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread()); std::vector display_data; diff --git a/shell/common/shell.h b/shell/common/shell.h index 6c104f8558f4a..23689332233c9 100644 --- a/shell/common/shell.h +++ b/shell/common/shell.h @@ -448,7 +448,7 @@ class Shell final : public PlatformView::Delegate, // pair > service_protocol_handlers_; - bool is_setup_ = false; + bool is_set_up_ = false; bool is_added_to_service_protocol_ = false; uint64_t next_pointer_flow_id_ = 0; diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterActivityAndFragmentDelegate.java b/shell/platform/android/io/flutter/embedding/android/FlutterActivityAndFragmentDelegate.java index 327671139e281..91dc8c52caaea 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterActivityAndFragmentDelegate.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterActivityAndFragmentDelegate.java @@ -186,7 +186,7 @@ void onAttach(@NonNull Context context) { // When "retain instance" is true, the FlutterEngine will survive configuration // changes. Therefore, we create a new one only if one does not already exist. if (flutterEngine == null) { - setupFlutterEngine(); + setUpFlutterEngine(); } if (host.shouldAttachEngineToActivity()) { @@ -268,7 +268,7 @@ private FlutterEngineGroup.Options addEntrypointOptions(FlutterEngineGroup.Optio * then a new {@link FlutterEngine} is instantiated. */ @VisibleForTesting - /* package */ void setupFlutterEngine() { + /* package */ void setUpFlutterEngine() { Log.v(TAG, "Setting up FlutterEngine."); // First, check if the host wants to use a cached FlutterEngine. diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/util/GeneratedPluginRegister.java b/shell/platform/android/io/flutter/embedding/engine/plugins/util/GeneratedPluginRegister.java index 18316811d9974..e9637f6d14d7f 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/util/GeneratedPluginRegister.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/util/GeneratedPluginRegister.java @@ -15,10 +15,10 @@ public class GeneratedPluginRegister { * Registers all plugins that an app lists in its pubspec.yaml. * *

In order to allow each plugin to listen to calls from Dart via Platform Channels, each - * plugin is given a chance to initialize and setup Platform Channel listeners in {@link + * plugin is given a chance to initialize and set up Platform Channel listeners in {@link * io.flutter.embedding.engine.plugins.FlutterPlugin#onAttachedToEngine(io.flutter.embedding.engine.plugins.FlutterPlugin.FlutterPluginBinding)}. * - *

The list of plugins that need to be setup is not known to the Flutter engine. The Flutter + *

The list of plugins that need to be set up is not known to the Flutter engine. The Flutter * tools generates it at build time based on the plugin dependencies specified in the Flutter * project's pubspec.yaml. * diff --git a/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityTest.java b/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityTest.java index d2992e656559b..132d2a2389360 100644 --- a/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityTest.java +++ b/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityTest.java @@ -605,7 +605,7 @@ static class FlutterActivityWithProvidedEngine extends FlutterActivity { @SuppressLint("MissingSuperCall") protected void onCreate(@Nullable Bundle savedInstanceState) { super.delegate = new FlutterActivityAndFragmentDelegate(this); - super.delegate.setupFlutterEngine(); + super.delegate.setUpFlutterEngine(); } @Nullable diff --git a/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm b/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm index e69b9157b72c8..3a51f4ab3c697 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm @@ -556,7 +556,7 @@ - (void)startProfiler { // If you add a channel, be sure to also update `resetChannels`. // Channels get a reference to the engine, and therefore need manual // cleanup for proper collection. -- (void)setupChannels { +- (void)setUpChannels { // This will be invoked once the shell is done setting up and the isolate ID // for the UI isolate is available. fml::WeakPtr weakSelf = [self getWeakPtr]; @@ -643,7 +643,7 @@ - (void)setupChannels { FlutterTextInputPlugin* textInputPlugin = [[FlutterTextInputPlugin alloc] initWithDelegate:self]; _textInputPlugin.reset(textInputPlugin); textInputPlugin.indirectScribbleDelegate = self; - [textInputPlugin setupIndirectScribbleInteraction:self.viewController]; + [textInputPlugin setUpIndirectScribbleInteraction:self.viewController]; FlutterUndoManagerPlugin* undoManagerPlugin = [[FlutterUndoManagerPlugin alloc] initWithDelegate:self]; @@ -735,10 +735,10 @@ - (void)launchEngine:(NSString*)entrypoint entrypointArgs:entrypointArgs]); } -- (void)setupShell:(std::unique_ptr)shell +- (void)setUpShell:(std::unique_ptr)shell withVMServicePublication:(BOOL)doesVMServicePublication { _shell = std::move(shell); - [self setupChannels]; + [self setUpChannels]; [self onLocaleUpdated:nil]; [self updateDisplays]; _publisher.reset([[FlutterDartVMServicePublisher alloc] @@ -873,7 +873,7 @@ - (BOOL)createShell:(NSString*)entrypoint } else { // TODO(vashworth): Remove once done debugging https://github.com/flutter/flutter/issues/129836 FML_LOG(INFO) << "Enabled VM Service Publication: " << settings.enable_vm_service_publication; - [self setupShell:std::move(shell) + [self setUpShell:std::move(shell) withVMServicePublication:settings.enable_vm_service_publication]; if ([FlutterEngine isProfilerEnabled]) { [self startProfiler]; @@ -1407,7 +1407,7 @@ - (FlutterEngine*)spawnWithEntrypoint:(/*nullable*/ NSString*)entrypoint result->_profiler = _profiler; result->_profiler_metrics = _profiler_metrics; result->_isGpuDisabled = _isGpuDisabled; - [result setupShell:std::move(shell) withVMServicePublication:NO]; + [result setUpShell:std::move(shell) withVMServicePublication:NO]; return [result autorelease]; } diff --git a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.h b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.h index 5af74609bc5f0..5d12ae8620076 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.h +++ b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.h @@ -54,7 +54,7 @@ typedef NS_ENUM(NSInteger, FlutterScribbleInteractionStatus) { * These are used by the UIIndirectScribbleInteractionDelegate methods to handle focusing on the * correct element. */ -- (void)setupIndirectScribbleInteraction:(id)viewResponder; +- (void)setUpIndirectScribbleInteraction:(id)viewResponder; - (void)resetViewResponder; @end diff --git a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm index 625a4d4bf0ac1..c83d51b67e577 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm @@ -2712,7 +2712,7 @@ - (void)indirectScribbleInteraction:(UIIndirectScribbleInteraction*)interaction #pragma mark - Methods related to Scribble support -- (void)setupIndirectScribbleInteraction:(id)viewResponder { +- (void)setUpIndirectScribbleInteraction:(id)viewResponder { if (_viewResponder != viewResponder) { if (@available(iOS 14.0, *)) { UIView* parentView = viewResponder.view; diff --git a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm index 38d5f66c3c335..dbb7a7ab57f65 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm @@ -278,7 +278,7 @@ - (void)performCommonViewControllerInitialization { _orientationPreferences = UIInterfaceOrientationMaskAll; _statusBarStyle = UIStatusBarStyleDefault; - [self setupNotificationCenterObservers]; + [self setUpNotificationCenterObservers]; } - (FlutterEngine*)engine { @@ -289,7 +289,7 @@ - (FlutterEngine*)engine { return _weakFactory->GetWeakPtr(); } -- (void)setupNotificationCenterObservers { +- (void)setUpNotificationCenterObservers { NSNotificationCenter* center = [NSNotificationCenter defaultCenter]; [center addObserver:self selector:@selector(onOrientationPreferencesUpdated:) @@ -791,7 +791,7 @@ - (void)addInternalPlugins { [self.keyboardManager addSecondaryResponder:textInputPlugin]; } if ([_engine.get() viewController] == self) { - [textInputPlugin setupIndirectScribbleInteraction:self]; + [textInputPlugin setUpIndirectScribbleInteraction:self]; } } @@ -1653,7 +1653,7 @@ - (void)startKeyBoardAnimation:(NSTimeInterval)duration { [flutterViewController updateViewportMetricsIfNeeded]; } }; - [self setupKeyboardAnimationVsyncClient:keyboardAnimationCallback]; + [self setUpKeyboardAnimationVsyncClient:keyboardAnimationCallback]; VSyncClient* currentVsyncClient = _keyboardAnimationVSyncClient; [UIView animateWithDuration:duration @@ -1664,7 +1664,7 @@ - (void)startKeyBoardAnimation:(NSTimeInterval)duration { // Setup keyboard animation interpolation. CAAnimation* keyboardAnimation = [[self keyboardAnimationView].layer animationForKey:@"position"]; - [self setupKeyboardSpringAnimationIfNeeded:keyboardAnimation]; + [self setUpKeyboardSpringAnimationIfNeeded:keyboardAnimation]; } completion:^(BOOL finished) { if (_keyboardAnimationVSyncClient == currentVsyncClient) { @@ -1678,7 +1678,7 @@ - (void)startKeyBoardAnimation:(NSTimeInterval)duration { }]; } -- (void)setupKeyboardSpringAnimationIfNeeded:(CAAnimation*)keyboardAnimation { +- (void)setUpKeyboardSpringAnimationIfNeeded:(CAAnimation*)keyboardAnimation { // If keyboard animation is null or not a spring animation, fallback to DisplayLink tracking. if (keyboardAnimation == nil || ![keyboardAnimation isKindOfClass:[CASpringAnimation class]]) { _keyboardSpringAnimation.reset(); @@ -1696,13 +1696,13 @@ - (void)setupKeyboardSpringAnimationIfNeeded:(CAAnimation*)keyboardAnimation { toValue:self.targetViewInsetBottom]); } -- (void)setupKeyboardAnimationVsyncClient: +- (void)setUpKeyboardAnimationVsyncClient: (FlutterKeyboardAnimationCallback)keyboardAnimationCallback { if (!keyboardAnimationCallback) { return; } NSAssert(_keyboardAnimationVSyncClient == nil, - @"_keyboardAnimationVSyncClient must be nil when setup"); + @"_keyboardAnimationVSyncClient must be nil when setting up."); // Make sure the new viewport metrics get sent after the begin frame event has processed. fml::scoped_nsprotocol animationCallback( diff --git a/shell/platform/darwin/ios/framework/Source/FlutterViewControllerTest.mm b/shell/platform/darwin/ios/framework/Source/FlutterViewControllerTest.mm index b3c5f078e6772..982db2d986a7f 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterViewControllerTest.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterViewControllerTest.mm @@ -138,8 +138,8 @@ - (CGFloat)calculateMultitaskingAdjustment:(CGRect)screenRect keyboardFrame:(CGR - (void)startKeyBoardAnimation:(NSTimeInterval)duration; - (UIView*)keyboardAnimationView; - (SpringAnimation*)keyboardSpringAnimation; -- (void)setupKeyboardSpringAnimationIfNeeded:(CAAnimation*)keyboardAnimation; -- (void)setupKeyboardAnimationVsyncClient: +- (void)setUpKeyboardSpringAnimationIfNeeded:(CAAnimation*)keyboardAnimation; +- (void)setUpKeyboardAnimationVsyncClient: (FlutterKeyboardAnimationCallback)keyboardAnimationCallback; - (void)ensureViewportMetricsIsCorrect; - (void)invalidateKeyboardAnimationVSyncClient; @@ -174,7 +174,7 @@ - (void)tearDown { self.messageSent = nil; } -- (id)setupMockMainScreenAndView:(FlutterViewController*)viewControllerMock +- (id)setUpMockMainScreenAndView:(FlutterViewController*)viewControllerMock viewFrame:(CGRect)viewFrame convertedFrame:(CGRect)convertedFrame { OCMStub([viewControllerMock mainScreenIfViewLoaded]).andReturn(UIScreen.mainScreen); @@ -212,7 +212,7 @@ - (void)testStartKeyboardAnimationWillInvokeSetupKeyboardSpringAnimationIfNeeded CAAnimation* keyboardAnimation = [[viewControllerMock keyboardAnimationView].layer animationForKey:@"position"]; - OCMVerify([viewControllerMock setupKeyboardSpringAnimationIfNeeded:keyboardAnimation]); + OCMVerify([viewControllerMock setUpKeyboardSpringAnimationIfNeeded:keyboardAnimation]); } - (void)testSetupKeyboardSpringAnimationIfNeeded { @@ -223,10 +223,10 @@ - (void)testSetupKeyboardSpringAnimationIfNeeded { bundle:nil]; FlutterViewController* viewControllerMock = OCMPartialMock(viewController); CGRect viewFrame = UIScreen.mainScreen.bounds; - [self setupMockMainScreenAndView:viewControllerMock viewFrame:viewFrame convertedFrame:viewFrame]; + [self setUpMockMainScreenAndView:viewControllerMock viewFrame:viewFrame convertedFrame:viewFrame]; // Null check. - [viewControllerMock setupKeyboardSpringAnimationIfNeeded:nil]; + [viewControllerMock setUpKeyboardSpringAnimationIfNeeded:nil]; SpringAnimation* keyboardSpringAnimation = [viewControllerMock keyboardSpringAnimation]; XCTAssertTrue(keyboardSpringAnimation == nil); @@ -236,7 +236,7 @@ - (void)testSetupKeyboardSpringAnimationIfNeeded { nonSpringAnimation.fromValue = [NSNumber numberWithFloat:0.0]; nonSpringAnimation.toValue = [NSNumber numberWithFloat:1.0]; nonSpringAnimation.keyPath = @"position"; - [viewControllerMock setupKeyboardSpringAnimationIfNeeded:nonSpringAnimation]; + [viewControllerMock setUpKeyboardSpringAnimationIfNeeded:nonSpringAnimation]; keyboardSpringAnimation = [viewControllerMock keyboardSpringAnimation]; XCTAssertTrue(keyboardSpringAnimation == nil); @@ -249,7 +249,7 @@ - (void)testSetupKeyboardSpringAnimationIfNeeded { springAnimation.keyPath = @"position"; springAnimation.fromValue = [NSValue valueWithCGPoint:CGPointMake(0, 0)]; springAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(100, 100)]; - [viewControllerMock setupKeyboardSpringAnimationIfNeeded:springAnimation]; + [viewControllerMock setUpKeyboardSpringAnimationIfNeeded:springAnimation]; keyboardSpringAnimation = [viewControllerMock keyboardSpringAnimation]; XCTAssertTrue(keyboardSpringAnimation != nil); } @@ -262,7 +262,7 @@ - (void)testKeyboardAnimationIsShowingAndCompounding { bundle:nil]; FlutterViewController* viewControllerMock = OCMPartialMock(viewController); CGRect viewFrame = UIScreen.mainScreen.bounds; - [self setupMockMainScreenAndView:viewControllerMock viewFrame:viewFrame convertedFrame:viewFrame]; + [self setUpMockMainScreenAndView:viewControllerMock viewFrame:viewFrame convertedFrame:viewFrame]; BOOL isLocal = YES; CGFloat screenHeight = UIScreen.mainScreen.bounds.size.height; @@ -348,7 +348,7 @@ - (void)testShouldIgnoreKeyboardNotification { bundle:nil]; FlutterViewController* viewControllerMock = OCMPartialMock(viewController); CGRect viewFrame = UIScreen.mainScreen.bounds; - [self setupMockMainScreenAndView:viewControllerMock viewFrame:viewFrame convertedFrame:viewFrame]; + [self setUpMockMainScreenAndView:viewControllerMock viewFrame:viewFrame convertedFrame:viewFrame]; CGFloat screenWidth = UIScreen.mainScreen.bounds.size.width; CGFloat screenHeight = UIScreen.mainScreen.bounds.size.height; @@ -446,7 +446,7 @@ - (void)testKeyboardAnimationWillNotCrashWhenEngineDestroyed { FlutterViewController* viewController = [[FlutterViewController alloc] initWithEngine:engine nibName:nil bundle:nil]; - [viewController setupKeyboardAnimationVsyncClient:^(fml::TimePoint){ + [viewController setUpKeyboardAnimationVsyncClient:^(fml::TimePoint){ }]; [engine destroyContext]; } @@ -474,7 +474,7 @@ - (void)testKeyboardAnimationWillWaitUIThreadVsync { [expectation fulfill]; }; CFTimeInterval startTime = CACurrentMediaTime(); - [viewController setupKeyboardAnimationVsyncClient:callback]; + [viewController setUpKeyboardAnimationVsyncClient:callback]; [self waitForExpectationsWithTimeout:5.0 handler:nil]; XCTAssertTrue(fulfillTime - startTime > delayTime); } @@ -488,7 +488,7 @@ - (void)testCalculateKeyboardAttachMode { FlutterViewController* viewControllerMock = OCMPartialMock(viewController); CGRect viewFrame = UIScreen.mainScreen.bounds; - [self setupMockMainScreenAndView:viewControllerMock viewFrame:viewFrame convertedFrame:viewFrame]; + [self setUpMockMainScreenAndView:viewControllerMock viewFrame:viewFrame convertedFrame:viewFrame]; CGFloat screenWidth = UIScreen.mainScreen.bounds.size.width; CGFloat screenHeight = UIScreen.mainScreen.bounds.size.height; @@ -618,7 +618,7 @@ - (void)testCalculateMultitaskingAdjustment { CGRect viewOrigFrame = CGRectMake(0, 0, 320, screenHeight - 40); CGRect convertedViewFrame = CGRectMake(20, 20, 320, screenHeight - 40); CGRect keyboardFrame = CGRectMake(20, screenHeight - 320, screenWidth, 300); - id mockView = [self setupMockMainScreenAndView:viewControllerMock + id mockView = [self setUpMockMainScreenAndView:viewControllerMock viewFrame:viewOrigFrame convertedFrame:convertedViewFrame]; id mockTraitCollection = OCMClassMock([UITraitCollection class]); @@ -647,7 +647,7 @@ - (void)testCalculateKeyboardInset { CGRect convertedViewFrame = CGRectMake(20, 20, 320, screenHeight - 40); CGRect keyboardFrame = CGRectMake(20, screenHeight - 320, screenWidth, 300); - [self setupMockMainScreenAndView:viewControllerMock + [self setUpMockMainScreenAndView:viewControllerMock viewFrame:viewOrigFrame convertedFrame:convertedViewFrame]; @@ -677,7 +677,7 @@ - (void)testHandleKeyboardNotification { @"UIKeyboardIsLocalUserInfoKey" : @(isLocal) }]; FlutterViewController* viewControllerMock = OCMPartialMock(viewController); - [self setupMockMainScreenAndView:viewControllerMock viewFrame:viewFrame convertedFrame:viewFrame]; + [self setUpMockMainScreenAndView:viewControllerMock viewFrame:viewFrame convertedFrame:viewFrame]; viewControllerMock.targetViewInsetBottom = 0; XCTestExpectation* expectation = [self expectationWithDescription:@"update viewport"]; OCMStub([viewControllerMock updateViewportMetricsIfNeeded]).andDo(^(NSInvocation* invocation) { diff --git a/shell/platform/darwin/ios/framework/Source/FlutterViewControllerTest_mrc.mm b/shell/platform/darwin/ios/framework/Source/FlutterViewControllerTest_mrc.mm index c19486f0a9be1..bb691f033ee95 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterViewControllerTest_mrc.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterViewControllerTest_mrc.mm @@ -32,7 +32,7 @@ @interface FlutterViewController (Testing) @property(nonatomic, retain) VSyncClient* touchRateCorrectionVSyncClient; - (void)createTouchRateCorrectionVSyncClientIfNeeded; -- (void)setupKeyboardAnimationVsyncClient: +- (void)setUpKeyboardAnimationVsyncClient: (FlutterKeyboardAnimationCallback)keyboardAnimationCallback; - (void)startKeyBoardAnimation:(NSTimeInterval)duration; - (void)triggerTouchRateCorrectionIfNeeded:(NSSet*)touches; @@ -58,7 +58,7 @@ - (void)testSetupKeyboardAnimationVsyncClientWillCreateNewVsyncClientForFlutterV bundle:nil]; FlutterKeyboardAnimationCallback callback = ^(fml::TimePoint targetTime) { }; - [viewController setupKeyboardAnimationVsyncClient:callback]; + [viewController setUpKeyboardAnimationVsyncClient:callback]; XCTAssertNotNil(viewController.keyboardAnimationVSyncClient); CADisplayLink* link = [viewController.keyboardAnimationVSyncClient getDisplayLink]; XCTAssertNotNil(link); @@ -196,7 +196,7 @@ - (void)testFlutterViewControllerStartKeyboardAnimationWillCreateVsyncClientCorr FlutterViewController* viewController = [[FlutterViewController alloc] initWithEngine:engine nibName:nil bundle:nil]; - [viewController setupKeyboardAnimationVsyncClient:nil]; + [viewController setUpKeyboardAnimationVsyncClient:nil]; XCTAssertNil(viewController.keyboardAnimationVSyncClient); }