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

Commit 771d44b

Browse files
authored
Merge branch 'main' into clangd-check
2 parents a0e7cc0 + 04ff286 commit 771d44b

File tree

131 files changed

+37278
-34421
lines changed

Some content is hidden

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

131 files changed

+37278
-34421
lines changed

.ci.yaml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,26 @@ targets:
5959
[
6060
{"dependency": "goldctl", "version": "git_revision:720a542f6fe4f92922c3b8f0fdcc4d2ac6bb83cd"}
6161
]
62-
timeout: 60
62+
timeout: 90
63+
runIf:
64+
- .ci.yaml
65+
- ci/builders/linux_android_emulator.json
66+
- DEPS
67+
- lib/ui/**
68+
- shell/platform/android/**
69+
- testing/scenario_app/**
70+
71+
- name: Linux linux_android_emulator_skia_tests
72+
enabled_branches:
73+
- main
74+
recipe: engine_v2/engine_v2
75+
properties:
76+
config_name: linux_android_emulator_skia
77+
dependencies: >-
78+
[
79+
{"dependency": "goldctl", "version": "git_revision:720a542f6fe4f92922c3b8f0fdcc4d2ac6bb83cd"}
80+
]
81+
timeout: 90
6382
runIf:
6483
- .ci.yaml
6584
- ci/builders/linux_android_emulator.json
@@ -80,7 +99,7 @@ targets:
8099
[
81100
{"dependency": "goldctl", "version": "git_revision:720a542f6fe4f92922c3b8f0fdcc4d2ac6bb83cd"}
82101
]
83-
timeout: 60
102+
timeout: 90
84103
runIf:
85104
- .ci.yaml
86105
- ci/builders/linux_android_emulator.json

DEPS

Lines changed: 5 additions & 5 deletions
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': '254b27e90e3cdd89ff31f4d8d378910c81d2800b',
17+
'skia_revision': 'ba3ed5998af356f0fb7c285b4c3d7c0f1b1c1ad1',
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.
@@ -62,7 +62,7 @@ vars = {
6262
# Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS
6363
# You can use //tools/dart/create_updated_flutter_deps.py to produce
6464
# updated revision list of existing dependencies.
65-
'dart_revision': 'e2f2d9b464e90ac10b2e4c5fd5331712020737f0',
65+
'dart_revision': 'c479735adcf91684b66e94747199e3c1b17516b9',
6666

6767
# WARNING: DO NOT EDIT MANUALLY
6868
# The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py
@@ -304,7 +304,7 @@ deps = {
304304
'src/flutter/third_party/flatbuffers':
305305
Var('chromium_git') + '/external/github.com/google/flatbuffers' + '@' + '0a80646371179f8a7a5c1f42c31ee1d44dcf6709',
306306

307-
'src/third_party/icu':
307+
'src/flutter/third_party/icu':
308308
Var('chromium_git') + '/chromium/deps/icu.git' + '@' + 'a622de35ac311c5ad390a7af80724634e5dc61ed',
309309

310310
'src/flutter/third_party/gtest-parallel':
@@ -379,7 +379,7 @@ deps = {
379379
Var('dart_git') + '/csslib.git@62ae85e84590f61169fddbca650e91a57544834b',
380380

381381
'src/third_party/dart/third_party/pkg/dart_style':
382-
Var('dart_git') + '/dart_style.git@633b01cba68f4b42ddc2985c3d521c22149d5ce3',
382+
Var('dart_git') + '/dart_style.git@a6ad7693555a9add6f98ad6fd94de80d35c89415',
383383

384384
'src/third_party/dart/third_party/pkg/dartdoc':
385385
Var('dart_git') + '/dartdoc.git@7a9df65fbca600ecb3ada4b08002c8ab9ee4e987',
@@ -1000,7 +1000,7 @@ deps = {
10001000
'packages': [
10011001
{
10021002
'package': 'fuchsia/sdk/core/linux-amd64',
1003-
'version': 'j9cJ94K-T1i3u5xGhNKHB3oJWIZ3lO7m7Ob0kSQL-wsC'
1003+
'version': 'kLvCWEgbL1VTRW69e1re3ERw4CUAUrJ-DJdxXyXem7gC'
10041004
}
10051005
],
10061006
'condition': 'host_os == "linux" and not download_fuchsia_sdk',

assets/asset_manager.cc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,21 @@ AssetResolver::AssetResolverType AssetManager::GetType() const {
111111
return AssetResolverType::kAssetManager;
112112
}
113113

114+
bool AssetManager::operator==(const AssetResolver& other) const {
115+
const AssetManager* other_manager = other.as_asset_manager();
116+
if (!other_manager) {
117+
return false;
118+
}
119+
if (resolvers_.size() != other_manager->resolvers_.size()) {
120+
return false;
121+
}
122+
123+
for (size_t i = 0; i < resolvers_.size(); i++) {
124+
if (*resolvers_[i] != *other_manager->resolvers_[i]) {
125+
return false;
126+
}
127+
}
128+
return true;
129+
}
130+
114131
} // namespace flutter

assets/asset_manager.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ class AssetManager final : public AssetResolver {
8888
const std::string& asset_pattern,
8989
const std::optional<std::string>& subdir) const override;
9090

91+
// |AssetResolver|
92+
bool operator==(const AssetResolver& other) const override;
93+
94+
// |AssetResolver|
95+
const AssetManager* as_asset_manager() const override { return this; }
96+
9197
private:
9298
std::deque<std::unique_ptr<AssetResolver>> resolvers_;
9399

assets/asset_resolver.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414

1515
namespace flutter {
1616

17+
class AssetManager;
18+
class APKAssetProvider;
19+
class DirectoryAssetBundle;
20+
1721
class AssetResolver {
1822
public:
1923
AssetResolver() = default;
@@ -29,6 +33,14 @@ class AssetResolver {
2933
kDirectoryAssetBundle
3034
};
3135

36+
virtual const AssetManager* as_asset_manager() const { return nullptr; }
37+
virtual const APKAssetProvider* as_apk_asset_provider() const {
38+
return nullptr;
39+
}
40+
virtual const DirectoryAssetBundle* as_directory_asset_bundle() const {
41+
return nullptr;
42+
}
43+
3244
virtual bool IsValid() const = 0;
3345

3446
//----------------------------------------------------------------------------
@@ -81,6 +93,12 @@ class AssetResolver {
8193
return {};
8294
};
8395

96+
virtual bool operator==(const AssetResolver& other) const = 0;
97+
98+
bool operator!=(const AssetResolver& other) const {
99+
return !operator==(other);
100+
}
101+
84102
private:
85103
FML_DISALLOW_COPY_AND_ASSIGN(AssetResolver);
86104
};

assets/directory_asset_bundle.cc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,14 @@ std::vector<std::unique_ptr<fml::Mapping>> DirectoryAssetBundle::GetAsMappings(
110110
return mappings;
111111
}
112112

113+
bool DirectoryAssetBundle::operator==(const AssetResolver& other) const {
114+
auto other_bundle = other.as_directory_asset_bundle();
115+
if (!other_bundle) {
116+
return false;
117+
}
118+
return is_valid_after_asset_manager_change_ ==
119+
other_bundle->is_valid_after_asset_manager_change_ &&
120+
descriptor_.get() == other_bundle->descriptor_.get();
121+
}
122+
113123
} // namespace flutter

assets/directory_asset_bundle.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ class DirectoryAssetBundle : public AssetResolver {
4343
const std::string& asset_pattern,
4444
const std::optional<std::string>& subdir) const override;
4545

46+
// |AssetResolver|
47+
bool operator==(const AssetResolver& other) const override;
48+
49+
// |AssetResolver|
50+
const DirectoryAssetBundle* as_directory_asset_bundle() const override {
51+
return this;
52+
}
53+
4654
FML_DISALLOW_COPY_AND_ASSIGN(DirectoryAssetBundle);
4755
};
4856

build/archives/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ if (build_engine_artifacts && !is_android) {
7272
}
7373
files += [
7474
{
75-
source = "//third_party/icu/flutter/icudtl.dat"
75+
source = "//flutter/third_party/icu/flutter/icudtl.dat"
7676
destination = "icudtl.dat"
7777
},
7878
{
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2013 The Flutter Authors. All rights reserved.
2+
# Use of this source code is governed by a BSD-style license that can be
3+
# found in the LICENSE file.
4+
5+
group("icui18n_hidden_visibility") {
6+
public_deps = [ "//flutter/third_party/icu:icui18n_hidden_visibility" ]
7+
}
8+
9+
group("icuuc_hidden_visibility") {
10+
public_deps = [ "//flutter/third_party/icu:icuuc_hidden_visibility" ]
11+
}
12+
13+
group("icui18n") {
14+
public_deps = [ "//flutter/third_party/icu:icui18n" ]
15+
}
16+
17+
group("icuuc") {
18+
public_deps = [ "//flutter/third_party/icu:icuuc" ]
19+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#!/bin/bash
2+
#
3+
# Copyright 2013 The Flutter Authors. All rights reserved.
4+
# Use of this source code is governed by a BSD-style license that can be
5+
# found in the LICENSE file.
6+
7+
set -e
8+
9+
# Needed because if it is set, cd may print the path it changed to.
10+
unset CDPATH
11+
12+
# On Mac OS, readlink -f doesn't work, so follow_links traverses the path one
13+
# link at a time, and then cds into the link destination and find out where it
14+
# ends up.
15+
#
16+
# The function is enclosed in a subshell to avoid changing the working directory
17+
# of the caller.
18+
function follow_links() (
19+
cd -P "$(dirname -- "$1")"
20+
file="$PWD/$(basename -- "$1")"
21+
while [[ -L "$file" ]]; do
22+
cd -P "$(dirname -- "$file")"
23+
file="$(readlink -- "$file")"
24+
cd -P "$(dirname -- "$file")"
25+
file="$PWD/$(basename -- "$file")"
26+
done
27+
echo "$file"
28+
)
29+
30+
SCRIPT_DIR=$(follow_links "$(dirname -- "${BASH_SOURCE[0]}")")
31+
SRC_DIR="$(
32+
cd "$SCRIPT_DIR/../.."
33+
pwd -P
34+
)"
35+
36+
# Check if a file named **/GeneratedPluginRegistrant.java exists in the project.
37+
# If it does, fail the build and print a message to the user pointing them to
38+
# the file and instructing them to remove it.
39+
#
40+
# See: https://github.com/flutter/flutter/issues/143782.
41+
42+
# The expected path to the file. Any *other* path is unexpected.
43+
EXPECTED_PATHS=("./shell/platform/android/test/io/flutter/plugins/GeneratedPluginRegistrant.java")
44+
45+
# Temporarily change the working directory to the root of the Flutter project.
46+
pushd "$SRC_DIR/flutter" >/dev/null
47+
48+
# Change back to the original working directory.
49+
function cleanup() {
50+
popd >/dev/null
51+
}
52+
53+
trap cleanup EXIT
54+
55+
# Find all files named GeneratedPluginRegistrant.java in the project.
56+
echo "Finding all files named GeneratedPluginRegistrant.java in the project..."
57+
GENERATED_PLUGIN_REGISTRANT_PATHS=$(find . -name "GeneratedPluginRegistrant.java")
58+
59+
# Iterate over the found paths and check if they are expected.
60+
for path in $GENERATED_PLUGIN_REGISTRANT_PATHS; do
61+
if [[ ! " ${EXPECTED_PATHS[@]} " =~ " ${path} " ]]; then
62+
echo "ERROR: Found unexpected file named GeneratedPluginRegistrant.java at $path."
63+
echo "Please remove this file from the project."
64+
exit 1
65+
fi
66+
done
67+
68+
echo "Done."

0 commit comments

Comments
 (0)