Name Date Size #Lines LOC

..--

configs/H25-Apr-2025-9,7129,710

hooks/H25-Apr-2025-2014

protos/H25-Apr-2025-1,2351,031

src/H25-Apr-2025-125,701103,288

.eslintrc.jsH A D25-Apr-20252 KiB6236

.gitignoreH A D25-Apr-2025637 4638

.prettierignoreH A D25-Apr-2025256 74

OWNERSH A D25-Apr-2025130 76

README.mdH A D25-Apr-20251.6 KiB4234

allHD25-Apr-20250

google.tslint.jsonH A D25-Apr-20253.4 KiB8686

karma.config.ci.jsH A D25-Apr-20252.8 KiB8347

karma.config.common.jsH A D25-Apr-20251.6 KiB5235

karma.config.dev.jsH A D25-Apr-2025861 3011

package-lock.jsonH A D25-Apr-20251.2 MiB32,00432,003

package.jsonH A D25-Apr-20255.9 KiB106105

prettier.config.jsH A D25-Apr-2025965 5551

protractor.config.jsH A D25-Apr-20251.4 KiB4821

tsconfig.jsonH A D25-Apr-20251.1 KiB4140

webpack.config.common.jsH A D25-Apr-20251.8 KiB7454

webpack.config.dev.jsH A D25-Apr-20252.4 KiB8160

webpack.config.prod.jsH A D25-Apr-20252.1 KiB7153

README.md

1# Tool for visualizing window manager traces
2
3## Developing WinScope
4When the trace is enabled, Window Manager and Surface Flinger capture and
5save current state to a file at each point of interest.
6`frameworks/base/core/proto/android/server/windowmanagertrace.proto`
7and `frameworks/native/services/surfaceflinger/layerproto/layerstrace.proto`
8contain the proto definitions for their internal states.
9
10### Checking out code and setting up environment
11* [Download Android source](https://source.android.com/setup/build/downloading)
12* Navigate to `development/tools/winscope`
13* Run `npm install`
14
15### Build & test & deploy changes
16* Navigate to `development/tools/winscope`
17* Run `npm run` to get the list of available commands
18
19### Update IntDefMapping
20* Build `framework-minus-apex-intdefs` module and a preprocessor will
21  generate the latest IntDefMapping. From the `ANDROID_ROOT` run:
22```
23. build/envsetup.sh
24m framework-minus-apex-intdefs
25```
26
27* Copy the generated `intDefMapping.json` files to the `winscope`.
28```
29python3 -c 'import sys,json,collections; print(json.dumps(collections.OrderedDict(sorted(collections.ChainMap(*map(lambda x:json.load(open(x)), sys.argv[1:])).items())), indent=2))' $(find out/soong/.intermediates/frameworks/base -iname intDefMapping.json) > ./development/tools/winscope/src/common/intDefMapping.json
30```
31
32* Upload the changes.
33```
34repo start intdef-update
35git commit -am "Update intdef mapping" "Test: N/A"
36repo upload --cbr .
37```
38
39### Building with internal extensions
40Internal paths in vendor/ which are not available in AOSP must be replaced by
41stub files. See getWaylandSafePath for an example
42