Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -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',

Expand Down Expand Up @@ -943,7 +943,7 @@ deps = {
'packages': [
{
'package': 'flutter_internal/rbe/reclient_cfgs',
'version': 'XIomtC8MFuQrF9qI5xYcFfcfKXZTbcY6nL6NgF-pSRIC',
'version': '_crQLRWl_tm9uDdPtihkx_9vvdMe-OYBdQ0_ih51y7QC',
}
],
'condition': 'use_rbe',
Expand Down
2 changes: 1 addition & 1 deletion ci/licenses_golden/excluded_files
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions common/graphics/gl_context_switch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 3 additions & 1 deletion display_list/display_list_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
}
Expand Down
2 changes: 1 addition & 1 deletion display_list/effects/dl_runtime_effect.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ DlRuntimeEffectImpeller::~DlRuntimeEffectImpeller() = default;

DlRuntimeEffectImpeller::DlRuntimeEffectImpeller(
std::shared_ptr<impeller::RuntimeStage> runtime_stage)
: runtime_stage_(std::move(runtime_stage)){};
: runtime_stage_(std::move(runtime_stage)) {};

sk_sp<SkRuntimeEffect> DlRuntimeEffectImpeller::skia_runtime_effect() const {
return nullptr;
Expand Down
4 changes: 2 additions & 2 deletions display_list/testing/dl_rendering_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
75 changes: 15 additions & 60 deletions display_list/testing/dl_test_snippets.cc
Original file line number Diff line number Diff line change
Expand Up @@ -517,75 +517,30 @@ std::vector<DisplayListInvocationGroup> 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",
{
Expand Down
3 changes: 2 additions & 1 deletion flow/layers/performance_overlay_layer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ sk_sp<SkTextBlob> 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,
Expand Down
11 changes: 6 additions & 5 deletions flow/layers/performance_overlay_layer_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion flow/testing/gl_context_switch_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace testing {
static thread_local std::unique_ptr<int> current_context;

TestSwitchableGLContext::TestSwitchableGLContext(int context)
: context_(context){};
: context_(context) {};

TestSwitchableGLContext::~TestSwitchableGLContext() = default;

Expand Down
2 changes: 1 addition & 1 deletion fml/memory/task_runner_checker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 3 additions & 1 deletion fml/memory/weak_ptr_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ TEST(WeakPtrTest, MultipleStaged) {
int data = 0;
WeakPtrFactory<int> factory(&data);
a = factory.GetWeakPtr();
{ WeakPtr<int> b = factory.GetWeakPtr(); }
{
WeakPtr<int> b = factory.GetWeakPtr();
}
EXPECT_NE(a.get(), nullptr);
}
EXPECT_EQ(nullptr, a.get());
Expand Down
2 changes: 1 addition & 1 deletion fml/time/timestamp_provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion impeller/compiler/compiler_backend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion impeller/core/capture.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ template <typename Type>
struct CaptureCursorListElement {
std::string label;

explicit CaptureCursorListElement(const std::string& label) : label(label){};
explicit CaptureCursorListElement(const std::string& label) : label(label) {};

virtual ~CaptureCursorListElement() = default;

Expand Down
2 changes: 1 addition & 1 deletion impeller/core/shader_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ struct Padded {
T value;
Padding<Size> _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) {
Expand Down
2 changes: 1 addition & 1 deletion impeller/geometry/half.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
45 changes: 13 additions & 32 deletions impeller/geometry/path_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) { //
Expand Down Expand Up @@ -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(
Expand All @@ -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) {
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion impeller/geometry/vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}

Expand Down
3 changes: 2 additions & 1 deletion impeller/golden_tests/golden_digest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 << ", ";
Expand Down
3 changes: 2 additions & 1 deletion impeller/renderer/backend/gles/proc_table_gles.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ ProcTableGLES::ProcTableGLES( // NOLINT(google-readability-function-size)

auto error_fn = reinterpret_cast<PFNGLGETERRORPROC>(resolver("glGetError"));
if (!error_fn) {
VALIDATION_LOG << "Could not resolve " << "glGetError";
VALIDATION_LOG << "Could not resolve "
<< "glGetError";
return;
}

Expand Down
Loading