From 6b2450a6267d18785b15742a6885e8fdc73af6bd Mon Sep 17 00:00:00 2001 From: "auto-submit[bot]" Date: Thu, 16 May 2024 22:00:30 +0000 Subject: [PATCH] Revert "Manual roll of Clang from 725656bdd885 to 145176dc0c93 (#52823)" This reverts commit 1850def2ccffebc4b0120c5eca45fe1a7bf562d3. --- DEPS | 4 +- ci/licenses_golden/excluded_files | 2 +- common/graphics/gl_context_switch.cc | 5 +- display_list/display_list_unittests.cc | 4 +- display_list/effects/dl_runtime_effect.cc | 2 +- .../testing/dl_rendering_unittests.cc | 4 +- display_list/testing/dl_test_snippets.cc | 75 ++++++++++--- flow/layers/performance_overlay_layer.cc | 3 +- .../performance_overlay_layer_unittests.cc | 11 +- flow/testing/gl_context_switch_test.cc | 2 +- fml/memory/task_runner_checker.cc | 2 +- fml/memory/weak_ptr_unittest.cc | 4 +- fml/time/timestamp_provider.h | 2 +- impeller/compiler/compiler_backend.cc | 2 +- impeller/core/capture.h | 2 +- impeller/core/shader_types.h | 2 +- impeller/geometry/half.h | 2 +- impeller/geometry/path_unittests.cc | 45 +++++--- impeller/geometry/vector.h | 2 +- impeller/golden_tests/golden_digest.cc | 3 +- .../renderer/backend/gles/proc_table_gles.cc | 3 +- .../renderer/backend/gles/proc_table_gles.h | 6 +- impeller/renderer/backend/gles/reactor_gles.h | 4 +- .../renderer/backend/gles/test/mock_gles.cc | 2 +- .../backend/vulkan/command_pool_vk.cc | 7 +- .../renderer/backend/vulkan/command_pool_vk.h | 4 +- .../backend/vulkan/descriptor_pool_vk.h | 4 +- .../backend/vulkan/pipeline_library_vk.h | 4 +- .../renderer/backend/vulkan/pipeline_vk.h | 4 +- .../backend/vulkan/test/mock_vulkan.cc | 8 +- impeller/renderer/backend/vulkan/vk.h | 7 +- impeller/scene/node.cc | 2 +- impeller/toolkit/egl/context.h | 4 +- lib/gpu/render_pass.cc | 2 +- lib/ui/painting/image_decoder_unittests.cc | 2 +- .../image_generator_registry_unittests.cc | 2 +- lib/ui/window/viewport_metrics.cc | 13 +-- shell/common/shell_unittests.cc | 2 +- shell/platform/android/android_egl_surface.cc | 4 +- .../external_view_embedder/surface_pool.cc | 2 +- .../android/jni/platform_view_android_jni.h | 2 +- .../platform_view_android_delegate.cc | 2 +- .../common/public/flutter_messenger.h | 8 +- .../framework/Source/FlutterAppDelegate.mm | 5 +- .../Source/FlutterDartVMServicePublisher.mm | 3 +- .../Source/FlutterPlatformViews_Internal.mm | 2 +- .../darwin/ios/framework/Source/IOKit.h | 14 +-- .../embedder/tests/embedder_vk_unittests.cc | 2 +- .../fuchsia/dart-pkg/zircon_ffi/channel.h | 8 +- .../fuchsia/dart-pkg/zircon_ffi/handle.h | 8 +- .../flutter/focus_delegate_unittests.cc | 6 +- .../platform/fuchsia/flutter/platform_view.cc | 15 +-- .../pointer_injector_delegate_unittest.cc | 9 +- .../tests/integration/utils/screenshot.cc | 3 +- .../flutter/tests/platform_view_unittest.cc | 104 ++++++------------ shell/platform/glfw/public/flutter_glfw.h | 12 +- shell/platform/{ => linux}/.clang-tidy | 3 +- shell/platform/linux/fl_event_channel.cc | 8 +- shell/platform/linux/fl_method_call.cc | 5 +- .../linux/fl_standard_message_codec.cc | 22 ++-- shell/platform/linux/fl_texture_registrar.cc | 18 +-- .../flutter_view_controller_unittests.cc | 4 +- shell/platform/windows/direct_manipulation.cc | 2 +- shell/platform/windows/direct_manipulation.h | 24 ++-- .../windows/direct_manipulation_unittests.cc | 10 +- shell/platform/windows/keyboard_unittests.cc | 2 +- shell/platform/windows/platform_handler.h | 2 +- .../platform/windows/public/flutter_windows.h | 12 +- .../testing/mock_direct_manipulation.h | 2 +- .../testing/mock_text_input_manager.cc | 2 +- shell/platform/windows/testing/mock_window.cc | 4 +- .../testing/mock_window_binding_handler.cc | 3 +- testing/test_vulkan_surface.cc | 2 +- vulkan/procs/vulkan_proc_table.cc | 2 +- 74 files changed, 297 insertions(+), 297 deletions(-) rename shell/platform/{ => linux}/.clang-tidy (62%) diff --git a/DEPS b/DEPS index 451d659db39e1..f00c9db43c7f6 100644 --- a/DEPS +++ b/DEPS @@ -42,7 +42,7 @@ vars = { # updates to Clang Tidy will not turn the tree red. # # See https://github.com/flutter/flutter/wiki/Engine-pre‐submits-and-post‐submits#post-submit - 'clang_version': 'git_revision:145176dc0c93566ce4aef721044d49ab8ba50f87', + 'clang_version': 'git_revision:725656bdd885483c39f482a01ea25d67acf39c46', 'reclient_version': 'git_revision:29a9d3cb597b6a7d67fa3e9aa8a7cab1c81232ee', @@ -943,7 +943,7 @@ deps = { 'packages': [ { 'package': 'flutter_internal/rbe/reclient_cfgs', - 'version': '_crQLRWl_tm9uDdPtihkx_9vvdMe-OYBdQ0_ih51y7QC', + 'version': 'XIomtC8MFuQrF9qI5xYcFfcfKXZTbcY6nL6NgF-pSRIC', } ], 'condition': 'use_rbe', diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index d3b20a4a90ce7..37cc6dec12598 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -271,7 +271,6 @@ ../../../flutter/shell/common/variable_refresh_rate_display_unittests.cc ../../../flutter/shell/common/vsync_waiter_unittests.cc ../../../flutter/shell/gpu/gpu_surface_metal_impeller_unittests.mm -../../../flutter/shell/platform/.clang-tidy ../../../flutter/shell/platform/android/.gitignore ../../../flutter/shell/platform/android/README.md ../../../flutter/shell/platform/android/android_context_gl_impeller_unittests.cc @@ -367,6 +366,7 @@ ../../../flutter/shell/platform/glfw/client_wrapper/flutter_window_unittests.cc ../../../flutter/shell/platform/glfw/client_wrapper/plugin_registrar_glfw_unittests.cc ../../../flutter/shell/platform/glfw/client_wrapper/testing +../../../flutter/shell/platform/linux/.clang-tidy ../../../flutter/shell/platform/linux/testing ../../../flutter/shell/platform/windows/README.md ../../../flutter/shell/platform/windows/accessibility_bridge_windows_unittests.cc diff --git a/common/graphics/gl_context_switch.cc b/common/graphics/gl_context_switch.cc index f497c677c7be6..71ab99c5654b8 100644 --- a/common/graphics/gl_context_switch.cc +++ b/common/graphics/gl_context_switch.cc @@ -14,15 +14,14 @@ GLContextResult::GLContextResult() = default; GLContextResult::~GLContextResult() = default; -GLContextResult::GLContextResult(bool static_result) - : result_(static_result) {}; +GLContextResult::GLContextResult(bool static_result) : result_(static_result){}; bool GLContextResult::GetResult() { return result_; }; GLContextDefaultResult::GLContextDefaultResult(bool static_result) - : GLContextResult(static_result) {}; + : GLContextResult(static_result){}; GLContextDefaultResult::~GLContextDefaultResult() = default; diff --git a/display_list/display_list_unittests.cc b/display_list/display_list_unittests.cc index 2f8884f7d99b7..a149e75acdd38 100644 --- a/display_list/display_list_unittests.cc +++ b/display_list/display_list_unittests.cc @@ -2314,9 +2314,7 @@ TEST_F(DisplayListTest, RemoveUnnecessarySaveRestorePairs) { receiver2.drawRect({10, 10, 20, 20}); receiver2.save(); receiver2.translate(1.0, 1.0); - { - receiver2.drawRect({50, 50, 60, 60}); - } + { receiver2.drawRect({50, 50, 60, 60}); } receiver2.restore(); ASSERT_TRUE(DisplayListsEQ_Verbose(builder.Build(), builder2.Build())); } diff --git a/display_list/effects/dl_runtime_effect.cc b/display_list/effects/dl_runtime_effect.cc index fa4f221094203..bad115d06b979 100644 --- a/display_list/effects/dl_runtime_effect.cc +++ b/display_list/effects/dl_runtime_effect.cc @@ -52,7 +52,7 @@ DlRuntimeEffectImpeller::~DlRuntimeEffectImpeller() = default; DlRuntimeEffectImpeller::DlRuntimeEffectImpeller( std::shared_ptr runtime_stage) - : runtime_stage_(std::move(runtime_stage)) {}; + : runtime_stage_(std::move(runtime_stage)){}; sk_sp DlRuntimeEffectImpeller::skia_runtime_effect() const { return nullptr; diff --git a/display_list/testing/dl_rendering_unittests.cc b/display_list/testing/dl_rendering_unittests.cc index b6d6fc9e2542e..c7505c0c93ec1 100644 --- a/display_list/testing/dl_rendering_unittests.cc +++ b/display_list/testing/dl_rendering_unittests.cc @@ -2233,8 +2233,8 @@ class CanvasCompareTester { return DirectoryStatus::kCreated; } FML_LOG(ERROR) << "Could not create directory (" << dir - << ") for impeller failure images" - << ", ret = " << ret.get() << ", errno = " << errno; + << ") for impeller failure images" << ", ret = " << ret.get() + << ", errno = " << errno; return DirectoryStatus::kFailed; } diff --git a/display_list/testing/dl_test_snippets.cc b/display_list/testing/dl_test_snippets.cc index 978bb990a69cf..ffdbfee2043f2 100644 --- a/display_list/testing/dl_test_snippets.cc +++ b/display_list/testing/dl_test_snippets.cc @@ -517,30 +517,75 @@ std::vector CreateAllRenderingOps() { }}, {"DrawLine", { - {1, 24, 1, [](DlOpReceiver& r) { r.drawLine({0, 0}, {10, 10}); }}, - {1, 24, 1, [](DlOpReceiver& r) { r.drawLine({0, 1}, {10, 10}); }}, - {1, 24, 1, [](DlOpReceiver& r) { r.drawLine({0, 0}, {20, 10}); }}, - {1, 24, 1, [](DlOpReceiver& r) { r.drawLine({0, 0}, {10, 20}); }}, + {1, 24, 1, + [](DlOpReceiver& r) { + r.drawLine({0, 0}, {10, 10}); + }}, + {1, 24, 1, + [](DlOpReceiver& r) { + r.drawLine({0, 1}, {10, 10}); + }}, + {1, 24, 1, + [](DlOpReceiver& r) { + r.drawLine({0, 0}, {20, 10}); + }}, + {1, 24, 1, + [](DlOpReceiver& r) { + r.drawLine({0, 0}, {10, 20}); + }}, }}, {"DrawRect", { - {1, 24, 1, [](DlOpReceiver& r) { r.drawRect({0, 0, 10, 10}); }}, - {1, 24, 1, [](DlOpReceiver& r) { r.drawRect({0, 1, 10, 10}); }}, - {1, 24, 1, [](DlOpReceiver& r) { r.drawRect({0, 0, 20, 10}); }}, - {1, 24, 1, [](DlOpReceiver& r) { r.drawRect({0, 0, 10, 20}); }}, + {1, 24, 1, + [](DlOpReceiver& r) { + r.drawRect({0, 0, 10, 10}); + }}, + {1, 24, 1, + [](DlOpReceiver& r) { + r.drawRect({0, 1, 10, 10}); + }}, + {1, 24, 1, + [](DlOpReceiver& r) { + r.drawRect({0, 0, 20, 10}); + }}, + {1, 24, 1, + [](DlOpReceiver& r) { + r.drawRect({0, 0, 10, 20}); + }}, }}, {"DrawOval", { - {1, 24, 1, [](DlOpReceiver& r) { r.drawOval({0, 0, 10, 10}); }}, - {1, 24, 1, [](DlOpReceiver& r) { r.drawOval({0, 1, 10, 10}); }}, - {1, 24, 1, [](DlOpReceiver& r) { r.drawOval({0, 0, 20, 10}); }}, - {1, 24, 1, [](DlOpReceiver& r) { r.drawOval({0, 0, 10, 20}); }}, + {1, 24, 1, + [](DlOpReceiver& r) { + r.drawOval({0, 0, 10, 10}); + }}, + {1, 24, 1, + [](DlOpReceiver& r) { + r.drawOval({0, 1, 10, 10}); + }}, + {1, 24, 1, + [](DlOpReceiver& r) { + r.drawOval({0, 0, 20, 10}); + }}, + {1, 24, 1, + [](DlOpReceiver& r) { + r.drawOval({0, 0, 10, 20}); + }}, }}, {"DrawCircle", { - {1, 16, 1, [](DlOpReceiver& r) { r.drawCircle({0, 0}, 10); }}, - {1, 16, 1, [](DlOpReceiver& r) { r.drawCircle({0, 5}, 10); }}, - {1, 16, 1, [](DlOpReceiver& r) { r.drawCircle({0, 0}, 20); }}, + {1, 16, 1, + [](DlOpReceiver& r) { + r.drawCircle({0, 0}, 10); + }}, + {1, 16, 1, + [](DlOpReceiver& r) { + r.drawCircle({0, 5}, 10); + }}, + {1, 16, 1, + [](DlOpReceiver& r) { + r.drawCircle({0, 0}, 20); + }}, }}, {"DrawRRect", { diff --git a/flow/layers/performance_overlay_layer.cc b/flow/layers/performance_overlay_layer.cc index 59fa6dd5d8c07..63e41dd1fd4e2 100644 --- a/flow/layers/performance_overlay_layer.cc +++ b/flow/layers/performance_overlay_layer.cc @@ -95,8 +95,7 @@ sk_sp PerformanceOverlayLayer::MakeStatisticsText( std::stringstream stream; stream.setf(std::ios::fixed | std::ios::showpoint); stream << std::setprecision(1); - stream << label_prefix << " " - << "max " << max_ms_per_frame << " ms/frame, " + stream << label_prefix << " " << "max " << max_ms_per_frame << " ms/frame, " << "avg " << average_ms_per_frame << " ms/frame"; auto text = stream.str(); return SkTextBlob::MakeFromText(text.c_str(), text.size(), font, diff --git a/flow/layers/performance_overlay_layer_unittests.cc b/flow/layers/performance_overlay_layer_unittests.cc index 7537302d80fe7..82f1e87fd3bad 100644 --- a/flow/layers/performance_overlay_layer_unittests.cc +++ b/flow/layers/performance_overlay_layer_unittests.cc @@ -38,9 +38,8 @@ static std::string GetGoldenFilePath(int refresh_rate, bool is_new) { std::stringstream ss; // This unit test should only be run on Linux (not even on Mac since it's a // golden test). Hence we don't have to worry about the "/" vs. "\". - ss << flutter::GetGoldenDir() << "/" - << "performance_overlay_gold_" << refresh_rate << "fps" - << (is_new ? "_new" : "") << ".png"; + ss << flutter::GetGoldenDir() << "/" << "performance_overlay_gold_" + << refresh_rate << "fps" << (is_new ? "_new" : "") << ".png"; return ss.str(); } @@ -118,9 +117,9 @@ static void TestPerformanceOverlayLayerGold(int refresh_rate) { b64_char[b64_size] = 0; // make it null terminated for printing EXPECT_TRUE(golden_data_matches) - << "Golden file mismatch. Please check " - << "the difference between " << golden_file_path << " and " - << new_golden_file_path << ", and replace the former " + << "Golden file mismatch. Please check " << "the difference between " + << golden_file_path << " and " << new_golden_file_path + << ", and replace the former " << "with the latter if the difference looks good.\nS\n" << "See also the base64 encoded " << new_golden_file_path << ":\n" << b64_char; diff --git a/flow/testing/gl_context_switch_test.cc b/flow/testing/gl_context_switch_test.cc index bdaed3fcc4c62..8a98ae882e23c 100644 --- a/flow/testing/gl_context_switch_test.cc +++ b/flow/testing/gl_context_switch_test.cc @@ -10,7 +10,7 @@ namespace testing { static thread_local std::unique_ptr current_context; TestSwitchableGLContext::TestSwitchableGLContext(int context) - : context_(context) {}; + : context_(context){}; TestSwitchableGLContext::~TestSwitchableGLContext() = default; diff --git a/fml/memory/task_runner_checker.cc b/fml/memory/task_runner_checker.cc index 556776ef48cd0..5320c49153b4d 100644 --- a/fml/memory/task_runner_checker.cc +++ b/fml/memory/task_runner_checker.cc @@ -10,7 +10,7 @@ TaskRunnerChecker::TaskRunnerChecker() : initialized_queue_id_(InitTaskQueueId()), subsumed_queue_ids_( MessageLoopTaskQueues::GetInstance()->GetSubsumedTaskQueueId( - initialized_queue_id_)) {}; + initialized_queue_id_)){}; TaskRunnerChecker::~TaskRunnerChecker() = default; diff --git a/fml/memory/weak_ptr_unittest.cc b/fml/memory/weak_ptr_unittest.cc index 37adf1dffbb51..d995ec993cfb9 100644 --- a/fml/memory/weak_ptr_unittest.cc +++ b/fml/memory/weak_ptr_unittest.cc @@ -111,9 +111,7 @@ TEST(WeakPtrTest, MultipleStaged) { int data = 0; WeakPtrFactory factory(&data); a = factory.GetWeakPtr(); - { - WeakPtr b = factory.GetWeakPtr(); - } + { WeakPtr b = factory.GetWeakPtr(); } EXPECT_NE(a.get(), nullptr); } EXPECT_EQ(nullptr, a.get()); diff --git a/fml/time/timestamp_provider.h b/fml/time/timestamp_provider.h index 35639a73f1ec4..8b10036f0b1b8 100644 --- a/fml/time/timestamp_provider.h +++ b/fml/time/timestamp_provider.h @@ -15,7 +15,7 @@ namespace fml { /// unique values. Any two consecutive invocations must be ordered. class TimestampProvider { public: - virtual ~TimestampProvider() {}; + virtual ~TimestampProvider(){}; // Returns the number of ticks elapsed by a monotonic clock since epoch. virtual fml::TimePoint Now() = 0; diff --git a/impeller/compiler/compiler_backend.cc b/impeller/compiler/compiler_backend.cc index 5c7599630afc5..58afead588383 100644 --- a/impeller/compiler/compiler_backend.cc +++ b/impeller/compiler/compiler_backend.cc @@ -24,7 +24,7 @@ CompilerBackend::CompilerBackend(SkSLCompiler compiler) CompilerBackend::CompilerBackend() = default; CompilerBackend::CompilerBackend(Type type, Compiler compiler) - : type_(type), compiler_(std::move(compiler)) {}; + : type_(type), compiler_(std::move(compiler)){}; CompilerBackend::~CompilerBackend() = default; diff --git a/impeller/core/capture.h b/impeller/core/capture.h index fa64b9052a3d4..9e5c0d9318417 100644 --- a/impeller/core/capture.h +++ b/impeller/core/capture.h @@ -42,7 +42,7 @@ template struct CaptureCursorListElement { std::string label; - explicit CaptureCursorListElement(const std::string& label) : label(label) {}; + explicit CaptureCursorListElement(const std::string& label) : label(label){}; virtual ~CaptureCursorListElement() = default; diff --git a/impeller/core/shader_types.h b/impeller/core/shader_types.h index 057d348ac7244..25c405b1f0cb9 100644 --- a/impeller/core/shader_types.h +++ b/impeller/core/shader_types.h @@ -179,7 +179,7 @@ struct Padded { T value; Padding _PADDING_; - Padded(T p_value) : value(p_value) {}; // NOLINT(google-explicit-constructor) + Padded(T p_value) : value(p_value){}; // NOLINT(google-explicit-constructor) }; inline constexpr Vector4 ToVector(Color color) { diff --git a/impeller/geometry/half.h b/impeller/geometry/half.h index 6d966b44f594f..1e819ce466856 100644 --- a/impeller/geometry/half.h +++ b/impeller/geometry/half.h @@ -140,7 +140,7 @@ struct HalfVector2 { constexpr HalfVector2(const Vector2& a) : x(ScalarToHalf(a.x)), y(ScalarToHalf(a.y)) {} - constexpr HalfVector2(InternalHalf x, InternalHalf y) : x(x), y(y) {}; + constexpr HalfVector2(InternalHalf x, InternalHalf y) : x(x), y(y){}; constexpr bool operator==(const HalfVector2& v) const { return v.x == x && v.y == y; diff --git a/impeller/geometry/path_unittests.cc b/impeller/geometry/path_unittests.cc index 68af3658fef13..54f6900a0f9a2 100644 --- a/impeller/geometry/path_unittests.cc +++ b/impeller/geometry/path_unittests.cc @@ -608,17 +608,29 @@ TEST(PathTest, PathBuilderDoesNotMutateCopiedPaths) { }, true, {}, "Close"); - test_isolation([](PathBuilder& builder) { builder.MoveTo({20, 30}, false); }, - false, {}, "Absolute MoveTo"); + test_isolation( + [](PathBuilder& builder) { + builder.MoveTo({20, 30}, false); + }, + false, {}, "Absolute MoveTo"); - test_isolation([](PathBuilder& builder) { builder.MoveTo({20, 30}, true); }, - false, {}, "Relative MoveTo"); + test_isolation( + [](PathBuilder& builder) { + builder.MoveTo({20, 30}, true); + }, + false, {}, "Relative MoveTo"); - test_isolation([](PathBuilder& builder) { builder.LineTo({20, 30}, false); }, - false, {}, "Absolute LineTo"); + test_isolation( + [](PathBuilder& builder) { + builder.LineTo({20, 30}, false); + }, + false, {}, "Absolute LineTo"); - test_isolation([](PathBuilder& builder) { builder.LineTo({20, 30}, true); }, - false, {}, "Relative LineTo"); + test_isolation( + [](PathBuilder& builder) { + builder.LineTo({20, 30}, true); + }, + false, {}, "Relative LineTo"); test_isolation( [](PathBuilder& builder) { // @@ -669,7 +681,9 @@ TEST(PathTest, PathBuilderDoesNotMutateCopiedPaths) { false, {}, "Relative CubicCurveTo"); test_isolation( - [](PathBuilder& builder) { builder.AddLine({100, 100}, {150, 100}); }, + [](PathBuilder& builder) { + builder.AddLine({100, 100}, {150, 100}); + }, false, {}, "AddLine"); test_isolation( @@ -685,8 +699,10 @@ TEST(PathTest, PathBuilderDoesNotMutateCopiedPaths) { false, {}, "AddOval"); test_isolation( - [](PathBuilder& builder) { builder.AddCircle({100, 100}, 20); }, false, - {}, "AddCircle"); + [](PathBuilder& builder) { + builder.AddCircle({100, 100}, 20); + }, + false, {}, "AddCircle"); test_isolation( [](PathBuilder& builder) { @@ -707,8 +723,11 @@ TEST(PathTest, PathBuilderDoesNotMutateCopiedPaths) { }, false, {}, "AddCubicCurve"); - test_isolation([](PathBuilder& builder) { builder.Shift({23, 42}); }, false, - {23, 42}, "Shift"); + test_isolation( + [](PathBuilder& builder) { + builder.Shift({23, 42}); + }, + false, {23, 42}, "Shift"); } } // namespace testing diff --git a/impeller/geometry/vector.h b/impeller/geometry/vector.h index 1e810b2e26b2f..d55136d5cef80 100644 --- a/impeller/geometry/vector.h +++ b/impeller/geometry/vector.h @@ -27,7 +27,7 @@ struct Vector3 { Scalar e[3]; }; - constexpr Vector3() {}; + constexpr Vector3(){}; constexpr Vector3(const Color& c) : x(c.red), y(c.green), z(c.blue) {} diff --git a/impeller/golden_tests/golden_digest.cc b/impeller/golden_tests/golden_digest.cc index 3dcb9be9b8a7a..d68220b10022c 100644 --- a/impeller/golden_tests/golden_digest.cc +++ b/impeller/golden_tests/golden_digest.cc @@ -67,8 +67,7 @@ bool GoldenDigest::Write(WorkingDirectory* working_directory) { } is_first = false; - fout << " { " - << "\"testName\" : \"" << entry.test_name << "\", " + fout << " { " << "\"testName\" : \"" << entry.test_name << "\", " << "\"filename\" : \"" << entry.filename << "\", " << "\"width\" : " << entry.width << ", " << "\"height\" : " << entry.height << ", "; diff --git a/impeller/renderer/backend/gles/proc_table_gles.cc b/impeller/renderer/backend/gles/proc_table_gles.cc index 880491541660e..8aeda6d733a1a 100644 --- a/impeller/renderer/backend/gles/proc_table_gles.cc +++ b/impeller/renderer/backend/gles/proc_table_gles.cc @@ -84,8 +84,7 @@ ProcTableGLES::ProcTableGLES( // NOLINT(google-readability-function-size) auto error_fn = reinterpret_cast(resolver("glGetError")); if (!error_fn) { - VALIDATION_LOG << "Could not resolve " - << "glGetError"; + VALIDATION_LOG << "Could not resolve " << "glGetError"; return; } diff --git a/impeller/renderer/backend/gles/proc_table_gles.h b/impeller/renderer/backend/gles/proc_table_gles.h index cd397c4f1a58c..44587ae96a88d 100644 --- a/impeller/renderer/backend/gles/proc_table_gles.h +++ b/impeller/renderer/backend/gles/proc_table_gles.h @@ -37,12 +37,10 @@ struct AutoErrorCheck { } if (GLErrorIsFatal(error)) { FML_LOG(FATAL) << "Fatal GL Error " << GLErrorToString(error) << "(" - << error << ")" - << " encountered on call to " << name; + << error << ")" << " encountered on call to " << name; } else { FML_LOG(ERROR) << "GL Error " << GLErrorToString(error) << "(" << error - << ")" - << " encountered on call to " << name; + << ")" << " encountered on call to " << name; } } } diff --git a/impeller/renderer/backend/gles/reactor_gles.h b/impeller/renderer/backend/gles/reactor_gles.h index e1f95937b4a88..392c054e642f2 100644 --- a/impeller/renderer/backend/gles/reactor_gles.h +++ b/impeller/renderer/backend/gles/reactor_gles.h @@ -247,8 +247,8 @@ class ReactorGLES { LiveHandles handles_ IPLR_GUARDED_BY(handles_mutex_); mutable Mutex workers_mutex_; - mutable std::map> workers_ - IPLR_GUARDED_BY(workers_mutex_); + mutable std::map> workers_ IPLR_GUARDED_BY( + workers_mutex_); bool can_set_debug_labels_ = false; bool is_valid_ = false; diff --git a/impeller/renderer/backend/gles/test/mock_gles.cc b/impeller/renderer/backend/gles/test/mock_gles.cc index de6caaf1bb4fd..d000dad400947 100644 --- a/impeller/renderer/backend/gles/test/mock_gles.cc +++ b/impeller/renderer/backend/gles/test/mock_gles.cc @@ -36,7 +36,7 @@ template struct CheckSameSignature : std::false_type {}; template -struct CheckSameSignature : std::true_type{}; +struct CheckSameSignature : std::true_type {}; // This is a stub function that does nothing/records nothing. void doNothing() {} diff --git a/impeller/renderer/backend/vulkan/command_pool_vk.cc b/impeller/renderer/backend/vulkan/command_pool_vk.cc index 7873689d3b414..9bb3d9d898621 100644 --- a/impeller/renderer/backend/vulkan/command_pool_vk.cc +++ b/impeller/renderer/backend/vulkan/command_pool_vk.cc @@ -172,9 +172,10 @@ static thread_local std::unique_ptr tls_command_pool_map; // Map each context to a list of all thread-local command pools associated // with that context. static Mutex g_all_pools_map_mutex; -static std::unordered_map>> - g_all_pools_map IPLR_GUARDED_BY(g_all_pools_map_mutex); +static std::unordered_map< + const ContextVK*, + std::vector>> g_all_pools_map + IPLR_GUARDED_BY(g_all_pools_map_mutex); // TODO(matanlurey): Return a status_or<> instead of nullptr when we have one. std::shared_ptr CommandPoolRecyclerVK::Get() { diff --git a/impeller/renderer/backend/vulkan/command_pool_vk.h b/impeller/renderer/backend/vulkan/command_pool_vk.h index 859911a6f2da9..dd60026b44f70 100644 --- a/impeller/renderer/backend/vulkan/command_pool_vk.h +++ b/impeller/renderer/backend/vulkan/command_pool_vk.h @@ -72,8 +72,8 @@ class CommandPoolVK final { std::weak_ptr& context_; // Used to retain a reference on these until the pool is reset. - std::vector collected_buffers_ - IPLR_GUARDED_BY(pool_mutex_); + std::vector collected_buffers_ IPLR_GUARDED_BY( + pool_mutex_); }; //------------------------------------------------------------------------------ diff --git a/impeller/renderer/backend/vulkan/descriptor_pool_vk.h b/impeller/renderer/backend/vulkan/descriptor_pool_vk.h index aff21304a160f..53f35a94ab890 100644 --- a/impeller/renderer/backend/vulkan/descriptor_pool_vk.h +++ b/impeller/renderer/backend/vulkan/descriptor_pool_vk.h @@ -78,8 +78,8 @@ class DescriptorPoolRecyclerVK final std::weak_ptr context_; Mutex recycled_mutex_; - std::vector recycled_ - IPLR_GUARDED_BY(recycled_mutex_); + std::vector recycled_ IPLR_GUARDED_BY( + recycled_mutex_); /// @brief Creates a new |vk::CommandPool|. /// diff --git a/impeller/renderer/backend/vulkan/pipeline_library_vk.h b/impeller/renderer/backend/vulkan/pipeline_library_vk.h index bfe9636f9ad8f..ddc476f6d7fcf 100644 --- a/impeller/renderer/backend/vulkan/pipeline_library_vk.h +++ b/impeller/renderer/backend/vulkan/pipeline_library_vk.h @@ -43,8 +43,8 @@ class PipelineLibraryVK final Mutex pipelines_mutex_; PipelineMap pipelines_ IPLR_GUARDED_BY(pipelines_mutex_); Mutex compute_pipelines_mutex_; - ComputePipelineMap compute_pipelines_ - IPLR_GUARDED_BY(compute_pipelines_mutex_); + ComputePipelineMap compute_pipelines_ IPLR_GUARDED_BY( + compute_pipelines_mutex_); std::atomic_size_t frames_acquired_ = 0u; bool is_valid_ = false; bool cache_dirty_ = false; diff --git a/impeller/renderer/backend/vulkan/pipeline_vk.h b/impeller/renderer/backend/vulkan/pipeline_vk.h index 47e7d70764497..5ab4feccfde89 100644 --- a/impeller/renderer/backend/vulkan/pipeline_vk.h +++ b/impeller/renderer/backend/vulkan/pipeline_vk.h @@ -63,8 +63,8 @@ class PipelineVK final vk::UniqueDescriptorSetLayout descriptor_set_layout_; std::shared_ptr immutable_sampler_; mutable Mutex immutable_sampler_variants_mutex_; - mutable ImmutableSamplerVariants immutable_sampler_variants_ - IPLR_GUARDED_BY(immutable_sampler_variants_mutex_); + mutable ImmutableSamplerVariants immutable_sampler_variants_ IPLR_GUARDED_BY( + immutable_sampler_variants_mutex_); bool is_valid_ = false; PipelineVK(std::weak_ptr device_holder, diff --git a/impeller/renderer/backend/vulkan/test/mock_vulkan.cc b/impeller/renderer/backend/vulkan/test/mock_vulkan.cc index cbd94b7506101..c18a569315863 100644 --- a/impeller/renderer/backend/vulkan/test/mock_vulkan.cc +++ b/impeller/renderer/backend/vulkan/test/mock_vulkan.cc @@ -94,16 +94,16 @@ class MockDevice final { MockDevice& operator=(const MockDevice&) = delete; Mutex called_functions_mutex_; - std::shared_ptr> called_functions_ - IPLR_GUARDED_BY(called_functions_mutex_); + std::shared_ptr> called_functions_ IPLR_GUARDED_BY( + called_functions_mutex_); Mutex command_buffers_mutex_; std::vector> command_buffers_ IPLR_GUARDED_BY(command_buffers_mutex_); Mutex commmand_pools_mutex_; - std::vector> command_pools_ - IPLR_GUARDED_BY(commmand_pools_mutex_); + std::vector> command_pools_ IPLR_GUARDED_BY( + commmand_pools_mutex_); }; void noop() {} diff --git a/impeller/renderer/backend/vulkan/vk.h b/impeller/renderer/backend/vulkan/vk.h index f1c129d7fc736..ea992ce0e2d9d 100644 --- a/impeller/renderer/backend/vulkan/vk.h +++ b/impeller/renderer/backend/vulkan/vk.h @@ -58,15 +58,12 @@ #define VULKAN_HPP_ASSERT FML_CHECK #else #define VULKAN_HPP_ASSERT(ignored) \ - { \ - } + {} #endif #define VULKAN_HPP_NAMESPACE impeller::vk #define VULKAN_HPP_ASSERT_ON_RESULT(ignored) \ - { \ - [[maybe_unused]] auto res = (ignored); \ - } + { [[maybe_unused]] auto res = (ignored); } #define VULKAN_HPP_NO_EXCEPTIONS #include "vulkan/vulkan.hpp" // IWYU pragma: keep. diff --git a/impeller/scene/node.cc b/impeller/scene/node.cc index 9a09b4bbd3b4e..aad7fc67199e7 100644 --- a/impeller/scene/node.cc +++ b/impeller/scene/node.cc @@ -221,7 +221,7 @@ void Node::UnpackFromFlatbuffer( } } -Node::Node() : name_(SPrintF("__node%" PRIu64, kNextNodeID++)) {}; +Node::Node() : name_(SPrintF("__node%" PRIu64, kNextNodeID++)){}; Node::~Node() = default; diff --git a/impeller/toolkit/egl/context.h b/impeller/toolkit/egl/context.h index 7c06abbad9e7e..d6854ee7d33b1 100644 --- a/impeller/toolkit/egl/context.h +++ b/impeller/toolkit/egl/context.h @@ -105,8 +105,8 @@ class Context { EGLDisplay display_ = EGL_NO_DISPLAY; EGLContext context_ = EGL_NO_CONTEXT; mutable RWMutex listeners_mutex_; - std::map listeners_ - IPLR_GUARDED_BY(listeners_mutex_); + std::map listeners_ IPLR_GUARDED_BY( + listeners_mutex_); Context(EGLDisplay display, EGLContext context); diff --git a/lib/gpu/render_pass.cc b/lib/gpu/render_pass.cc index a77c0f8222421..1bbbb92108bc4 100644 --- a/lib/gpu/render_pass.cc +++ b/lib/gpu/render_pass.cc @@ -24,7 +24,7 @@ IMPLEMENT_WRAPPERTYPEINFO(flutter_gpu, RenderPass); RenderPass::RenderPass() : vertex_buffer_( - impeller::VertexBuffer{.index_type = impeller::IndexType::kNone}) {}; + impeller::VertexBuffer{.index_type = impeller::IndexType::kNone}){}; RenderPass::~RenderPass() = default; diff --git a/lib/ui/painting/image_decoder_unittests.cc b/lib/ui/painting/image_decoder_unittests.cc index e2b2a1e5c60af..2504a95064b6e 100644 --- a/lib/ui/painting/image_decoder_unittests.cc +++ b/lib/ui/painting/image_decoder_unittests.cc @@ -198,7 +198,7 @@ TEST_F(ImageDecoderFixtureTest, CanCreateImageDecoder) { /// An Image generator that pretends it can't recognize the data it was given. class UnknownImageGenerator : public ImageGenerator { public: - UnknownImageGenerator() : info_(SkImageInfo::MakeUnknown()) {}; + UnknownImageGenerator() : info_(SkImageInfo::MakeUnknown()){}; ~UnknownImageGenerator() = default; const SkImageInfo& GetInfo() { return info_; } diff --git a/lib/ui/painting/image_generator_registry_unittests.cc b/lib/ui/painting/image_generator_registry_unittests.cc index d88a02817bb4f..54eb45309e3a0 100644 --- a/lib/ui/painting/image_generator_registry_unittests.cc +++ b/lib/ui/painting/image_generator_registry_unittests.cc @@ -54,7 +54,7 @@ class FakeImageGenerator : public ImageGenerator { : info_(SkImageInfo::Make(identifiableFakeWidth, identifiableFakeWidth, SkColorType::kRGBA_8888_SkColorType, - SkAlphaType::kOpaque_SkAlphaType)) {}; + SkAlphaType::kOpaque_SkAlphaType)){}; ~FakeImageGenerator() = default; const SkImageInfo& GetInfo() { return info_; } diff --git a/lib/ui/window/viewport_metrics.cc b/lib/ui/window/viewport_metrics.cc index b4bdb2bbe4151..05d01c47c8e34 100644 --- a/lib/ui/window/viewport_metrics.cc +++ b/lib/ui/window/viewport_metrics.cc @@ -95,15 +95,14 @@ bool operator==(const ViewportMetrics& a, const ViewportMetrics& b) { } std::ostream& operator<<(std::ostream& os, const ViewportMetrics& a) { - os << "DPR: " << a.device_pixel_ratio << " " - << "Size: [" << a.physical_width << "W " << a.physical_height << "H] " - << "Padding: [" << a.physical_padding_top << "T " - << a.physical_padding_right << "R " << a.physical_padding_bottom << "B " - << a.physical_padding_left << "L] " + os << "DPR: " << a.device_pixel_ratio << " " << "Size: [" << a.physical_width + << "W " << a.physical_height << "H] " << "Padding: [" + << a.physical_padding_top << "T " << a.physical_padding_right << "R " + << a.physical_padding_bottom << "B " << a.physical_padding_left << "L] " << "Insets: [" << a.physical_view_inset_top << "T " << a.physical_view_inset_right << "R " << a.physical_view_inset_bottom - << "B " << a.physical_view_inset_left << "L] " - << "Gesture Insets: [" << a.physical_system_gesture_inset_top << "T " + << "B " << a.physical_view_inset_left << "L] " << "Gesture Insets: [" + << a.physical_system_gesture_inset_top << "T " << a.physical_system_gesture_inset_right << "R " << a.physical_system_gesture_inset_bottom << "B " << a.physical_system_gesture_inset_left << "L] " diff --git a/shell/common/shell_unittests.cc b/shell/common/shell_unittests.cc index a186b445c13e6..ddda64664d5bc 100644 --- a/shell/common/shell_unittests.cc +++ b/shell/common/shell_unittests.cc @@ -2280,7 +2280,7 @@ TEST_F(ShellTest, LocaltimesMatch) { class SinglePixelImageGenerator : public ImageGenerator { public: SinglePixelImageGenerator() - : info_(SkImageInfo::MakeN32(1, 1, SkAlphaType::kOpaque_SkAlphaType)) {}; + : info_(SkImageInfo::MakeN32(1, 1, SkAlphaType::kOpaque_SkAlphaType)){}; ~SinglePixelImageGenerator() = default; const SkImageInfo& GetInfo() { return info_; } diff --git a/shell/platform/android/android_egl_surface.cc b/shell/platform/android/android_egl_surface.cc index ada34e4a8000e..d4f3fc648eead 100644 --- a/shell/platform/android/android_egl_surface.cc +++ b/shell/platform/android/android_egl_surface.cc @@ -21,9 +21,7 @@ void LogLastEGLError() { }; #define _EGL_ERROR_DESC(a) \ - { \ - #a, a \ - } + { #a, a } const EGLNameErrorPair pairs[] = { _EGL_ERROR_DESC(EGL_SUCCESS), diff --git a/shell/platform/android/external_view_embedder/surface_pool.cc b/shell/platform/android/external_view_embedder/surface_pool.cc index 940a288491f2b..6e71e97247c9b 100644 --- a/shell/platform/android/external_view_embedder/surface_pool.cc +++ b/shell/platform/android/external_view_embedder/surface_pool.cc @@ -13,7 +13,7 @@ OverlayLayer::OverlayLayer(int id, std::unique_ptr surface) : id(id), android_surface(std::move(android_surface)), - surface(std::move(surface)) {}; + surface(std::move(surface)){}; OverlayLayer::~OverlayLayer() = default; diff --git a/shell/platform/android/jni/platform_view_android_jni.h b/shell/platform/android/jni/platform_view_android_jni.h index 5784e36a2df20..dcce4fd569ecc 100644 --- a/shell/platform/android/jni/platform_view_android_jni.h +++ b/shell/platform/android/jni/platform_view_android_jni.h @@ -186,7 +186,7 @@ class PlatformViewAndroidJNI { /// struct OverlayMetadata { OverlayMetadata(int id, fml::RefPtr window) - : id(id), window(std::move(window)) {}; + : id(id), window(std::move(window)){}; ~OverlayMetadata() = default; diff --git a/shell/platform/android/platform_view_android_delegate/platform_view_android_delegate.cc b/shell/platform/android/platform_view_android_delegate/platform_view_android_delegate.cc index f1b31b7450554..1639af639f3d0 100644 --- a/shell/platform/android/platform_view_android_delegate/platform_view_android_delegate.cc +++ b/shell/platform/android/platform_view_android_delegate/platform_view_android_delegate.cc @@ -39,7 +39,7 @@ void putStringAttributesIntoBuffer( PlatformViewAndroidDelegate::PlatformViewAndroidDelegate( std::shared_ptr jni_facade) - : jni_facade_(std::move(jni_facade)) {}; + : jni_facade_(std::move(jni_facade)){}; void PlatformViewAndroidDelegate::UpdateSemantics( const flutter::SemanticsNodeUpdates& update, diff --git a/shell/platform/common/public/flutter_messenger.h b/shell/platform/common/public/flutter_messenger.h index b364a573bec39..ddf800a5cdf25 100644 --- a/shell/platform/common/public/flutter_messenger.h +++ b/shell/platform/common/public/flutter_messenger.h @@ -95,8 +95,8 @@ FLUTTER_EXPORT void FlutterDesktopMessengerSetCallback( // Operation is thread-safe. // // See also: |FlutterDesktopMessengerRelease| -FLUTTER_EXPORT FlutterDesktopMessengerRef -FlutterDesktopMessengerAddRef(FlutterDesktopMessengerRef messenger); +FLUTTER_EXPORT FlutterDesktopMessengerRef FlutterDesktopMessengerAddRef( + FlutterDesktopMessengerRef messenger); // Decrements the reference count for the |messenger|. // @@ -126,8 +126,8 @@ FLUTTER_EXPORT bool FlutterDesktopMessengerIsAvailable( // Returns the |messenger| value. // // See also: |FlutterDesktopMessengerUnlock| -FLUTTER_EXPORT FlutterDesktopMessengerRef -FlutterDesktopMessengerLock(FlutterDesktopMessengerRef messenger); +FLUTTER_EXPORT FlutterDesktopMessengerRef FlutterDesktopMessengerLock( + FlutterDesktopMessengerRef messenger); // Unlocks the `FlutterDesktopMessengerRef`. // diff --git a/shell/platform/darwin/ios/framework/Source/FlutterAppDelegate.mm b/shell/platform/darwin/ios/framework/Source/FlutterAppDelegate.mm index 9b572e9de0f10..67d2ee3791243 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterAppDelegate.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterAppDelegate.mm @@ -206,8 +206,9 @@ - (void)application:(UIApplication*)application - (BOOL)application:(UIApplication*)application continueUserActivity:(NSUserActivity*)userActivity - restorationHandler:(void (^)(NSArray>* __nullable - restorableObjects))restorationHandler { + restorationHandler: + (void (^)(NSArray>* __nullable restorableObjects)) + restorationHandler { if ([_lifeCycleDelegate application:application continueUserActivity:userActivity restorationHandler:restorationHandler]) { diff --git a/shell/platform/darwin/ios/framework/Source/FlutterDartVMServicePublisher.mm b/shell/platform/darwin/ios/framework/Source/FlutterDartVMServicePublisher.mm index 2cec75ca49f0b..597bc5b8056c6 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterDartVMServicePublisher.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterDartVMServicePublisher.mm @@ -111,8 +111,7 @@ - (void)publishServiceProtocolPort:(NSURL*)url { << "as hot reload and DevTools. To make your Flutter app or module " << "attachable and debuggable, add a '" << registrationType << "' value " << "to the 'NSBonjourServices' key in your Info.plist for the Debug/" - << "Profile configurations. " - << "For more information, see " + << "Profile configurations. " << "For more information, see " << "https://flutter.dev/docs/development/add-to-app/ios/" "project-setup#local-network-privacy-permissions"; } diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.mm b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.mm index baeca57555221..859544e119a52 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.mm @@ -23,7 +23,7 @@ : overlay_view(overlay_view), overlay_view_wrapper(overlay_view_wrapper), ios_surface(std::move(ios_surface)), - surface(std::move(surface)) {}; + surface(std::move(surface)){}; FlutterPlatformViewLayer::~FlutterPlatformViewLayer() = default; diff --git a/shell/platform/darwin/ios/framework/Source/IOKit.h b/shell/platform/darwin/ios/framework/Source/IOKit.h index 3573834449ccb..53e8fe1b35eb4 100644 --- a/shell/platform/darwin/ios/framework/Source/IOKit.h +++ b/shell/platform/darwin/ios/framework/Source/IOKit.h @@ -91,13 +91,13 @@ void IOIteratorReset(io_iterator_t it); CFMutableDictionaryRef IOServiceMatching(const char* name) CF_RETURNS_RETAINED; CFMutableDictionaryRef IOServiceNameMatching(const char* name) CF_RETURNS_RETAINED; -io_service_t IOServiceGetMatchingService(mach_port_t master, - CFDictionaryRef matching - CF_RELEASES_ARGUMENT); -kern_return_t IOServiceGetMatchingServices(mach_port_t master, - CFDictionaryRef matching - CF_RELEASES_ARGUMENT, - io_iterator_t* it); +io_service_t IOServiceGetMatchingService( + mach_port_t master, + CFDictionaryRef matching CF_RELEASES_ARGUMENT); +kern_return_t IOServiceGetMatchingServices( + mach_port_t master, + CFDictionaryRef matching CF_RELEASES_ARGUMENT, + io_iterator_t* it); #if __cplusplus } diff --git a/shell/platform/embedder/tests/embedder_vk_unittests.cc b/shell/platform/embedder/tests/embedder_vk_unittests.cc index e7d12c236875d..d6209d2ed96d0 100644 --- a/shell/platform/embedder/tests/embedder_vk_unittests.cc +++ b/shell/platform/embedder/tests/embedder_vk_unittests.cc @@ -85,7 +85,7 @@ template struct CheckSameSignature : std::false_type {}; template -struct CheckSameSignature : std::true_type{}; +struct CheckSameSignature : std::true_type {}; static_assert(CheckSameSignature::value); diff --git a/shell/platform/fuchsia/dart-pkg/zircon_ffi/channel.h b/shell/platform/fuchsia/dart-pkg/zircon_ffi/channel.h index 07dbcd6a01cd9..a096d3bd444aa 100644 --- a/shell/platform/fuchsia/dart-pkg/zircon_ffi/channel.h +++ b/shell/platform/fuchsia/dart-pkg/zircon_ffi/channel.h @@ -18,10 +18,10 @@ extern "C" { ZIRCON_FFI_EXPORT zircon_dart_handle_pair_t* zircon_dart_channel_create( uint32_t options); -ZIRCON_FFI_EXPORT int32_t -zircon_dart_channel_write(zircon_dart_handle_t* handle, - zircon_dart_byte_array_t* bytes, - zircon_dart_handle_list_t* handles); +ZIRCON_FFI_EXPORT int32_t zircon_dart_channel_write( + zircon_dart_handle_t* handle, + zircon_dart_byte_array_t* bytes, + zircon_dart_handle_list_t* handles); #ifdef __cplusplus } diff --git a/shell/platform/fuchsia/dart-pkg/zircon_ffi/handle.h b/shell/platform/fuchsia/dart-pkg/zircon_ffi/handle.h index 6d9d24022ba73..ba0435f2864b7 100644 --- a/shell/platform/fuchsia/dart-pkg/zircon_ffi/handle.h +++ b/shell/platform/fuchsia/dart-pkg/zircon_ffi/handle.h @@ -43,13 +43,13 @@ ZIRCON_FFI_EXPORT void zircon_dart_handle_list_free( zircon_dart_handle_list_t* list); // Returns 1 if the handle is valid. -ZIRCON_FFI_EXPORT int32_t -zircon_dart_handle_is_valid(zircon_dart_handle_t* handle); +ZIRCON_FFI_EXPORT int32_t zircon_dart_handle_is_valid( + zircon_dart_handle_t* handle); // Closes the handle, but doesn't release any ffi-associated memory. Returns 1 // on success. -ZIRCON_FFI_EXPORT int32_t -zircon_dart_handle_close(zircon_dart_handle_t* handle); +ZIRCON_FFI_EXPORT int32_t zircon_dart_handle_close( + zircon_dart_handle_t* handle); // Closes the zircon handle if valid and frees the memory. ZIRCON_FFI_EXPORT void zircon_dart_handle_free(zircon_dart_handle_t* handle); diff --git a/shell/platform/fuchsia/flutter/focus_delegate_unittests.cc b/shell/platform/fuchsia/flutter/focus_delegate_unittests.cc index 5ded2a6d8efa5..f8e9bda254dc8 100644 --- a/shell/platform/fuchsia/flutter/focus_delegate_unittests.cc +++ b/shell/platform/fuchsia/flutter/focus_delegate_unittests.cc @@ -143,8 +143,7 @@ TEST_F(FocusDelegateTest, RequestFocusTest) { // Create the platform message request. std::ostringstream message; - message << "{" - << " \"method\":\"View.focus.request\"," + message << "{" << " \"method\":\"View.focus.request\"," << " \"args\": {" << " \"viewRef\":" << view_ref.reference.get() << " }" << "}"; @@ -176,8 +175,7 @@ TEST_F(FocusDelegateTest, RequestFocusFailTest) { focuser_->fail_request_focus(); // Create the platform message request. std::ostringstream message; - message << "{" - << " \"method\":\"View.focus.request\"," + message << "{" << " \"method\":\"View.focus.request\"," << " \"args\": {" << " \"viewRef\":" << view_ref.reference.get() << " }" << "}"; diff --git a/shell/platform/fuchsia/flutter/platform_view.cc b/shell/platform/fuchsia/flutter/platform_view.cc index 0074361fafda8..8e78c4ab94c1a 100644 --- a/shell/platform/fuchsia/flutter/platform_view.cc +++ b/shell/platform/fuchsia/flutter/platform_view.cc @@ -381,15 +381,12 @@ void PlatformView::OnChildViewStatus( FML_DCHECK(child_view_info_.count(content_id) == 1); std::ostringstream out; - out << "{" - << "\"method\":\"View.viewStateChanged\"," - << "\"args\":{" + out << "{" << "\"method\":\"View.viewStateChanged\"," << "\"args\":{" << " \"viewId\":" << child_view_info_.at(content_id).view_id << "," // ViewId << " \"is_rendering\":true," // IsViewRendering << " \"state\":true" // IsViewRendering - << " }" - << "}"; + << " }" << "}"; auto call = out.str(); std::unique_ptr message = @@ -518,9 +515,7 @@ void PlatformView::OnDisposeView(int64_t view_id_raw) { void PlatformView::OnChildViewConnected(uint64_t content_id) { FML_CHECK(child_view_info_.count(content_id) == 1); std::ostringstream out; - out << "{" - << "\"method\":\"View.viewConnected\"," - << "\"args\":{" + out << "{" << "\"method\":\"View.viewConnected\"," << "\"args\":{" << " \"viewId\":" << child_view_info_.at(content_id).view_id << " }" << "}"; auto call = out.str(); @@ -535,9 +530,7 @@ void PlatformView::OnChildViewConnected(uint64_t content_id) { void PlatformView::OnChildViewDisconnected(uint64_t content_id) { FML_CHECK(child_view_info_.count(content_id) == 1); std::ostringstream out; - out << "{" - << "\"method\":\"View.viewDisconnected\"," - << "\"args\":{" + out << "{" << "\"method\":\"View.viewDisconnected\"," << "\"args\":{" << " \"viewId\":" << child_view_info_.at(content_id).view_id << " }" << "}"; auto call = out.str(); diff --git a/shell/platform/fuchsia/flutter/pointer_injector_delegate_unittest.cc b/shell/platform/fuchsia/flutter/pointer_injector_delegate_unittest.cc index eedd2b49d17db..dcf0fd41c6b6d 100644 --- a/shell/platform/fuchsia/flutter/pointer_injector_delegate_unittest.cc +++ b/shell/platform/fuchsia/flutter/pointer_injector_delegate_unittest.cc @@ -108,11 +108,9 @@ class PlatformMessageBuilder { rapidjson::Value Build() { std::ostringstream message; - message << "{" - << " \"method\":\"" + message << "{" << " \"method\":\"" << PointerInjectorDelegate::kPointerInjectorMethodPrefix << "\"," - << " \"args\": {" - << " \"viewId\":" << view_id_ << "," + << " \"args\": {" << " \"viewId\":" << view_id_ << "," << " \"x\":" << pointer_x_ << "," << " \"y\":" << pointer_y_ << "," << " \"phase\":" << phase_ << "," @@ -121,8 +119,7 @@ class PlatformMessageBuilder { << " \"viewRef\":" << view_ref_.reference.get() << "," << " \"logicalWidth\":" << width_ << "," << " \"logicalHeight\":" << height_ << "," - << " \"timestamp\":" << timestamp_ << " }" - << "}"; + << " \"timestamp\":" << timestamp_ << " }" << "}"; return ParsePlatformMessage(message.str()); } diff --git a/shell/platform/fuchsia/flutter/tests/integration/utils/screenshot.cc b/shell/platform/fuchsia/flutter/tests/integration/utils/screenshot.cc index 6e25e5815fe93..9f7e33764a7ee 100644 --- a/shell/platform/fuchsia/flutter/tests/integration/utils/screenshot.cc +++ b/shell/platform/fuchsia/flutter/tests/integration/utils/screenshot.cc @@ -44,8 +44,7 @@ Screenshot::Screenshot(const zx::vmo& screenshot_vmo, } std::ostream& operator<<(std::ostream& stream, const Pixel& pixel) { - return stream << "{Pixel:" - << " r:" << static_cast(pixel.red) + return stream << "{Pixel:" << " r:" << static_cast(pixel.red) << " g:" << static_cast(pixel.green) << " b:" << static_cast(pixel.blue) << " a:" << static_cast(pixel.alpha) << "}"; diff --git a/shell/platform/fuchsia/flutter/tests/platform_view_unittest.cc b/shell/platform/fuchsia/flutter/tests/platform_view_unittest.cc index a162a8dac5f4c..911c618d66301 100644 --- a/shell/platform/fuchsia/flutter/tests/platform_view_unittest.cc +++ b/shell/platform/fuchsia/flutter/tests/platform_view_unittest.cc @@ -810,14 +810,10 @@ TEST_F(PlatformViewTests, CreateViewTest) { // JSON for the message to be passed into the PlatformView. std::ostringstream create_view_message; - create_view_message << "{" - << " \"method\":\"View.create\"," - << " \"args\":{" - << " \"viewId\":" << view_id << "," - << " \"hitTestable\":true," - << " \"focusable\":true" - << " }" - << "}"; + create_view_message << "{" << " \"method\":\"View.create\"," + << " \"args\":{" << " \"viewId\":" << view_id << "," + << " \"hitTestable\":true," << " \"focusable\":true" + << " }" << "}"; std::string create_view_call = create_view_message.str(); std::unique_ptr message = @@ -835,11 +831,9 @@ TEST_F(PlatformViewTests, CreateViewTest) { // Platform view forwards the 'View.viewConnected' message on the // 'flutter/platform_views' channel when a view gets created. std::ostringstream view_connected_expected_out; - view_connected_expected_out << "{" - << "\"method\":\"View.viewConnected\"," - << "\"args\":{" - << " \"viewId\":" << view_id << " }" - << "}"; + view_connected_expected_out << "{" << "\"method\":\"View.viewConnected\"," + << "\"args\":{" << " \"viewId\":" << view_id + << " }" << "}"; ASSERT_NE(delegate.message(), nullptr); EXPECT_EQ(view_connected_expected_out.str(), @@ -1009,14 +1003,10 @@ TEST_F(PlatformViewTests, DestroyViewTest) { EXPECT_TRUE(base_view); std::ostringstream create_message; - create_message << "{" - << " \"method\":\"View.create\"," - << " \"args\": {" - << " \"viewId\":" << view_id << "," + create_message << "{" << " \"method\":\"View.create\"," + << " \"args\": {" << " \"viewId\":" << view_id << "," << " \"hitTestable\":true," - << " \"focusable\":true" - << " }" - << "}"; + << " \"focusable\":true" << " }" << "}"; auto create_response = FakePlatformMessageResponse::Create(); base_view->HandlePlatformMessage(create_response->WithMessage( @@ -1027,11 +1017,9 @@ TEST_F(PlatformViewTests, DestroyViewTest) { // JSON for the message to be passed into the PlatformView. std::ostringstream dispose_message; - dispose_message << "{" - << " \"method\":\"View.dispose\"," - << " \"args\": {" - << " \"viewId\":" << view_id << " }" - << "}"; + dispose_message << "{" << " \"method\":\"View.dispose\"," + << " \"args\": {" << " \"viewId\":" << view_id + << " }" << "}"; std::string dispose_view_call = dispose_message.str(); std::unique_ptr message = @@ -1049,11 +1037,9 @@ TEST_F(PlatformViewTests, DestroyViewTest) { // Platform view forwards the 'View.viewDisconnected' message on the // 'flutter/platform_views' channel when a view gets destroyed. std::ostringstream view_disconnected_expected_out; - view_disconnected_expected_out << "{" - << "\"method\":\"View.viewDisconnected\"," - << "\"args\":{" - << " \"viewId\":" << view_id << " }" - << "}"; + view_disconnected_expected_out + << "{" << "\"method\":\"View.viewDisconnected\"," << "\"args\":{" + << " \"viewId\":" << view_id << " }" << "}"; ASSERT_NE(delegate.message(), nullptr); EXPECT_EQ(view_disconnected_expected_out.str(), @@ -1162,14 +1148,10 @@ TEST_F(PlatformViewTests, RequestFocusTest) { uint64_t view_id = 42; std::ostringstream create_message; - create_message << "{" - << " \"method\":\"View.create\"," - << " \"args\": {" - << " \"viewId\":" << view_id << "," + create_message << "{" << " \"method\":\"View.create\"," + << " \"args\": {" << " \"viewId\":" << view_id << "," << " \"hitTestable\":true," - << " \"focusable\":true" - << " }" - << "}"; + << " \"focusable\":true" << " }" << "}"; // Dispatch the plaform message request. auto create_response = FakePlatformMessageResponse::Create(); @@ -1180,11 +1162,9 @@ TEST_F(PlatformViewTests, RequestFocusTest) { // JSON for the message to be passed into the PlatformView. std::ostringstream focus_message; - focus_message << "{" - << " \"method\":\"View.focus.requestById\"," - << " \"args\": {" - << " \"viewId\":" << view_id << " }" - << "}"; + focus_message << "{" << " \"method\":\"View.focus.requestById\"," + << " \"args\": {" << " \"viewId\":" << view_id + << " }" << "}"; // Dispatch the plaform message request. auto focus_response = FakePlatformMessageResponse::Create(); @@ -1235,11 +1215,9 @@ TEST_F(PlatformViewTests, RequestFocusNeverCreatedTest) { uint64_t view_id = 42; std::ostringstream focus_message; - focus_message << "{" - << " \"method\":\"View.focus.requestById\"," - << " \"args\": {" - << " \"viewId\":" << view_id << " }" - << "}"; + focus_message << "{" << " \"method\":\"View.focus.requestById\"," + << " \"args\": {" << " \"viewId\":" << view_id + << " }" << "}"; // Dispatch the plaform message request. auto focus_response = FakePlatformMessageResponse::Create(); @@ -1301,14 +1279,10 @@ TEST_F(PlatformViewTests, RequestFocusDisposedTest) { // Create a new view std::ostringstream create_message; - create_message << "{" - << " \"method\":\"View.create\"," - << " \"args\": {" - << " \"viewId\":" << view_id << "," + create_message << "{" << " \"method\":\"View.create\"," + << " \"args\": {" << " \"viewId\":" << view_id << "," << " \"hitTestable\":true," - << " \"focusable\":true" - << " }" - << "}"; + << " \"focusable\":true" << " }" << "}"; auto create_response = FakePlatformMessageResponse::Create(); base_view->HandlePlatformMessage(create_response->WithMessage( @@ -1318,11 +1292,9 @@ TEST_F(PlatformViewTests, RequestFocusDisposedTest) { EXPECT_FALSE(destroy_view_called); // Dispose of the view std::ostringstream dispose_message; - dispose_message << "{" - << " \"method\":\"View.dispose\"," - << " \"args\": {" - << " \"viewId\":" << view_id << " }" - << "}"; + dispose_message << "{" << " \"method\":\"View.dispose\"," + << " \"args\": {" << " \"viewId\":" << view_id + << " }" << "}"; auto dispose_response = FakePlatformMessageResponse::Create(); base_view->HandlePlatformMessage(dispose_response->WithMessage( @@ -1332,11 +1304,9 @@ TEST_F(PlatformViewTests, RequestFocusDisposedTest) { // Request focus on newly disposed view std::ostringstream focus_message; - focus_message << "{" - << " \"method\":\"View.focus.requestById\"," - << " \"args\": {" - << " \"viewId\":" << view_id << " }" - << "}"; + focus_message << "{" << " \"method\":\"View.focus.requestById\"," + << " \"args\": {" << " \"viewId\":" << view_id + << " }" << "}"; auto focus_response = FakePlatformMessageResponse::Create(); base_view->HandlePlatformMessage(focus_response->WithMessage( @@ -1475,13 +1445,11 @@ TEST_F(PlatformViewTests, OnShaderWarmup) { // Create initial view for testing. std::ostringstream warmup_shaders_ostream; - warmup_shaders_ostream << "{" - << " \"method\":\"WarmupSkps\"," + warmup_shaders_ostream << "{" << " \"method\":\"WarmupSkps\"," << " \"args\":{" << " \"shaders\":" << shaders_array_string << "," << " \"width\":" << width << "," - << " \"height\":" << height << " }" - << "}\n"; + << " \"height\":" << height << " }" << "}\n"; std::string warmup_shaders_string = warmup_shaders_ostream.str(); fml::RefPtr response( diff --git a/shell/platform/glfw/public/flutter_glfw.h b/shell/platform/glfw/public/flutter_glfw.h index 30d3261e8b2a6..7dbb8b9395ff0 100644 --- a/shell/platform/glfw/public/flutter_glfw.h +++ b/shell/platform/glfw/public/flutter_glfw.h @@ -120,15 +120,15 @@ FLUTTER_EXPORT bool FlutterDesktopRunWindowEventLoopWithTimeout( // FlutterDesktopWindowControllerRef. // // Its lifetime is the same as the |controller|'s. -FLUTTER_EXPORT FlutterDesktopWindowRef -FlutterDesktopGetWindow(FlutterDesktopWindowControllerRef controller); +FLUTTER_EXPORT FlutterDesktopWindowRef FlutterDesktopGetWindow( + FlutterDesktopWindowControllerRef controller); // Returns the handle for the engine running in // FlutterDesktopWindowControllerRef. // // Its lifetime is the same as the |controller|'s. -FLUTTER_EXPORT FlutterDesktopEngineRef -FlutterDesktopGetEngine(FlutterDesktopWindowControllerRef controller); +FLUTTER_EXPORT FlutterDesktopEngineRef FlutterDesktopGetEngine( + FlutterDesktopWindowControllerRef controller); // Returns the plugin registrar handle for the plugin with the given name. // @@ -201,8 +201,8 @@ FLUTTER_EXPORT void FlutterDesktopWindowSetSizeLimits( // Runs an instance of a headless Flutter engine. // // Returns a null pointer in the event of an error. -FLUTTER_EXPORT FlutterDesktopEngineRef -FlutterDesktopRunEngine(const FlutterDesktopEngineProperties& properties); +FLUTTER_EXPORT FlutterDesktopEngineRef FlutterDesktopRunEngine( + const FlutterDesktopEngineProperties& properties); // Waits for and processes the next event before |timeout_milliseconds|. // diff --git a/shell/platform/.clang-tidy b/shell/platform/linux/.clang-tidy similarity index 62% rename from shell/platform/.clang-tidy rename to shell/platform/linux/.clang-tidy index c4755ca16c8a1..42d8632c23f39 100644 --- a/shell/platform/.clang-tidy +++ b/shell/platform/linux/.clang-tidy @@ -1,6 +1,5 @@ InheritParentConfig: true -# EnumCastOutOfRange warns about some common usages of GTK macros and some -# Flutter embedder API enums that are used to create combinations of bit fields +# EnumCastOutOfRange warns about some common usages of GTK macros Checks: >- -clang-analyzer-optin.core.EnumCastOutOfRange diff --git a/shell/platform/linux/fl_event_channel.cc b/shell/platform/linux/fl_event_channel.cc index 418acd89bfbbb..7e6e28523a0ad 100644 --- a/shell/platform/linux/fl_event_channel.cc +++ b/shell/platform/linux/fl_event_channel.cc @@ -234,10 +234,10 @@ G_MODULE_EXPORT gboolean fl_event_channel_send_error(FlEventChannel* self, return TRUE; } -G_MODULE_EXPORT gboolean -fl_event_channel_send_end_of_stream(FlEventChannel* self, - GCancellable* cancellable, - GError** error) { +G_MODULE_EXPORT gboolean fl_event_channel_send_end_of_stream( + FlEventChannel* self, + GCancellable* cancellable, + GError** error) { g_return_val_if_fail(FL_IS_EVENT_CHANNEL(self), FALSE); fl_binary_messenger_send_on_channel(self->messenger, self->name, nullptr, cancellable, nullptr, nullptr); diff --git a/shell/platform/linux/fl_method_call.cc b/shell/platform/linux/fl_method_call.cc index 2bf9c28e7fa07..35fcd24c57f45 100644 --- a/shell/platform/linux/fl_method_call.cc +++ b/shell/platform/linux/fl_method_call.cc @@ -122,8 +122,9 @@ G_MODULE_EXPORT gboolean fl_method_call_respond_error(FlMethodCall* self, response, error); } -G_MODULE_EXPORT gboolean -fl_method_call_respond_not_implemented(FlMethodCall* self, GError** error) { +G_MODULE_EXPORT gboolean fl_method_call_respond_not_implemented( + FlMethodCall* self, + GError** error) { g_return_val_if_fail(FL_IS_METHOD_CALL(self), FALSE); g_autoptr(FlMethodResponse) response = diff --git a/shell/platform/linux/fl_standard_message_codec.cc b/shell/platform/linux/fl_standard_message_codec.cc index 652537dac1665..9ae6aafb37062 100644 --- a/shell/platform/linux/fl_standard_message_codec.cc +++ b/shell/platform/linux/fl_standard_message_codec.cc @@ -654,12 +654,12 @@ G_MODULE_EXPORT void fl_standard_message_codec_write_size( } } -G_MODULE_EXPORT gboolean -fl_standard_message_codec_read_size(FlStandardMessageCodec* codec, - GBytes* buffer, - size_t* offset, - uint32_t* value, - GError** error) { +G_MODULE_EXPORT gboolean fl_standard_message_codec_read_size( + FlStandardMessageCodec* codec, + GBytes* buffer, + size_t* offset, + uint32_t* value, + GError** error) { uint8_t value8; if (!read_uint8(buffer, offset, &value8, error)) { return FALSE; @@ -682,11 +682,11 @@ fl_standard_message_codec_read_size(FlStandardMessageCodec* codec, return TRUE; } -G_MODULE_EXPORT gboolean -fl_standard_message_codec_write_value(FlStandardMessageCodec* self, - GByteArray* buffer, - FlValue* value, - GError** error) { +G_MODULE_EXPORT gboolean fl_standard_message_codec_write_value( + FlStandardMessageCodec* self, + GByteArray* buffer, + FlValue* value, + GError** error) { return FL_STANDARD_MESSAGE_CODEC_GET_CLASS(self)->write_value(self, buffer, value, error); } diff --git a/shell/platform/linux/fl_texture_registrar.cc b/shell/platform/linux/fl_texture_registrar.cc index 0be10cb63b98f..7ef0f85a04fd4 100644 --- a/shell/platform/linux/fl_texture_registrar.cc +++ b/shell/platform/linux/fl_texture_registrar.cc @@ -179,9 +179,9 @@ static void fl_texture_registrar_impl_init(FlTextureRegistrarImpl* self) { g_mutex_init(&self->textures_mutex); } -G_MODULE_EXPORT gboolean -fl_texture_registrar_register_texture(FlTextureRegistrar* self, - FlTexture* texture) { +G_MODULE_EXPORT gboolean fl_texture_registrar_register_texture( + FlTextureRegistrar* self, + FlTexture* texture) { g_return_val_if_fail(FL_IS_TEXTURE_REGISTRAR(self), FALSE); g_return_val_if_fail(FL_IS_TEXTURE(texture), FALSE); @@ -195,18 +195,18 @@ FlTexture* fl_texture_registrar_lookup_texture(FlTextureRegistrar* self, return FL_TEXTURE_REGISTRAR_GET_IFACE(self)->lookup_texture(self, texture_id); } -G_MODULE_EXPORT gboolean -fl_texture_registrar_mark_texture_frame_available(FlTextureRegistrar* self, - FlTexture* texture) { +G_MODULE_EXPORT gboolean fl_texture_registrar_mark_texture_frame_available( + FlTextureRegistrar* self, + FlTexture* texture) { g_return_val_if_fail(FL_IS_TEXTURE_REGISTRAR(self), FALSE); return FL_TEXTURE_REGISTRAR_GET_IFACE(self)->mark_texture_frame_available( self, texture); } -G_MODULE_EXPORT gboolean -fl_texture_registrar_unregister_texture(FlTextureRegistrar* self, - FlTexture* texture) { +G_MODULE_EXPORT gboolean fl_texture_registrar_unregister_texture( + FlTextureRegistrar* self, + FlTexture* texture) { g_return_val_if_fail(FL_IS_TEXTURE_REGISTRAR(self), FALSE); return FL_TEXTURE_REGISTRAR_GET_IFACE(self)->unregister_texture(self, diff --git a/shell/platform/windows/client_wrapper/flutter_view_controller_unittests.cc b/shell/platform/windows/client_wrapper/flutter_view_controller_unittests.cc index e64108e132206..837c2e13e583d 100644 --- a/shell/platform/windows/client_wrapper/flutter_view_controller_unittests.cc +++ b/shell/platform/windows/client_wrapper/flutter_view_controller_unittests.cc @@ -63,9 +63,7 @@ TEST(FlutterViewControllerTest, CreateDestroy) { testing::ScopedStubFlutterWindowsApi scoped_api_stub( std::make_unique()); auto test_api = static_cast(scoped_api_stub.stub()); - { - FlutterViewController controller(100, 100, project); - } + { FlutterViewController controller(100, 100, project); } EXPECT_TRUE(test_api->view_controller_destroyed()); // Per the C API, once a view controller has taken ownership of an engine // the engine destruction method should not be called. diff --git a/shell/platform/windows/direct_manipulation.cc b/shell/platform/windows/direct_manipulation.cc index f65e0e1074f7f..81c2fc01b789c 100644 --- a/shell/platform/windows/direct_manipulation.cc +++ b/shell/platform/windows/direct_manipulation.cc @@ -27,7 +27,7 @@ namespace flutter { int32_t DirectManipulationEventHandler::GetDeviceId() { - return (int32_t)reinterpret_cast(this); + return (int32_t) reinterpret_cast(this); } STDMETHODIMP DirectManipulationEventHandler::QueryInterface(REFIID iid, diff --git a/shell/platform/windows/direct_manipulation.h b/shell/platform/windows/direct_manipulation.h index 4d7046ab8ddd1..22efae4ab3c5a 100644 --- a/shell/platform/windows/direct_manipulation.h +++ b/shell/platform/windows/direct_manipulation.h @@ -86,24 +86,24 @@ class DirectManipulationEventHandler ULONG STDMETHODCALLTYPE Release() override; // |IDirectManipulationViewportEventHandler| - HRESULT STDMETHODCALLTYPE - OnViewportStatusChanged(IDirectManipulationViewport* viewport, - DIRECTMANIPULATION_STATUS current, - DIRECTMANIPULATION_STATUS previous) override; + HRESULT STDMETHODCALLTYPE OnViewportStatusChanged( + IDirectManipulationViewport* viewport, + DIRECTMANIPULATION_STATUS current, + DIRECTMANIPULATION_STATUS previous) override; // |IDirectManipulationViewportEventHandler| - HRESULT STDMETHODCALLTYPE - OnViewportUpdated(IDirectManipulationViewport* viewport) override; + HRESULT STDMETHODCALLTYPE OnViewportUpdated( + IDirectManipulationViewport* viewport) override; // |IDirectManipulationViewportEventHandler| - HRESULT STDMETHODCALLTYPE - OnContentUpdated(IDirectManipulationViewport* viewport, - IDirectManipulationContent* content) override; + HRESULT STDMETHODCALLTYPE OnContentUpdated( + IDirectManipulationViewport* viewport, + IDirectManipulationContent* content) override; // |IDirectManipulationInteractionEventHandler| - HRESULT STDMETHODCALLTYPE - OnInteraction(IDirectManipulationViewport2* viewport, - DIRECTMANIPULATION_INTERACTION_TYPE interaction) override; + HRESULT STDMETHODCALLTYPE OnInteraction( + IDirectManipulationViewport2* viewport, + DIRECTMANIPULATION_INTERACTION_TYPE interaction) override; private: struct GestureData { diff --git a/shell/platform/windows/direct_manipulation_unittests.cc b/shell/platform/windows/direct_manipulation_unittests.cc index e3047c019ea1c..323125141edb1 100644 --- a/shell/platform/windows/direct_manipulation_unittests.cc +++ b/shell/platform/windows/direct_manipulation_unittests.cc @@ -151,7 +151,7 @@ TEST(DirectManipulationTest, TestGesture) { owner->SetBindingHandlerDelegate(&delegate); auto handler = fml::MakeRefCounted(owner.get()); - int32_t device_id = (int32_t)reinterpret_cast(handler.get()); + int32_t device_id = (int32_t) reinterpret_cast(handler.get()); EXPECT_CALL(viewport, GetPrimaryContent(_, _)) .WillOnce(::testing::Invoke([&content](REFIID in, void** out) { *out = &content; @@ -213,7 +213,7 @@ TEST(DirectManipulationTest, TestRounding) { owner->SetBindingHandlerDelegate(&delegate); auto handler = fml::MakeRefCounted(owner.get()); - int32_t device_id = (int32_t)reinterpret_cast(handler.get()); + int32_t device_id = (int32_t) reinterpret_cast(handler.get()); EXPECT_CALL(viewport, GetPrimaryContent(_, _)) .WillOnce(::testing::Invoke([&content](REFIID in, void** out) { *out = &content; @@ -294,7 +294,7 @@ TEST(DirectManipulationTest, TestInertiaCancelSentForUserCancel) { owner->SetBindingHandlerDelegate(&delegate); auto handler = fml::MakeRefCounted(owner.get()); - int32_t device_id = (int32_t)reinterpret_cast(handler.get()); + int32_t device_id = (int32_t) reinterpret_cast(handler.get()); // No need to mock the actual gesture, just start at the end. EXPECT_CALL(viewport, GetViewportRect(_)) .WillOnce(::testing::Invoke([DISPLAY_WIDTH, DISPLAY_HEIGHT](RECT* rect) { @@ -347,7 +347,7 @@ TEST(DirectManipulationTest, TestInertiaCamcelNotSentAtInertiaEnd) { owner->SetBindingHandlerDelegate(&delegate); auto handler = fml::MakeRefCounted(owner.get()); - int32_t device_id = (int32_t)reinterpret_cast(handler.get()); + int32_t device_id = (int32_t) reinterpret_cast(handler.get()); // No need to mock the actual gesture, just start at the end. EXPECT_CALL(viewport, GetViewportRect(_)) .WillOnce(::testing::Invoke([DISPLAY_WIDTH, DISPLAY_HEIGHT](RECT* rect) { @@ -404,7 +404,7 @@ TEST(DirectManipulationTest, TestGestureWithInitialData) { owner->SetBindingHandlerDelegate(&delegate); auto handler = fml::MakeRefCounted(owner.get()); - int32_t device_id = (int32_t)reinterpret_cast(handler.get()); + int32_t device_id = (int32_t) reinterpret_cast(handler.get()); EXPECT_CALL(viewport, GetPrimaryContent(_, _)) .WillOnce(::testing::Invoke([&content](REFIID in, void** out) { *out = &content; diff --git a/shell/platform/windows/keyboard_unittests.cc b/shell/platform/windows/keyboard_unittests.cc index 686df97599a37..b4495b9bd085f 100644 --- a/shell/platform/windows/keyboard_unittests.cc +++ b/shell/platform/windows/keyboard_unittests.cc @@ -134,7 +134,7 @@ struct KeyStateChange { // // See `IsKeyDownAltRight` for explaination for foged events. struct ExpectForgedMessage { - explicit ExpectForgedMessage(Win32Message message) : message(message) {}; + explicit ExpectForgedMessage(Win32Message message) : message(message){}; Win32Message message; }; diff --git a/shell/platform/windows/platform_handler.h b/shell/platform/windows/platform_handler.h index 09ba011176545..8088b16a87477 100644 --- a/shell/platform/windows/platform_handler.h +++ b/shell/platform/windows/platform_handler.h @@ -130,7 +130,7 @@ class PlatformHandler { // PlatformHandler. class ScopedClipboardInterface { public: - virtual ~ScopedClipboardInterface() {}; + virtual ~ScopedClipboardInterface(){}; // Attempts to open the clipboard for the given window, returning the error // code in the case of failure and 0 otherwise. diff --git a/shell/platform/windows/public/flutter_windows.h b/shell/platform/windows/public/flutter_windows.h index cca1783db8516..80d78766f9383 100644 --- a/shell/platform/windows/public/flutter_windows.h +++ b/shell/platform/windows/public/flutter_windows.h @@ -111,8 +111,8 @@ FLUTTER_EXPORT FlutterDesktopEngineRef FlutterDesktopViewControllerGetEngine( FlutterDesktopViewControllerRef controller); // Returns the view managed by the given controller. -FLUTTER_EXPORT FlutterDesktopViewRef -FlutterDesktopViewControllerGetView(FlutterDesktopViewControllerRef controller); +FLUTTER_EXPORT FlutterDesktopViewRef FlutterDesktopViewControllerGetView( + FlutterDesktopViewControllerRef controller); // Requests new frame from the engine and repaints the view. FLUTTER_EXPORT void FlutterDesktopViewControllerForceRedraw( @@ -174,8 +174,8 @@ FLUTTER_EXPORT bool FlutterDesktopEngineRun(FlutterDesktopEngineRef engine, // This should be called on every run of the application-level runloop, and // a wait for native events in the runloop should never be longer than the // last return value from this function. -FLUTTER_EXPORT uint64_t -FlutterDesktopEngineProcessMessages(FlutterDesktopEngineRef engine); +FLUTTER_EXPORT uint64_t FlutterDesktopEngineProcessMessages( + FlutterDesktopEngineRef engine); FLUTTER_EXPORT void FlutterDesktopEngineReloadSystemFonts( FlutterDesktopEngineRef engine); @@ -194,8 +194,8 @@ FlutterDesktopEngineGetPluginRegistrar(FlutterDesktopEngineRef engine, // // Callers should use |FlutterDesktopMessengerAddRef| if the returned pointer // will potentially outlive 'engine', such as when passing it to another thread. -FLUTTER_EXPORT FlutterDesktopMessengerRef -FlutterDesktopEngineGetMessenger(FlutterDesktopEngineRef engine); +FLUTTER_EXPORT FlutterDesktopMessengerRef FlutterDesktopEngineGetMessenger( + FlutterDesktopEngineRef engine); // Returns the texture registrar associated with the engine. FLUTTER_EXPORT FlutterDesktopTextureRegistrarRef diff --git a/shell/platform/windows/testing/mock_direct_manipulation.h b/shell/platform/windows/testing/mock_direct_manipulation.h index 523c809329066..fc984cbf34fc3 100644 --- a/shell/platform/windows/testing/mock_direct_manipulation.h +++ b/shell/platform/windows/testing/mock_direct_manipulation.h @@ -16,7 +16,7 @@ namespace testing { class MockDirectManipulationOwner : public DirectManipulationOwner { public: explicit MockDirectManipulationOwner(FlutterWindow* window) - : DirectManipulationOwner(window) {}; + : DirectManipulationOwner(window){}; virtual ~MockDirectManipulationOwner() = default; MOCK_METHOD(void, SetContact, (UINT contact_id), (override)); diff --git a/shell/platform/windows/testing/mock_text_input_manager.cc b/shell/platform/windows/testing/mock_text_input_manager.cc index 141912aec3b39..c84a9d7bfc6ac 100644 --- a/shell/platform/windows/testing/mock_text_input_manager.cc +++ b/shell/platform/windows/testing/mock_text_input_manager.cc @@ -7,7 +7,7 @@ namespace flutter { namespace testing { -MockTextInputManager::MockTextInputManager() : TextInputManager() {}; +MockTextInputManager::MockTextInputManager() : TextInputManager(){}; MockTextInputManager::~MockTextInputManager() = default; diff --git a/shell/platform/windows/testing/mock_window.cc b/shell/platform/windows/testing/mock_window.cc index cde590f6e5342..d6f8db8988772 100644 --- a/shell/platform/windows/testing/mock_window.cc +++ b/shell/platform/windows/testing/mock_window.cc @@ -6,13 +6,13 @@ namespace flutter { namespace testing { -MockWindow::MockWindow() : FlutterWindow(1, 1) {}; +MockWindow::MockWindow() : FlutterWindow(1, 1){}; MockWindow::MockWindow(std::unique_ptr window_proc_table, std::unique_ptr text_input_manager) : FlutterWindow(1, 1, std::move(window_proc_table), - std::move(text_input_manager)) {}; + std::move(text_input_manager)){}; MockWindow::~MockWindow() = default; diff --git a/shell/platform/windows/testing/mock_window_binding_handler.cc b/shell/platform/windows/testing/mock_window_binding_handler.cc index cd64359d3dc9c..c0449152beb72 100644 --- a/shell/platform/windows/testing/mock_window_binding_handler.cc +++ b/shell/platform/windows/testing/mock_window_binding_handler.cc @@ -7,8 +7,7 @@ namespace flutter { namespace testing { -MockWindowBindingHandler::MockWindowBindingHandler() - : WindowBindingHandler() {}; +MockWindowBindingHandler::MockWindowBindingHandler() : WindowBindingHandler(){}; MockWindowBindingHandler::~MockWindowBindingHandler() = default; diff --git a/testing/test_vulkan_surface.cc b/testing/test_vulkan_surface.cc index 1cde918d2a489..f748ce794cc80 100644 --- a/testing/test_vulkan_surface.cc +++ b/testing/test_vulkan_surface.cc @@ -20,7 +20,7 @@ namespace flutter { namespace testing { TestVulkanSurface::TestVulkanSurface(TestVulkanImage&& image) - : image_(std::move(image)) {}; + : image_(std::move(image)){}; std::unique_ptr TestVulkanSurface::Create( const TestVulkanContext& context, diff --git a/vulkan/procs/vulkan_proc_table.cc b/vulkan/procs/vulkan_proc_table.cc index 8431d64b60894..75a0c00b3984b 100644 --- a/vulkan/procs/vulkan_proc_table.cc +++ b/vulkan/procs/vulkan_proc_table.cc @@ -21,7 +21,7 @@ namespace vulkan { -VulkanProcTable::VulkanProcTable() : VulkanProcTable("libvulkan.so") {}; +VulkanProcTable::VulkanProcTable() : VulkanProcTable("libvulkan.so"){}; VulkanProcTable::VulkanProcTable(const char* so_path) : handle_(nullptr), acquired_mandatory_proc_addresses_(false) {