Commit Graph

4216 Commits

Author SHA1 Message Date
Pablo Gamito
6707d0e070 Merge "Show all displays in surface flinger trace" 2023-01-11 15:33:27 +00:00
Pablo Gamito
4ad8a65f9c Show all displays in surface flinger trace
+ ensure displays are sorted to ensure same ordering between SF and WM trace displays

Fixes: 264688936
Test: npm run build:unit && npm run test:unit
Change-Id: If5cbeb1f14545a30da0c0181884ab74132bdde77
2023-01-10 10:05:35 +00:00
Nataniel Borges
1c7ac129dc [conflict] Merge "Update winscope proxy to version 1.0" am: 20b563e65e am: 1130743c2c am: ed61429250
Original change: https://android-review.googlesource.com/c/platform/development/+/2379888

Change-Id: I4f69afe94fc6510c5975d07c2883ba82334cb30c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-09 14:40:36 +00:00
Nataniel Borges
ed61429250 Merge "Update winscope proxy to version 1.0" am: 20b563e65e am: 1130743c2c
Original change: https://android-review.googlesource.com/c/platform/development/+/2379888

Change-Id: Ic5ccb4f15ce4830c71d52fae6d7c9a9d1e04b6b8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-09 13:45:14 +00:00
Nataniel Borges
8e25c2ed36 Revert "Temporarily point winscope_proxy.py download link to Code Search"
This reverts commit 30a6979344.

Reason for revert: https://android-review.git.corp.google.com/q/topic:%22winscope-1.0%22 is updating the proxy files in aosp, this temporary fix is no longer necessary

Change-Id: I3e4d8370e0a947c8491b470cefbd04ddc6f3ef0b
2023-01-09 12:16:25 +00:00
Nataniel Borges
7353794edc Update winscope proxy to version 1.0
Bug: 264573983
Change-Id: Ie7e14b11c3b3a866a649b4e013a60fe542d3d754
Test: open winscope and proxy and dump wm and sf states
2023-01-09 12:14:09 +00:00
Kean Mariotti
30a6979344 Temporarily point winscope_proxy.py download link to Code Search
Will revert/adapt this change once the new winscope_proxy.py will
be available in AOSP as well.

Bug: b/264573983
Test: open winscope, click on "Download from Code Search"
Change-Id: I2c03c7d295465ef60c4c6c3f61399c90cb7ff1c0
2023-01-06 10:05:32 +00:00
Kean Mariotti
e75ca180ff Fix rects view (weird triangular shapes)
Rectangles with property cornerRadius === 0 could result
in weird triangular shapes being drawn instead of rectangles

Fix: b/264541479
Test: follow steps in b/264541479 and check issue is gone
Change-Id: I2421e47cdbf7c932218640f2553647ded676a80d
2023-01-05 17:04:03 +00:00
Kean Mariotti
25682f6e34 Fix title (WinscopeNg => Winscope)
Bug: b/264247967
Test: open app and check the title is 'Winscope'
Change-Id: I126a5f2f714c2fbefa42f2d7281abb9b2feb798f
2023-01-05 13:03:42 +00:00
Kean Mariotti
e1cfda57cb Fix parsing of timeline's timestamp input
Test: npm run build:all && npm run test:all
Fix: b/264504813
Change-Id: I522d5d9f47a684e013d405ed6b6395820354ef3c
2023-01-05 13:03:42 +00:00
Kean Mariotti
db3015b799 Fix tslint errors
Test: npm run build:all && npm run test:all
Change-Id: I0eb35399afc4156b93a9b1d5213c70c4baa63316
2023-01-05 13:03:42 +00:00
Kean Mariotti
80105ae0ca Add tslint
Add tslint with google3 config (google3/javascript/typescript/tslint).

Skipped google3 custom rules that need to be built and added to the project.

If needed, with some extra effort it should be possible
to get the google3 rules to build/run also in the Winscope environment.
However, it is probably simpler and quicker to run (and maybe fix?)
those checks on critique once we port Winscope to google3.

Fix: b/264505907
Test: npm run tslint:check / npm run tslint:fix
Change-Id: If3a79de673503e0c06541f0329163dee93849c3c
2023-01-05 13:03:42 +00:00
Kean Mariotti
a3d891dab6 Reorganize src/common package
- Move src/common/trace => src/trace (make its own package)
- Move src/common/utils => src/common

Fix: b/264362866
Test: npm run build:all && npm run test:all
Change-Id: I9941997d1f0f7ef5558ed75a56d48acba69e39a3
2023-01-04 11:04:41 +00:00
Kean Mariotti
9ffaca7fdb Rename source files to be google3-compliant
<name>.module.ts => <name>_module.ts
<name>.component.ts => <name>_component.ts
<name>.component.spec.ts => <name>_component_test.ts
<name>.spec.ts => <name>_test.ts
main.prod.ts => main_prod.ts
main.dev.ts => main_dev.ts

Fix: b/263471805
Test: npm run build:all && npm run test:all
Change-Id: I190c6be7a552624e7965568f04cb498305d37683
2023-01-04 09:38:50 +00:00
Kean Mariotti
fbec45f115 Fix rounded rect corners computation
Handle the case where corner radius > height/2 (or width/2)

Fix: b/264264761
Test: npm run build:all && npm run test:all
Change-Id: I9327189a3b9a59128d9ed3cc885f5887900a952a
2023-01-04 08:28:09 +00:00
Kean Mariotti
4c849366bf Rename winscope-ng => winscope
Fix: b/264247967
Test: npm install && npm run build:all && npm run test:all
Change-Id: I562e7386a1fe250f5042f2aec67d4731d4f6d3d7
2023-01-03 16:36:16 +00:00
Kean Mariotti
969b3358d7 Remove legacy Winscope
Bug: b/264247967
Test: not needed
Change-Id: I61108714c08e0a4ab2e0c5bf25931740218e68e8
2023-01-03 15:16:20 +00:00
Nataniel Borges
0d4a2d2919 Fix rects view for WM trace
The rounded corners property should be 0 on WM traces, instead of null

Fixes: 264024995
Test: open a wm trace and check rects view
Change-Id: I53e6668a8bdaa460e2e740936b719a3a4f813f8c
2023-01-01 10:31:46 +00:00
Kean Mariotti
547e0f5f4b Add cyclic dependencies check
Add new check based on tool "madge" to prevent cyclic dependencies regressions.
Madge currently reports 10 cycles. The new check makes sure we don't introduce new ones.

Bug: b/261552483
Test: npm run deps_graph:check_cycles
Change-Id: I2630ddcb94101be9b288ce0708fca3231962f406
2022-12-30 15:24:51 +00:00
Kean Mariotti
73be9787b6 The great formatting
Unleash prettier on the entire codebase

Fix: b/263471740
Test: npm run format:check && npm run lint:check
Change-Id: Ida110947bec9c9a9b385c64e126ccf6d7ad6652b
2022-12-30 15:24:43 +00:00
Kean Mariotti
83fdc7fbe0 Fix eslint errors
Test: npm run lint:check
Bug: b/263471740
Change-Id: I8289c8b22d5af5e85fd94ccebf1d82abb0a062c2
2022-12-30 11:21:46 +00:00
Kean Mariotti
1a06fc399f Set up prettier + eslint
- Add npm scripts format:check, format:fix, lint:check, lint:fix
- Include format:check + lint:check into the test suite (test:all)
- Configure eslint to play nice with prettier (basically no format checks)

Test: npm run format:check && npm run lint:check
Bug: b/263471740
Change-Id: I6f215860a24302ed04c2689ac31e4dd4e7e6fd5e
2022-12-30 11:21:46 +00:00
Kean Mariotti
896aef66b8 Upgrade chrome driver
Test: npm run build:e2e && npm run test:e2e
Change-Id: I912a455c4dc86f3d48265963d1cab4e19e1e7872
2022-12-30 10:29:04 +00:00
Kean Mariotti
eadf44ec29 Merge changes Iaf248668,Ic1701cd0,I56274973
* changes:
  Mediator cleanup
  Refactor dependency inversion interfaces
  Remove legacy data and properties view from layer trace root
2022-12-28 18:59:19 +00:00
TreeHugger Robot
e1a84ab2ec Merge "Draw rounded corners when layers have them" 2022-12-28 16:22:10 +00:00
Nataniel Borges
d1dc6d0cac Draw rounded corners when layers have them
Plus some code clean up

Result: https://screenshot.googleplex.com/BNYzBrQ9SMeiPxU

Test: npm start and open a trace with rounded corners (e.g. quick
switch)

Change-Id: I93c36eaccd440c3420e3bb7fe25d262979dbde5e
2022-12-28 15:05:33 +00:00
Kean Mariotti
fded3d4cb2 Mediator cleanup
Test: npm run build:all && npm run test:all
Change-Id: Iaf2486682146310a0c888e9c67ad34751068f3be
2022-12-28 11:22:22 +00:00
Kean Mariotti
b6a9c8b94d Refactor dependency inversion interfaces
Fix: b/262840884
Test: npm run build:all && npm run test:all
Change-Id: Ic1701cd069e2cff29590b3b2d35b01dfcb74004b
2022-12-28 11:14:43 +00:00
Kean Mariotti
357b30e6bd Remove legacy data and properties view from layer trace root
- Use OnPush Angular change detection strategy in SF viewer (better perf and avoids change loop errors)
- Hide PropertyGroupsComponent when root layer is selected
- Add formatting for "raw" long numbers

Fix: b/254044321
Test: npm run build:all && npm run test:all
Change-Id: I56274973a8d42c28e49e4a4a92fd6ae09a6693db
2022-12-27 15:40:40 +00:00
Pablo Gamito
329016cbad Merge "Don't show single timestamp timeline error message when we have no timestamps at all" 2022-12-27 14:55:34 +00:00
Pablo Gamito
395f8ec2b2 Don't show single timestamp timeline error message when we have no timestamps at all
Fixes: 263771992
Test: n/a
Change-Id: Ie2cdc6096a199f27f4f8d192cd67b25257737392
2022-12-27 11:30:25 +00:00
Kean Mariotti
43b5f364d7 Merge "Transactions view improvements" 2022-12-27 09:18:57 +00:00
Kean Mariotti
28edd7d7df Transactions view improvements
- Add filter for "vsync id" column
- Add "what" column to transaction log view
- Allow scrolling through long filter options

Fix: b/258213078
Fix: b/261457085
Test: npm run build:all && npm run test:all
Change-Id: Ie4e047a76a72bb5941e3fe3088968178fbbd737a
2022-12-27 08:41:54 +00:00
Nataniel Borges
67dda587bb Update dependencies to fix security vulnerability
npm audit report:

jsonwebtoken  <=8.5.1
Severity: high
jsonwebtoken has insecure input validation in jwt.verify function - https://github.com/advisories/GHSA-27h2-hvpr-p74q
jsonwebtoken's insecure implementation of key retrieval function could lead to Forgeable Public/Private Tokens from RSA to HMAC - https://github.com/advisories/GHSA-hjrf-2m68-5959
jsonwebtoken vulnerable to signature validation bypass due to insecure default algorithm in jwt.verify() - https://github.com/advisories/GHSA-qwph-4952-7xr6
jsonwebtoken unrestricted key type could lead to legacy keys usage  - https://github.com/advisories/GHSA-8cf7-32gw-wr33
fix available via `npm audit fix --force`
Will install auth0@3.0.1, which is a breaking change
node_modules/jsonwebtoken
  auth0  2.13.0 - 3.0.0
  Depends on vulnerable versions of jsonwebtoken
  Depends on vulnerable versions of jwks-rsa
  node_modules/auth0
  jwks-rsa  1.5.1 - 1.12.3
  Depends on vulnerable versions of jsonwebtoken
  node_modules/jwks-rs

Test: npm install && npm run build:all && npm run test:unit
Change-Id: I47dfb353718cd3c40dd7060d2c31cb5e1ebaec43
2022-12-23 15:55:25 +00:00
Kean Mariotti
70945707bd Use only 'stableId' to identify Layer/WindowState
The RectsComponent and TreeComponent used to rely on the `id` property
instead of `stableId` to identify elements of type Layer/WIndowState.
This created issues in cases where an element doesn't provide an `id`,
e.g. root layer.

Fix: b/263554032
Test: npm run build:all && npm run test:all
Change-Id: If296baa5402b100f67f5326a065ef569aaf2b842
2022-12-23 09:19:44 +00:00
Kean Mariotti
653c91a241 Merge changes I0345e5d1,I64c8a80b
* changes:
  Support panning in rects view
  Rename Angular components internal/wrapped properties
2022-12-22 12:59:55 +00:00
Nataniel Borges
d763256765 Merge "Use display cutout from proto dump" 2022-12-21 19:51:33 +00:00
Kean Mariotti
a8d7d1e2d1 Support panning in rects view
Implement rects view panning through mouse drag and drop.

Fix: b/258605234
Test: npm run build:all && npm run test:all
Change-Id: I0345e5d10d9076f66a2de36e4914b641aecded91
2022-12-21 17:09:46 +00:00
Nataniel Borges
e51bfdcff8 Merge "Format transaction trace properties" 2022-12-21 16:52:01 +00:00
Kean Mariotti
69a16f877a Rename Angular components internal/wrapped properties
A Christmas present for pablogamito@

Test: npm run build:all && npm run test:all
Change-Id: I64c8a80b02de61874e56ea33eeb99f7a0d4afe9b
2022-12-21 16:28:33 +00:00
Nataniel Borges
09f1cc0ace Format transaction trace properties
Fixes: 254054329
Test: npm run build:all && npm run test:unit
Change-Id: Icc87ff69e1c4e2cd992b7593029e60bde22d0c7b
2022-12-21 16:18:14 +00:00
Kean Mariotti
f597e68d34 Fix accesses to undefined
Test: npm run build:all && npm run test:all
Change-Id: Ib9cf62f198d74edafb8ae7633caf6d9b24103758
2022-12-21 14:42:01 +00:00
Kean Mariotti
2914f330ce Display filename of active view/trace (if available)
- Search filename of active view (if available) and display it in the toolbar (page top-center)
- Rename TraceViewComponent's event emitters as specified in Angular style guides

Fix: b/258214773
Test: npm run build:all && npm run test:all
Change-Id: I05abb10a9c78ffc8c3208ba081251d068a17a5a7
2022-12-21 14:42:01 +00:00
Kean Mariotti
fe1436577c Fix broken build
Test: npm run build:all && npm run test:all
Change-Id: I4abc5c0c2f6c143fda6aa500e4583e83ce85e878
2022-12-21 14:42:01 +00:00
Kean Mariotti
3cad346079 Merge "Remove noisy log message" 2022-12-21 14:18:50 +00:00
TreeHugger Robot
7f0a53e6be Merge "Fix show default formatting for WM and SF traces" 2022-12-21 11:43:04 +00:00
Nataniel Borges
c3e098b7fc Merge "Show occluded layers in SF view by default" 2022-12-21 11:40:24 +00:00
Nataniel Borges
707aadb98a Use display cutout from proto dump
Bug: 262390300
Test: atest FlickerLibTest
Change-Id: I03a7f85ee34fcbbe88df693e5787ba93709db716
2022-12-21 10:13:43 +00:00
Nataniel Borges
5cef50c328 Fix show default formatting for WM and SF traces
Now the checkbox shows false/0 values when checked.

Side effect: now transaction trace shows all properties. It should have
a checkbox similar to SF/WM trace to show only the meaningful values

Bug: 254054329
Test: npm run test:unit
Change-Id: I0f88dc3870c8863756a49f9a3698eb4d6d4bed58
2022-12-21 10:13:35 +00:00
Kean Mariotti
366106e8c7 Remove noisy log message
Test: npm run build:all && npm run test:all
Change-Id: I4446a0feef3d044a23a4f183d5f2c494342234d3
2022-12-21 08:13:27 +00:00