Skip to content

Commit 853d6fc

Browse files
authored
Merge branch 'google:main' into main
2 parents 314fa22 + 706e3be commit 853d6fc

565 files changed

Lines changed: 43534 additions & 11059 deletions

File tree

Some content is hidden

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

.gn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ script_executable = "python3"
2626
# These are the list of GN files that run exec_script. This allowlist exists
2727
# to force additional review for new uses of exec_script, which is strongly
2828
# discouraged except for gypi_to_gn calls.
29-
exec_script_whitelist = angle_dotfile_settings.exec_script_whitelist +
30-
build_dotfile_settings.exec_script_whitelist +
29+
exec_script_allowlist = angle_dotfile_settings.exec_script_allowlist +
30+
build_dotfile_settings.exec_script_allowlist +
3131
[
3232
"//build/config/sysroot.gni",
3333
"//build/config/win/BUILD.gn",

BUILD.gn

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1845,3 +1845,18 @@ group("angle_static") {
18451845
":translator",
18461846
]
18471847
}
1848+
1849+
# GN evaluates each .gn file once per toolchain, so restricting to default
1850+
# toolchain will ensure write_file() is called only once.
1851+
if (!build_with_chromium && angle_has_build &&
1852+
current_toolchain == default_toolchain) {
1853+
import("//build/gn_logs.gni")
1854+
1855+
# Write debug logs to gn_logs.txt.
1856+
_lines = [
1857+
"Generated during 'gn gen' by //BUILD.gn.",
1858+
"",
1859+
] + build_gn_logs
1860+
1861+
write_file("$root_build_dir/gn_logs.txt", _lines)
1862+
}

DEPS

Lines changed: 70 additions & 158 deletions
Large diffs are not rendered by default.

README.chromium

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Name: ANGLE
22
URL: http://angleproject.org
33
Version: N/A
44
Revision: DEPS
5-
License: BSD
5+
License: BSD-3-Clause
66
License File: LICENSE
77
Security Critical: yes
88
Shipped: yes

build

Submodule build updated from 6b60728 to dc7b356

buildtools

Submodule buildtools updated from 2823e22 to 6377d66

doc/BecomingCommitter.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Becoming a committer
2+
3+
Committers are people that are considered to have write access to the ANGLE repository.
4+
All CLs submitted to the ANGLE repository need to be reviewed by one or (for non-trivial ones) two committers.
5+
In addition to this requirement, all CLs must also be reviewed or authored by an OWNER of the changed files.
6+
7+
This privilege is granted with some expectation of responsibility: committers are people who care about the ANGLE project and want to help it meet its goals.
8+
A committer is not just someone who can make changes, but someone who has demonstrated their ability to collaborate with the team, get the most knowledgeable people to review code, contribute high-quality code, and follow through to fix issues (in code or tests).
9+
10+
A committer is a contributor to the ANGLE project's success and a citizen helping the projects succeed.
11+
12+
## How to become a committer?
13+
14+
_Note to Googlers: the process is a bit different for ANGLE team members, reach out to an @google.com top-level OWNER directly._
15+
16+
In a nutshell, contribute 20 non-trivial patches and get at least three different people to review them (you'll need three people to support you).
17+
Then ask someone to nominate you.
18+
You're demonstrating your:
19+
20+
* commitment to the project (20 good patches requires a lot of your valuable time),
21+
* ability to collaborate with the team,
22+
* understanding of how the team works (policies, processes for testing and code review, etc),
23+
* understanding of the projects' code base and coding style, and
24+
* ability to write good code (last but certainly not least)
25+
26+
A current committer nominates you by sending email to one of the top-level OWNERs containing:
27+
28+
* your first and last name
29+
* your email address in Gerrit
30+
* an explanation of why you should be a committer,
31+
* embedded list of links to revisions (about top 10) containing your patches
32+
33+
Top-level OWNERs will deliberate and come to a consensus, targeting to reach it in 5 working days.
34+
Once you get approval, you are granted additional CR+2 review permissions.
35+
In some cases the process could drag out slightly.
36+
Ping OWNERs and keep writing patches!
37+
Even in the rare cases where a nomination fails, the objection is usually something easy to address like “more patches” or “not enough people are familiar with this person’s work.”
38+
39+
## Maintaining committer status
40+
41+
You don't really need to do much to maintain committer status: just keep being awesome and helping the ANGLE project!
42+
43+
In the unhappy event that a committer continues to disregard good citizenship (or actively disrupts the project), we may need to revoke that person's status.
44+
The process is the same as for nominating a new committer: someone suggests the revocation with a good reason and OWNERs deliberate.
45+
We hope that's simple enough, and that we never have to test it in practice.
46+
47+
In addition, as a security measure, if you are inactive on Gerrit (no upload, no comment and no review) for more than a year, we may revoke your committer privileges.
48+
An email notification is sent about 7 days prior to the removal.
49+
This is not meant as a punishment, so if you wish to resume contributing after that, contact top level OWNERs to ask that it be restored, and we will normally do so.
50+
51+
(This document was inspired by [https://v8.dev/docs/become-committer](https://v8.dev/docs/become-committer) itself inspired by its Chromium equivalent)
52+

doc/ContributingCode.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,7 @@ RELAND** button.
247247

248248
Similar to [Chromium's committer status][Committer-status], long-term contributors to the ANGLE
249249
project may request to join the `angle-committers` group. This allows you to give `+2` on code
250-
reviews and land patches without assistance. After about 6 months of regular contributions, you may
251-
request committer status from a core ANGLE team member via email or code review. Chromium
252-
committers and Googlers may ask at any time.
250+
reviews and land patches without assistance. See [Becoming a Committer](BecomingCommitter.md).
253251

254252
### OWNERS files and becoming an Owner
255253

doc/DebuggingTips.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,14 @@ On desktop:
111111
```
112112
ANGLE_GL_VENDOR="foo"
113113
ANGLE_GL_RENDERER="bar"
114+
ANGLE_GL_VERSION="blee"
114115
```
115116

116117
On Android:
117118
```
118119
adb shell setprop debug.angle.gl_vendor "foo"
119120
adb shell setprop debug.angle.gl_renderer "bar"
121+
adb shell setprop debug.angle.gl_version "blee"
120122
```
121123

122124
## Enabling Debug-Utils Markers

doc/StandaloneBenchmark.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# ANGLE Standalone Benchmark
2+
3+
This option builds the trace tests apk to run the selected traces from restricted traces in "src/tests/restricted_traces/". Running traces this way won't require additional trace data setup. Simply clicking on the apk or running the app activity will run the traces. Additionally, it will also dump the fps values of the traces it runs and also the histogram of the diff of the screenshot of the KeyFrame of the trace if golden images are provided.
4+
5+
Setup is similar to ANGLE Restricted Traces and requires some additional GN args.
6+
7+
## Accessing the traces
8+
9+
Follow the `Accessing the traces` in [restricted_traces/README.md](../src/tests/restricted_traces/README.md#accessing-the-traces) and then return here.
10+
11+
## Building the Standalone Benchmark apk
12+
13+
This option is available only for Android. Follow the steps in [DevSetupAndroid.md](DevSetupAndroid.md) (Recommend using the [`Performance`](DevSetupAndroid.md#performance-config) arguments for best performance)
14+
15+
When that is working, add the following GN arg to your setup:
16+
```
17+
build_angle_trace_perf_tests = true
18+
```
19+
### Selecting which traces to build
20+
21+
Since the traces are numerous and trace data is huge in size, you should limit the compilation to a subset to keep the apk file size within limits.
22+
```
23+
angle_restricted_traces = ["pokemon_go 5", "car_chase 1"]
24+
angle_standalone_benchmark_traces = ["pokemon_go", "car_chase"]
25+
angle_standalone_benchmark_goldens_dir = "<Path to golden images of the traces if present>"
26+
```
27+
28+
Names of the png files of golden images should match \<trace name\>_golden.png
29+
30+
To build the apk:
31+
```
32+
autoninja -C out/<config> angle_trace_tests
33+
```
34+
35+
## Installing the apk
36+
```
37+
adb install out/<config>/angle_trace_tests_apk/angle_trace_tests-debug.apk
38+
```
39+
40+
### Set permissions for the app
41+
To allow the results to be available in the external storage, we need to provide appropriate permission.
42+
```
43+
adb shell "appops set com.android.angle.test MANAGE_EXTERNAL_STORAGE allow || true"
44+
```
45+
46+
## Running the apk
47+
You can run the app either by clicking on the "ANGLEBench" app icon or by running the following command (after unlocking the phone).
48+
49+
Note: It is important to unlock the device before running the adb command.
50+
```
51+
adb shell am start -n com.android.angle.test/com.android.angle.test.StandaloneBenchmarkActivity
52+
```
53+
54+
## Run configs
55+
Below configs for the trace runs are set to hardcoded values
56+
```
57+
gVerboseLogging = true;
58+
gScreenshotDir = "<Application_Dir>/files";
59+
gSaveScreenshots = true;
60+
gUseANGLE = "vulkan";
61+
```
62+
63+
However, other configs can be set using `org.chromium.native_test.NativeTest.CommandLineFlags`. Example:
64+
```
65+
adb shell am start -n com.android.angle.test/com.android.angle.test.StandaloneBenchmarkActivity -e org.chromium.native_test.NativeTest.CommandLineFlags '--trials=1\ --trial-time=60'
66+
```
67+
68+
## Results
69+
Once all the traces listed in `angle_standalone_benchmark_traces` are finished, the app will generate `traces_fps.txt`.
70+
71+
If `angle_standalone_benchmark_goldens_dir` is specified in the GN args, it will also generate `traces_img_comp.txt`.
72+
73+
Output files will be placed on the device in `chromium_tests_root` dir in external storage. For example: `/sdcard/chromium_tests_root/`
74+
75+
### traces_fps.txt
76+
```
77+
<trace 1 name> <FPS value>
78+
<trace 2 name> <FPS value>
79+
...
80+
```
81+
82+
### traces_img_comp.txt
83+
```
84+
<trace 1 name>:
85+
Diff in pixel value: 0-20, 20-40, 40-70, 70-100, 100-150, 150-255
86+
Number of pixels: <#>, <#>, <#>, <#>, <#>, <#>,
87+
88+
<trace 2 name>:
89+
Diff in pixel value: 0-20, 20-40, 40-70, 70-100, 100-150, 150-255
90+
Number of pixels: <#>, <#>, <#>, <#>, <#>, <#>,
91+
...
92+
```

0 commit comments

Comments
 (0)