Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 9c3274d

Browse files
authored
Merge branch 'main' into web-add-generator-meta
2 parents f41e078 + 767be0a commit 9c3274d

File tree

101 files changed

+1514
-1796
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+1514
-1796
lines changed

BUILD.gn

-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ group("unittests") {
196196
"//flutter/shell/platform/embedder:embedder_a11y_unittests",
197197
"//flutter/shell/platform/embedder:embedder_proctable_unittests",
198198
"//flutter/shell/platform/embedder:embedder_unittests",
199-
"//flutter/testing:testing_unittests",
200199
"//flutter/testing/dart",
201200
"//flutter/testing/smoke_test_failure",
202201
"//flutter/third_party/tonic/tests:tonic_unittests",

CONTRIBUTING.md

-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ $ ./run_tests.py --variant=host_debug_unopt_arm64 --type=engine
270270
| runtime_unittests | engine | |
271271
| shell_unittests | engine(not windows) | |
272272
| scenario_app | android | Integration and golden tests for Android, iOS |
273-
| testing_unittests | engine | |
274273
| tonic_unittests | engine | Unit tests for //third_party/tonic |
275274
| txt_unittests | engine(linux) | |
276275
| ui_unittests | engine | |

DEPS

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ vars = {
1414
'flutter_git': 'https://flutter.googlesource.com',
1515
'skia_git': 'https://skia.googlesource.com',
1616
'llvm_git': 'https://llvm.googlesource.com',
17-
'skia_revision': '97cebfb06139a1218ca8e50f63aa9466b961ce06',
17+
'skia_revision': 'd6d3c4f624a3a920b6c932f42fb77c6e9f839d73',
1818

1919
# WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY
2020
# See `lib/web_ui/README.md` for how to roll CanvasKit to a new version.
@@ -277,7 +277,7 @@ allowed_hosts = [
277277
]
278278

279279
deps = {
280-
'src': 'https://github.com/flutter/buildroot.git' + '@' + '4006f2730e566c2a4c2bbbbba406f888c401e094',
280+
'src': 'https://github.com/flutter/buildroot.git' + '@' + 'c8f93f25a19cefaaeb64d4323e2fc8c9ccd20479',
281281

282282
'src/flutter/third_party/depot_tools':
283283
Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '580b4ff3f5cd0dcaa2eacda28cefe0f45320e8f7',
@@ -960,7 +960,7 @@ deps = {
960960
'packages': [
961961
{
962962
'package': 'fuchsia/sdk/core/linux-amd64',
963-
'version': '1OZ2rHDklRNSZRUrcAbRaRp-gCEeRR9_z4vFXxXHfxgC'
963+
'version': '2cTD8TkGBMX2IssGl1MO4hHNrB1YvY50Q3D-vDSqlmkC'
964964
}
965965
],
966966
'condition': 'download_fuchsia_deps and not download_fuchsia_sdk',

ci/builders/linux_arm_host_engine.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"base_path": "out/ci/linux_debug_arm64/zip_archives/",
5959
"include_paths": [
6060
"out/ci/linux_debug_arm64/zip_archives/linux-arm64/artifacts.zip",
61+
"out/ci/linux_debug_arm64/zip_archives/linux-arm64/impeller_sdk.zip",
6162
"out/ci/linux_debug_arm64/zip_archives/linux-arm64/font-subset.zip",
6263
"out/ci/linux_debug_arm64/zip_archives/linux-arm64-debug/linux-arm64-flutter-gtk.zip",
6364
"out/ci/linux_debug_arm64/zip_archives/dart-sdk-linux-arm64.zip"
@@ -93,7 +94,8 @@
9394
"flutter/build/archives:artifacts",
9495
"flutter/build/archives:dart_sdk_archive",
9596
"flutter/tools/font_subset",
96-
"flutter/shell/platform/linux:flutter_gtk"
97+
"flutter/shell/platform/linux:flutter_gtk",
98+
"flutter/impeller/toolkit/interop:sdk"
9799
]
98100
}
99101
},

ci/builders/windows_arm_host_engine.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"type": "gcs",
88
"include_paths": [
99
"out/ci/host_debug_arm64/zip_archives/windows-arm64/artifacts.zip",
10+
"out/ci/host_debug_arm64/zip_archives/windows-arm64/impeller_sdk.zip",
1011
"out/ci/host_debug_arm64/zip_archives/windows-arm64/windows-arm64-embedder.zip",
1112
"out/ci/host_debug_arm64/zip_archives/windows-arm64/font-subset.zip",
1213
"out/ci/host_debug_arm64/zip_archives/dart-sdk-windows-arm64.zip",
@@ -47,7 +48,8 @@
4748
"flutter/tools/font_subset",
4849
"flutter/build/archives:dart_sdk_archive",
4950
"flutter/shell/platform/windows/client_wrapper:client_wrapper_archive",
50-
"flutter/build/archives:windows_flutter"
51+
"flutter/build/archives:windows_flutter",
52+
"flutter/impeller/toolkit/interop:sdk"
5153
]
5254
}
5355
},

ci/licenses_golden/excluded_files

+2
Original file line numberDiff line numberDiff line change
@@ -3582,6 +3582,8 @@
35823582
../../../fuchsia/sdk/linux/pkg/driver_symbols/meta.json
35833583
../../../fuchsia/sdk/linux/pkg/driver_testing_cpp/include/lib/driver/testing
35843584
../../../fuchsia/sdk/linux/pkg/driver_testing_cpp/meta.json
3585+
../../../fuchsia/sdk/linux/pkg/driver_testing_scoped_global_logger_cpp/include/lib/driver/testing
3586+
../../../fuchsia/sdk/linux/pkg/driver_testing_scoped_global_logger_cpp/meta.json
35853587
../../../fuchsia/sdk/linux/pkg/fdio/meta.json
35863588
../../../fuchsia/sdk/linux/pkg/fidl/meta.json
35873589
../../../fuchsia/sdk/linux/pkg/fidl_base/meta.json

ci/licenses_golden/licenses_flutter

+10
Original file line numberDiff line numberDiff line change
@@ -44806,6 +44806,9 @@ ORIGIN: ../../../flutter/shell/platform/linux/fl_key_responder.h + ../../../flut
4480644806
ORIGIN: ../../../flutter/shell/platform/linux/fl_keyboard_handler.cc + ../../../flutter/LICENSE
4480744807
ORIGIN: ../../../flutter/shell/platform/linux/fl_keyboard_handler.h + ../../../flutter/LICENSE
4480844808
ORIGIN: ../../../flutter/shell/platform/linux/fl_keyboard_handler_test.cc + ../../../flutter/LICENSE
44809+
ORIGIN: ../../../flutter/shell/platform/linux/fl_keyboard_layout.cc + ../../../flutter/LICENSE
44810+
ORIGIN: ../../../flutter/shell/platform/linux/fl_keyboard_layout.h + ../../../flutter/LICENSE
44811+
ORIGIN: ../../../flutter/shell/platform/linux/fl_keyboard_layout_test.cc + ../../../flutter/LICENSE
4480944812
ORIGIN: ../../../flutter/shell/platform/linux/fl_keyboard_pending_event.cc + ../../../flutter/LICENSE
4481044813
ORIGIN: ../../../flutter/shell/platform/linux/fl_keyboard_pending_event.h + ../../../flutter/LICENSE
4481144814
ORIGIN: ../../../flutter/shell/platform/linux/fl_keyboard_view_delegate.cc + ../../../flutter/LICENSE
@@ -44834,6 +44837,8 @@ ORIGIN: ../../../flutter/shell/platform/linux/fl_plugin_registrar.cc + ../../../
4483444837
ORIGIN: ../../../flutter/shell/platform/linux/fl_plugin_registrar_private.h + ../../../flutter/LICENSE
4483544838
ORIGIN: ../../../flutter/shell/platform/linux/fl_plugin_registrar_test.cc + ../../../flutter/LICENSE
4483644839
ORIGIN: ../../../flutter/shell/platform/linux/fl_plugin_registry.cc + ../../../flutter/LICENSE
44840+
ORIGIN: ../../../flutter/shell/platform/linux/fl_renderable.cc + ../../../flutter/LICENSE
44841+
ORIGIN: ../../../flutter/shell/platform/linux/fl_renderable.h + ../../../flutter/LICENSE
4483744842
ORIGIN: ../../../flutter/shell/platform/linux/fl_renderer.cc + ../../../flutter/LICENSE
4483844843
ORIGIN: ../../../flutter/shell/platform/linux/fl_renderer.h + ../../../flutter/LICENSE
4483944844
ORIGIN: ../../../flutter/shell/platform/linux/fl_renderer_gdk.cc + ../../../flutter/LICENSE
@@ -47711,6 +47716,9 @@ FILE: ../../../flutter/shell/platform/linux/fl_key_responder.h
4771147716
FILE: ../../../flutter/shell/platform/linux/fl_keyboard_handler.cc
4771247717
FILE: ../../../flutter/shell/platform/linux/fl_keyboard_handler.h
4771347718
FILE: ../../../flutter/shell/platform/linux/fl_keyboard_handler_test.cc
47719+
FILE: ../../../flutter/shell/platform/linux/fl_keyboard_layout.cc
47720+
FILE: ../../../flutter/shell/platform/linux/fl_keyboard_layout.h
47721+
FILE: ../../../flutter/shell/platform/linux/fl_keyboard_layout_test.cc
4771447722
FILE: ../../../flutter/shell/platform/linux/fl_keyboard_pending_event.cc
4771547723
FILE: ../../../flutter/shell/platform/linux/fl_keyboard_pending_event.h
4771647724
FILE: ../../../flutter/shell/platform/linux/fl_keyboard_view_delegate.cc
@@ -47739,6 +47747,8 @@ FILE: ../../../flutter/shell/platform/linux/fl_plugin_registrar.cc
4773947747
FILE: ../../../flutter/shell/platform/linux/fl_plugin_registrar_private.h
4774047748
FILE: ../../../flutter/shell/platform/linux/fl_plugin_registrar_test.cc
4774147749
FILE: ../../../flutter/shell/platform/linux/fl_plugin_registry.cc
47750+
FILE: ../../../flutter/shell/platform/linux/fl_renderable.cc
47751+
FILE: ../../../flutter/shell/platform/linux/fl_renderable.h
4774247752
FILE: ../../../flutter/shell/platform/linux/fl_renderer.cc
4774347753
FILE: ../../../flutter/shell/platform/linux/fl_renderer.h
4774447754
FILE: ../../../flutter/shell/platform/linux/fl_renderer_gdk.cc

ci/licenses_golden/licenses_fuchsia

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Signature: c30984d4008a542e0d0dfa5ce86272f4
1+
Signature: cdef7f9f5a175a084463026e6179983d
22

33
====================================================================================================
44
LIBRARY: fuchsia_sdk
@@ -16140,6 +16140,7 @@ ORIGIN: ../../../fuchsia/sdk/linux/pkg/driver_power_cpp/include/lib/driver/power
1614016140
ORIGIN: ../../../fuchsia/sdk/linux/pkg/driver_power_cpp/power-support.cc + ../../../fuchsia/sdk/linux/LICENSE
1614116141
ORIGIN: ../../../fuchsia/sdk/linux/pkg/driver_power_cpp/types.cc + ../../../fuchsia/sdk/linux/LICENSE
1614216142
ORIGIN: ../../../fuchsia/sdk/linux/pkg/driver_power_cpp/wake-lease.cc + ../../../fuchsia/sdk/linux/LICENSE
16143+
ORIGIN: ../../../fuchsia/sdk/linux/pkg/driver_testing_scoped_global_logger_cpp/scoped_global_logger.cc + ../../../fuchsia/sdk/linux/LICENSE
1614316144
ORIGIN: ../../../fuchsia/sdk/linux/pkg/fidl_base/include/lib/fidl/cpp/time.h + ../../../fuchsia/sdk/linux/LICENSE
1614416145
ORIGIN: ../../../fuchsia/sdk/linux/pkg/syslog/client.shard.cml + ../../../fuchsia/sdk/linux/LICENSE
1614516146
ORIGIN: ../../../fuchsia/sdk/linux/pkg/syslog/offer.shard.cml + ../../../fuchsia/sdk/linux/LICENSE
@@ -16221,6 +16222,7 @@ FILE: ../../../fuchsia/sdk/linux/pkg/driver_power_cpp/include/lib/driver/power/c
1622116222
FILE: ../../../fuchsia/sdk/linux/pkg/driver_power_cpp/power-support.cc
1622216223
FILE: ../../../fuchsia/sdk/linux/pkg/driver_power_cpp/types.cc
1622316224
FILE: ../../../fuchsia/sdk/linux/pkg/driver_power_cpp/wake-lease.cc
16225+
FILE: ../../../fuchsia/sdk/linux/pkg/driver_testing_scoped_global_logger_cpp/scoped_global_logger.cc
1622416226
FILE: ../../../fuchsia/sdk/linux/pkg/fidl_base/include/lib/fidl/cpp/time.h
1622516227
FILE: ../../../fuchsia/sdk/linux/pkg/syslog/client.shard.cml
1622616228
FILE: ../../../fuchsia/sdk/linux/pkg/syslog/offer.shard.cml

ci/licenses_golden/licenses_skia

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Signature: 1dfd57abcb937b7fd9e8cf99e5096379
1+
Signature: d076527109ed66313d57a1fe8c559e65
22

33
====================================================================================================
44
LIBRARY: etc1

display_list/dl_builder.h

+3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ class DisplayListBuilder final : public virtual DlCanvas,
3838
explicit DisplayListBuilder(const SkRect& cull_rect = kMaxCullRect,
3939
bool prepare_rtree = false);
4040

41+
DisplayListBuilder(DlScalar width, DlScalar height)
42+
: DisplayListBuilder(SkRect::MakeWH(width, height)) {}
43+
4144
~DisplayListBuilder();
4245

4346
// |DlCanvas|

flow/layers/layer_tree_unittests.cc

+39-23
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,19 @@
1111
#include "flutter/flow/testing/mock_layer.h"
1212
#include "flutter/fml/macros.h"
1313
#include "flutter/testing/canvas_test.h"
14-
#include "flutter/testing/mock_canvas.h"
14+
#include "flutter/testing/display_list_testing.h"
1515
#include "gtest/gtest.h"
1616

1717
namespace flutter {
1818
namespace testing {
19+
1920
class LayerTreeTest : public CanvasTest {
2021
public:
2122
LayerTreeTest()
2223
: root_transform_(SkMatrix::Translate(1.0f, 1.0f)),
24+
builder_(DisplayListBuilder::kMaxCullRect),
2325
scoped_frame_(compositor_context_.AcquireFrame(nullptr,
24-
&mock_canvas(),
26+
&builder_,
2527
nullptr,
2628
root_transform_,
2729
false,
@@ -31,6 +33,7 @@ class LayerTreeTest : public CanvasTest {
3133

3234
CompositorContext::ScopedFrame& frame() { return *scoped_frame_.get(); }
3335
const SkMatrix& root_transform() { return root_transform_; }
36+
sk_sp<DisplayList> display_list() { return builder_.Build(); }
3437

3538
std::unique_ptr<LayerTree> BuildLayerTree(
3639
const std::shared_ptr<Layer>& root_layer) {
@@ -40,6 +43,7 @@ class LayerTreeTest : public CanvasTest {
4043
private:
4144
CompositorContext compositor_context_;
4245
SkMatrix root_transform_;
46+
DisplayListBuilder builder_;
4347
std::unique_ptr<CompositorContext::ScopedFrame> scoped_frame_;
4448
};
4549

@@ -62,13 +66,17 @@ TEST_F(LayerTreeTest, PaintBeforePrerollDies) {
6266
layer->Add(mock_layer);
6367

6468
auto layer_tree = BuildLayerTree(layer);
65-
EXPECT_EQ(mock_layer->paint_bounds(), kEmptyRect);
66-
EXPECT_EQ(layer->paint_bounds(), kEmptyRect);
69+
EXPECT_EQ(mock_layer->paint_bounds(), SkRect::MakeEmpty());
70+
EXPECT_EQ(layer->paint_bounds(), SkRect::MakeEmpty());
6771
EXPECT_TRUE(mock_layer->is_empty());
6872
EXPECT_TRUE(layer->is_empty());
6973

7074
layer_tree->Paint(frame());
71-
EXPECT_EQ(mock_canvas().draw_calls(), std::vector<MockCanvas::DrawCall>());
75+
76+
DisplayListBuilder expected_builder;
77+
auto expected_dl = expected_builder.Build();
78+
79+
EXPECT_TRUE(DisplayListsEQ_Verbose(display_list(), expected_dl));
7280
}
7381

7482
TEST_F(LayerTreeTest, Simple) {
@@ -88,9 +96,12 @@ TEST_F(LayerTreeTest, Simple) {
8896
EXPECT_EQ(mock_layer->parent_matrix(), root_transform());
8997

9098
layer_tree->Paint(frame());
91-
EXPECT_EQ(mock_canvas().draw_calls(),
92-
std::vector({MockCanvas::DrawCall{
93-
0, MockCanvas::DrawPathData{child_path, child_paint}}}));
99+
100+
DisplayListBuilder expected_builder;
101+
expected_builder.DrawPath(DlPath(child_path), child_paint);
102+
auto expected_dl = expected_builder.Build();
103+
104+
EXPECT_TRUE(DisplayListsEQ_Verbose(display_list(), expected_dl));
94105
}
95106

96107
TEST_F(LayerTreeTest, Multiple) {
@@ -122,12 +133,13 @@ TEST_F(LayerTreeTest, Multiple) {
122133
kGiantRect); // Siblings are independent
123134

124135
layer_tree->Paint(frame());
125-
EXPECT_EQ(
126-
mock_canvas().draw_calls(),
127-
std::vector({MockCanvas::DrawCall{
128-
0, MockCanvas::DrawPathData{child_path1, child_paint1}},
129-
MockCanvas::DrawCall{0, MockCanvas::DrawPathData{
130-
child_path2, child_paint2}}}));
136+
137+
DisplayListBuilder expected_builder;
138+
expected_builder.DrawPath(DlPath(child_path1), child_paint1);
139+
expected_builder.DrawPath(DlPath(child_path2), child_paint2);
140+
auto expected_dl = expected_builder.Build();
141+
142+
EXPECT_TRUE(DisplayListsEQ_Verbose(display_list(), expected_dl));
131143
}
132144

133145
TEST_F(LayerTreeTest, MultipleWithEmpty) {
@@ -154,9 +166,12 @@ TEST_F(LayerTreeTest, MultipleWithEmpty) {
154166
EXPECT_EQ(mock_layer2->parent_cull_rect(), kGiantRect);
155167

156168
layer_tree->Paint(frame());
157-
EXPECT_EQ(mock_canvas().draw_calls(),
158-
std::vector({MockCanvas::DrawCall{
159-
0, MockCanvas::DrawPathData{child_path1, child_paint1}}}));
169+
170+
DisplayListBuilder expected_builder;
171+
expected_builder.DrawPath(DlPath(child_path1), child_paint1);
172+
auto expected_dl = expected_builder.Build();
173+
174+
EXPECT_TRUE(DisplayListsEQ_Verbose(display_list(), expected_dl));
160175
}
161176

162177
TEST_F(LayerTreeTest, NeedsSystemComposite) {
@@ -186,12 +201,13 @@ TEST_F(LayerTreeTest, NeedsSystemComposite) {
186201
EXPECT_EQ(mock_layer2->parent_cull_rect(), kGiantRect);
187202

188203
layer_tree->Paint(frame());
189-
EXPECT_EQ(
190-
mock_canvas().draw_calls(),
191-
std::vector({MockCanvas::DrawCall{
192-
0, MockCanvas::DrawPathData{child_path1, child_paint1}},
193-
MockCanvas::DrawCall{0, MockCanvas::DrawPathData{
194-
child_path2, child_paint2}}}));
204+
205+
DisplayListBuilder expected_builder;
206+
expected_builder.DrawPath(DlPath(child_path1), child_paint1);
207+
expected_builder.DrawPath(DlPath(child_path2), child_paint2);
208+
auto expected_dl = expected_builder.Build();
209+
210+
EXPECT_TRUE(DisplayListsEQ_Verbose(display_list(), expected_dl));
195211
}
196212

197213
TEST_F(LayerTreeTest, PrerollContextInitialization) {

0 commit comments

Comments
 (0)