diff --git a/DEPS b/DEPS index ff7283174c18f..52786c84207a0 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:725656bdd885483c39f482a01ea25d67acf39c46', + 'clang_version': 'git_revision:145176dc0c93566ce4aef721044d49ab8ba50f87', 'reclient_version': 'git_revision:29a9d3cb597b6a7d67fa3e9aa8a7cab1c81232ee', @@ -943,7 +943,7 @@ deps = { 'packages': [ { 'package': 'flutter_internal/rbe/reclient_cfgs', - 'version': 'XIomtC8MFuQrF9qI5xYcFfcfKXZTbcY6nL6NgF-pSRIC', + 'version': '_crQLRWl_tm9uDdPtihkx_9vvdMe-OYBdQ0_ih51y7QC', } ], 'condition': 'use_rbe', diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index 37cc6dec12598..d3b20a4a90ce7 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -271,6 +271,7 @@ ../../../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 @@ -366,7 +367,6 @@ ../../../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 71ab99c5654b8..f497c677c7be6 100644 --- a/common/graphics/gl_context_switch.cc +++ b/common/graphics/gl_context_switch.cc @@ -14,14 +14,15 @@ 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 a149e75acdd38..2f8884f7d99b7 100644 --- a/display_list/display_list_unittests.cc +++ b/display_list/display_list_unittests.cc @@ -2314,7 +2314,9 @@ 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 bad115d06b979..fa4f221094203 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 c7505c0c93ec1..b6d6fc9e2542e 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 ffdbfee2043f2..978bb990a69cf 100644 --- a/display_list/testing/dl_test_snippets.cc +++ b/display_list/testing/dl_test_snippets.cc @@ -517,75 +517,30 @@ 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 63e41dd1fd4e2..59fa6dd5d8c07 100644 --- a/flow/layers/performance_overlay_layer.cc +++ b/flow/layers/performance_overlay_layer.cc @@ -95,7 +95,8 @@ 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 82f1e87fd3bad..7537302d80fe7 100644 --- a/flow/layers/performance_overlay_layer_unittests.cc +++ b/flow/layers/performance_overlay_layer_unittests.cc @@ -38,8 +38,9 @@ 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(); } @@ -117,9 +118,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 8a98ae882e23c..bdaed3fcc4c62 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 5320c49153b4d..556776ef48cd0 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 d995ec993cfb9..37adf1dffbb51 100644 --- a/fml/memory/weak_ptr_unittest.cc +++ b/fml/memory/weak_ptr_unittest.cc @@ -111,7 +111,9 @@ 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 8b10036f0b1b8..35639a73f1ec4 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 58afead588383..5c7599630afc5 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 9e5c0d9318417..fa64b9052a3d4 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 25c405b1f0cb9..057d348ac7244 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 1e819ce466856..6d966b44f594f 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 54f6900a0f9a2..68af3658fef13 100644 --- a/impeller/geometry/path_unittests.cc +++ b/impeller/geometry/path_unittests.cc @@ -608,29 +608,17 @@ 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) { // @@ -681,9 +669,7 @@ 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( @@ -699,10 +685,8 @@ 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) { @@ -723,11 +707,8 @@ 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 d55136d5cef80..1e810b2e26b2f 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 d68220b10022c..3dcb9be9b8a7a 100644 --- a/impeller/golden_tests/golden_digest.cc +++ b/impeller/golden_tests/golden_digest.cc @@ -67,7 +67,8 @@ 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 8aeda6d733a1a..880491541660e 100644 --- a/impeller/renderer/backend/gles/proc_table_gles.cc +++ b/impeller/renderer/backend/gles/proc_table_gles.cc @@ -84,7 +84,8 @@ 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 44587ae96a88d..cd397c4f1a58c 100644 --- a/impeller/renderer/backend/gles/proc_table_gles.h +++ b/impeller/renderer/backend/gles/proc_table_gles.h @@ -37,10 +37,12 @@ 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 392c054e642f2..e1f95937b4a88 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 d000dad400947..de6caaf1bb4fd 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 9bb3d9d898621..7873689d3b414 100644 --- a/impeller/renderer/backend/vulkan/command_pool_vk.cc +++ b/impeller/renderer/backend/vulkan/command_pool_vk.cc @@ -172,10 +172,9 @@ 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< - const ContextVK*, - std::vector>> g_all_pools_map - IPLR_GUARDED_BY(g_all_pools_map_mutex); +static std::unordered_map>> + 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 dd60026b44f70..859911a6f2da9 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 53f35a94ab890..aff21304a160f 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 ddc476f6d7fcf..bfe9636f9ad8f 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 5ab4feccfde89..47e7d70764497 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 c18a569315863..cbd94b7506101 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 ea992ce0e2d9d..f1c129d7fc736 100644 --- a/impeller/renderer/backend/vulkan/vk.h +++ b/impeller/renderer/backend/vulkan/vk.h @@ -58,12 +58,15 @@ #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 aad7fc67199e7..9a09b4bbd3b4e 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 d6854ee7d33b1..7c06abbad9e7e 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 1bbbb92108bc4..a77c0f8222421 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 2504a95064b6e..e2b2a1e5c60af 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 54eb45309e3a0..d88a02817bb4f 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 05d01c47c8e34..b4bdb2bbe4151 100644 --- a/lib/ui/window/viewport_metrics.cc +++ b/lib/ui/window/viewport_metrics.cc @@ -95,14 +95,15 @@ 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 ddda64664d5bc..a186b445c13e6 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/linux/.clang-tidy b/shell/platform/.clang-tidy similarity index 62% rename from shell/platform/linux/.clang-tidy rename to shell/platform/.clang-tidy index 42d8632c23f39..c4755ca16c8a1 100644 --- a/shell/platform/linux/.clang-tidy +++ b/shell/platform/.clang-tidy @@ -1,5 +1,6 @@ InheritParentConfig: true -# EnumCastOutOfRange warns about some common usages of GTK macros +# EnumCastOutOfRange warns about some common usages of GTK macros and some +# Flutter embedder API enums that are used to create combinations of bit fields Checks: >- -clang-analyzer-optin.core.EnumCastOutOfRange diff --git a/shell/platform/android/android_egl_surface.cc b/shell/platform/android/android_egl_surface.cc index d4f3fc648eead..ada34e4a8000e 100644 --- a/shell/platform/android/android_egl_surface.cc +++ b/shell/platform/android/android_egl_surface.cc @@ -21,7 +21,9 @@ 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 6e71e97247c9b..940a288491f2b 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 dcce4fd569ecc..5784e36a2df20 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 1639af639f3d0..f1b31b7450554 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 ddf800a5cdf25..b364a573bec39 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 67d2ee3791243..9b572e9de0f10 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterAppDelegate.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterAppDelegate.mm @@ -206,9 +206,8 @@ - (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 597bc5b8056c6..2cec75ca49f0b 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterDartVMServicePublisher.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterDartVMServicePublisher.mm @@ -111,7 +111,8 @@ - (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 859544e119a52..baeca57555221 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 53e8fe1b35eb4..3573834449ccb 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 d6209d2ed96d0..e7d12c236875d 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 a096d3bd444aa..07dbcd6a01cd9 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 ba0435f2864b7..6d9d24022ba73 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 f8e9bda254dc8..5ded2a6d8efa5 100644 --- a/shell/platform/fuchsia/flutter/focus_delegate_unittests.cc +++ b/shell/platform/fuchsia/flutter/focus_delegate_unittests.cc @@ -143,7 +143,8 @@ 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() << " }" << "}"; @@ -175,7 +176,8 @@ 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 8e78c4ab94c1a..0074361fafda8 100644 --- a/shell/platform/fuchsia/flutter/platform_view.cc +++ b/shell/platform/fuchsia/flutter/platform_view.cc @@ -381,12 +381,15 @@ 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 = @@ -515,7 +518,9 @@ 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(); @@ -530,7 +535,9 @@ 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 dcf0fd41c6b6d..eedd2b49d17db 100644 --- a/shell/platform/fuchsia/flutter/pointer_injector_delegate_unittest.cc +++ b/shell/platform/fuchsia/flutter/pointer_injector_delegate_unittest.cc @@ -108,9 +108,11 @@ 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_ << "," @@ -119,7 +121,8 @@ 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 9f7e33764a7ee..6e25e5815fe93 100644 --- a/shell/platform/fuchsia/flutter/tests/integration/utils/screenshot.cc +++ b/shell/platform/fuchsia/flutter/tests/integration/utils/screenshot.cc @@ -44,7 +44,8 @@ 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 911c618d66301..a162a8dac5f4c 100644 --- a/shell/platform/fuchsia/flutter/tests/platform_view_unittest.cc +++ b/shell/platform/fuchsia/flutter/tests/platform_view_unittest.cc @@ -810,10 +810,14 @@ 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 = @@ -831,9 +835,11 @@ 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(), @@ -1003,10 +1009,14 @@ 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( @@ -1017,9 +1027,11 @@ 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 = @@ -1037,9 +1049,11 @@ 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(), @@ -1148,10 +1162,14 @@ 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(); @@ -1162,9 +1180,11 @@ 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(); @@ -1215,9 +1235,11 @@ 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(); @@ -1279,10 +1301,14 @@ 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( @@ -1292,9 +1318,11 @@ 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( @@ -1304,9 +1332,11 @@ 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( @@ -1445,11 +1475,13 @@ 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 7dbb8b9395ff0..30d3261e8b2a6 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/linux/fl_event_channel.cc b/shell/platform/linux/fl_event_channel.cc index 7e6e28523a0ad..418acd89bfbbb 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 35fcd24c57f45..2bf9c28e7fa07 100644 --- a/shell/platform/linux/fl_method_call.cc +++ b/shell/platform/linux/fl_method_call.cc @@ -122,9 +122,8 @@ 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 9ae6aafb37062..652537dac1665 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 @@ G_MODULE_EXPORT gboolean fl_standard_message_codec_read_size( 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 7ef0f85a04fd4..0be10cb63b98f 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 837c2e13e583d..e64108e132206 100644 --- a/shell/platform/windows/client_wrapper/flutter_view_controller_unittests.cc +++ b/shell/platform/windows/client_wrapper/flutter_view_controller_unittests.cc @@ -63,7 +63,9 @@ 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 81c2fc01b789c..f65e0e1074f7f 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 22efae4ab3c5a..4d7046ab8ddd1 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 323125141edb1..e3047c019ea1c 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 b4495b9bd085f..686df97599a37 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 8088b16a87477..09ba011176545 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 80d78766f9383..cca1783db8516 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 fc984cbf34fc3..523c809329066 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 c84a9d7bfc6ac..141912aec3b39 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 d6f8db8988772..cde590f6e5342 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 c0449152beb72..cd64359d3dc9c 100644 --- a/shell/platform/windows/testing/mock_window_binding_handler.cc +++ b/shell/platform/windows/testing/mock_window_binding_handler.cc @@ -7,7 +7,8 @@ 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 f748ce794cc80..1cde918d2a489 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 75a0c00b3984b..8431d64b60894 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) {