Commit Graph

3998 Commits

Author SHA1 Message Date
Kean Mariotti
bfb80775a6 Improve rects view code health
Fix: b/254244305
Test: npm run test:component
Change-Id: Iac424696b4351dc22c2f802d19aff6d7b029556c
2022-10-21 09:55:15 +00:00
Kean Mariotti
fe3458851f Improve rects view
- Labels have typography consistent with the rest of Winscope
- Fix labels position - get rid of fragile hardcoded x-axis shifts

Fix: b/251785717
Test: run "npm run start", load SF trace, check layers labels
Change-Id: Id32b31f3bf66e4096fedfb3369f6df479f4e0c47
2022-10-21 09:19:18 +00:00
Kean Mariotti
9815ff5c32 Remove blank space in properties view
- WindowManager viewer
- IME viewers

Fix: b/254437771
Test: load WM + IME traces in winscope, click on an entry in the hierarchy view, check that there is no blank space in the properties view between controls on top (filter) and the properties (tree) view below
Change-Id: I943433b594e91d4d6323af50087002b42d324d40
2022-10-21 09:19:18 +00:00
Kean Mariotti
5137d1ae45 Fix npm package vulnerability
The previous version of terser was volnerable to ReDos attacks.

Test: npm audit
Change-Id: I0ceda6931e68ad4338f7b382bfc6866812315e08
2022-10-21 09:19:18 +00:00
Kean Mariotti
0fa0e6070b Add prettier
Test: npm run prettier
Change-Id: Ie15a2104be13ccf37ca155c334fdd2798bad539f
2022-10-21 09:19:18 +00:00
Kean Mariotti
fd6c1bdf85 Merge "Add viewer Transaction" 2022-10-21 09:18:10 +00:00
Kean Mariotti
81c2db9a67 Add viewer Transaction
Fix: 238088678
Test: npm run build:all && npm run test:all
Change-Id: I90ad36a0a18e3b68216ea18d2a47e3ff38d98412
2022-10-21 08:13:54 +00:00
Kean Mariotti
fe5c7132de Remove obsolete dependencies to legacy transactions proto
Fix: b/254653004
Test: yarn build
Change-Id: I864c3c3a6a8524e54e363398f17403db7e81c0a6
2022-10-20 16:39:09 +00:00
Kean Mariotti
00c160c5fd Merge "Add viewer ProtoLog" 2022-10-20 15:23:52 +00:00
TreeHugger Robot
1838d44fcd Merge "Add InputWindowInfoProto to proto parsing" 2022-10-18 14:12:07 +00:00
TreeHugger Robot
b125034389 Merge "Add support to PositionProto in ObjectFormatter" 2022-10-18 12:32:47 +00:00
Nataniel Borges
e7cd8fc412 Add InputWindowInfoProto to proto parsing
The field is not registered as an IntDef but uses the same values as
LayeoutParams according to code codumentation

Test: npm run test:all && open a layers trace and check if
inputWindowInfo has a value and if the flags are correctly formatted

Change-Id: I868e1b3088cf9925c50faf0decce2da1f584288d
2022-10-17 16:56:59 +00:00
Nataniel Borges
26c8956a45 Add support to PositionProto in ObjectFormatter
Fixes: 254057780
Test: run winscope and open a SF trace
Change-Id: If69e4c135129b9c38f5a461eb73c3a74769f9425
2022-10-17 16:54:18 +00:00
Kean Mariotti
1fbdd3efaa Add viewer ProtoLog
Fixes: 251159338
Test: npm run build:all && npm run test:all
Change-Id: Ibd6774ed0bf2bc91a5d128eb8258ed4073279166
2022-10-17 10:26:03 +00:00
Kean Mariotti
ef2a794a0c Improve hierarchy component test
Test: npm run test:component
Change-Id: I36bf2d3f124a2d373e9ab37eadbe4144765edd02
2022-10-16 16:32:48 +00:00
Kean Mariotti
5638bf799b Improve binary search of timestamps
In case of repeated/equal timestamps, the first occurrence is the search's result.

Test: npm run build:unit && npm run test:unit
Change-Id: If15a7c815c654a3c6ad53c6626b9a89fcb536bff
2022-10-16 16:32:48 +00:00
Kean Mariotti
f20b6e475b Update icon
Test: start winscope and admire the new icon
Change-Id: Ica350d3ea8ae6f4db902fe99f6251b11b16c7df7
2022-10-14 11:50:14 +00:00
Cosmin Băieș
7fa68d374e Use flex instead of fixed sizes
Bug: 251087601
Test: npm run and check scaling with different screen sizes
Change-Id: I18efdd1250f0598ca2a01414dfa24e25b2bd6232
2022-10-13 18:47:46 +02:00
Vishnu Nair
bda80defc3 Winscope: replace isbufferlayer checks with buffer not empty
Layer types are deprecated.

Test: open traces with winscope and check buffer info is visible
Bug: 238781169
Change-Id: I1f1aeae4e86a2d44a7125dd03d31271d1b143a75
2022-10-05 17:06:10 +00:00
Treehugger Robot
e7cb38929e Merge "idegen: Migrate try-finally to try-with-resources for Configuration.java" am: f8a1fc304c am: e6b29979c9 am: 9d969a890e am: 831d03cfb6 am: c63265f6be
Original change: https://android-review.googlesource.com/c/platform/development/+/2237051

Change-Id: I64fd8c8011f0fcbf3a928b2a05d895b99a36a57a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-03 07:48:21 +00:00
utzcoz
e381c93d13 idegen: Migrate try-finally to try-with-resources for Configuration.java
Test: run idegen.sh to generate files for IntelliJ without error

Signed-off-by: utzcoz <utzcoz@gmail.com>
Change-Id: If1066d236ef44aff6b9f73a40751ad232a80f6f9
2022-10-01 10:04:48 +00:00
Treehugger Robot
143460473c Merge "idegen: Handle symbolic link that targets to current or parent directory" am: d6c9ae2806 am: e78fac030c am: 517c07c85e am: 7db63833a3 am: e49b237676
Original change: https://android-review.googlesource.com/c/platform/development/+/2203929

Change-Id: Id1ab370fdf046d773edf9dc7b2ab45885f7f1399
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-30 08:38:33 +00:00
Treehugger Robot
d6c9ae2806 Merge "idegen: Handle symbolic link that targets to current or parent directory" 2022-09-30 06:23:50 +00:00
Priyanka Patel
0c8cdf9609 IME Viewers - Table of IME properties and SF/WM.
Add extra properties to IME viewers from the IME traces and SF/WM
traces.

Bug: b/238088679
Test: npm run test:all

Change-Id: I177fc7353f963cc8b1391a88d5d8f4b2e4f387fa
2022-09-28 09:02:35 +00:00
Priyanka Patel
32c0ee72db IME Viewers.
IM Clients, Service and Manager Service viewers - not yet including new
WM/SF combined properties view in hierarchy.

Bug: b/238088679
Test: npm run test:all

Change-Id: I4bd05ca5dff14abbf6d3a89b0e07730233edf1b0
2022-09-26 09:44:43 +00:00
Kean Mariotti
d1a7418db6 Remove chips from trace data types
Test: npm run build:all && npm run test:all
Change-Id: If2d0f70529b377404fa23d4a1c15ef5045e4a12b
2022-09-24 14:03:04 +00:00
Kean Mariotti
0a2c4a07a5 Refactor tree utils
Refactor tree utils for proper reuse from IME viewers:
- add common/trace/trace_tree_node (factored out from viewers)
- rename renaming viewers/common/tree_utils -> viewers/common/ui_tree_utils
- add common/utils/tree_utils: generic tree utils reused from "trace" and "ui"

Bug: 238088679
Test: npm run build:all && npm run test:all
Change-Id: Ib14dd3495dc7e91e3a0eef2fdc20efa27fe1ef2e
2022-09-23 14:57:15 +00:00
utzcoz
97a3f307a6 idegen: Handle symbolic link that targets to current or parent directory
Test: run idegen.sh to generate files for IntelliJ without error

Signed-off-by: utzcoz <utzcoz@gmail.com>
Change-Id: I80958e94f93a8e1ef546bc34bd929d04a224dc9e
2022-09-21 22:03:49 +08:00
Priyanka Patel
2597772279 Merge changes I2ab79fe4,I582d7c0d
* changes:
  Add ime_utils.ts
  Refactor tree_utils.ts
2022-09-20 09:40:47 +00:00
Krzysztof Kosiński
6b29d5190d Merge "Remove Python enables identical to global defaults." am: 5acfb41d4a am: 6fdc0d453f am: 0663a35093 am: f91c90e81c am: c6b947d357
Original change: https://android-review.googlesource.com/c/platform/development/+/2220481

Change-Id: Iebf42441eebcd9c0acde69abf7e332cc3b8db965
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-19 19:04:49 +00:00
Kean Mariotti
9b22ee7ee4 Add ime_utils.ts
Fixes: 238090771
Test: npm run build:unit && npm run test:unit
Change-Id: I2ab79fe44b9626cb764d22a62aa9fa5955a6adc4
2022-09-19 09:46:00 +00:00
Kean Mariotti
82c8561f8b Refactor tree_utils.ts
Test: npm run build:all && npm run test:all
Change-Id: I582d7c0df5da93e49efae5a5dad9d38732bd169a
2022-09-19 09:42:28 +00:00
Krzysztof Kosiński
45c7ebda06 Remove Python enables identical to global defaults.
Bug: 245854393
Test: presubmit
Change-Id: I9bb5cbd972432a26afcb13d7c2a6bbc73fb0991f
2022-09-17 11:33:50 +00:00
Priyanka Patel
d7e342220d Refactor Tree Generator/Transformer.
Properly type all the tree utils.

Bug: b/246498545
Test: npm run test:all
Change-Id: I715e5b1cdc103fda228aac492e7d4c368601803c
2022-09-16 15:22:05 +00:00
Priyanka Patel
cbb5a19e5f Better controls on rects view.
Rect labels are clickable. Pan added via right click and drag, zoom added via scroll.

Bug: b/245914589
Test: npm run test:all
Change-Id: I49ffd26b1c735390960e6b523acf3070951c903d
2022-09-15 12:44:49 +00:00
Priyanka Patel
00b3c32e40 Window Manager viewer
Creating WM viewer and refactoring some of the generic components to
ensure their re-use.

Bug: b/238086082
Test: npm run test:all
Change-Id: Ib47a7c96f8966f642ef947ac5c35abb60dfff569
2022-09-15 12:40:59 +00:00
Priyanka Patel
d3b42718c3 Viewer Cleanup.
Marking functions as private/public, tidying up.

Bug: b/238089034
Test: npm run test:all
Change-Id: I74f67fb834ddfc972df32924c691cefe3cd1a537
2022-09-13 15:25:14 +00:00
Priyanka Patel
aa03ccf61b Add spec tests.
Test presenter separately to ensure ui data properly updated after each
public method. Test tree transformer. Extend tests for tree generator.
Test trace coordinator.

Bug: b/238089034
Test: npm run test:unit
Change-Id: Icf7770f3310d39903f42c7b12e030946afd6cd14
2022-09-13 14:02:16 +00:00
Priyanka Patel
c9c1961f97 Support zip file upload, add snackbar messages.
In addition to above, refactored some of the typing so that File rather
than Blob is used by the parsers.

Bug: b/244297039
Test: upload zip file attached to trace
Change-Id: I85918fdd2640f249dbc7c8a69c8a3d63a34d26d1
2022-09-13 12:54:20 +00:00
Priyanka Patel
a5607fc269 Update Main Winscope UI.
Update to match figma designs for the viewer section - app toolbar, tabs
for different viewers, etc.

Bug: b/244715720
Test: npm run test:all. also upload any trace to see what it looks like
Change-Id: I85b64e4a660fd30c6d71eb8ef3cb3b45c37a2943
2022-09-13 12:54:11 +00:00
Treehugger Robot
8d6723e53f Merge "Add comments to ninja_metrics.proto" am: 511583f2b3 am: 05a56ece6d am: ef0ca87692 am: 2c974958a0 am: 0445f65558
Original change: https://android-review.googlesource.com/c/platform/development/+/2216241

Change-Id: I211176799a5ed3960ce859f03dc6cd8cbd7a4acf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-13 05:23:57 +00:00
Justin Yun
8e0560c601 Add comments to ninja_metrics.proto
Bug: 241033491
Test: na
Change-Id: I421189fbcdd05f5d7b7e20e1a772c23abfd37f1e
2022-09-13 09:57:04 +09:00
Kean Mariotti
c239d8777e Upgrade protobufjs (6.11.2 -> 6.11.3)
The previous protobufjs version had a bug that triggered an exception while loading/decoding SF state dumps.

Test: capture Surface Flinger dump as follows
    - Enter PiP, e.g. start maps navigation and exit the app
    - Press on the PiP window to make the PiP menu appear
    - Dump state SF in winscope

Change-Id: I33ea12f681ce8b8b95f78df3454db687beffb9d7
2022-09-12 07:21:23 +00:00
Priyanka Patel
363fadfae3 (Properties View) Create viewer for SF traces.
Created the viewer component for SF traces, including rects view,
properties view, hierarchy view (for re-use in other apps). This CL
contains properties view and changes to associated reusable components.
Currently follows same design as go/winscope-beta.

Bug: b/238089034 b/232081297
Test: npm run test:all. upload/run any SF trace to see what it looks
like.

Change-Id: I6f9f0b1002ab9901f1aee113cbb0fef4cbd078a6
2022-09-06 16:41:12 +00:00
Priyanka Patel
f392dc6d0d Fix canvas crashing issue.
Bug: b/238089034
Test: npm run test:all
Change-Id: I5ba4f7e21bc294de9135a7debd150dab19a24c40
2022-09-01 09:49:28 +00:00
Priyanka Patel
d4ab0b3a11 Homepage Updated UI.
Updated homepage from new figma designs.

Bug: b/244297039

Test: npm run test:all
Change-Id: Ib165974752b4afeb83bc808faf910552e031f269
2022-08-31 15:05:33 +00:00
Kean Mariotti
3d461b7246 workaround to support node 18.6.0's openssl
Webpack 4.46 is not compatible with node 18.6.0's openssl and this commit introduces
the unsecure workaround of specifying NODE_OPTIONS=--openssl-legacy-provider

Note: we can't easily upgrade to webpack 5.*, because some dependencies
(e.g. Kotlin/JS webpack plugin) are incompatible with Webpack 5.*

Test: yarn build
Change-Id: I0a367ece0d6e9bf39f9bbc8709527f47064e4dd3
2022-08-30 14:27:56 +00:00
Kean Mariotti
2bb516d045 finish huilingshi@'s vue-material downgrade
Test: yarn install
Change-Id: Ie2b5b8b28d5451033862b080205f93dccbc7a10f
2022-08-30 14:27:44 +00:00
Priyanka Patel
e8869cab93 Merge "(Hierarchy View) Create Viewer for surface flinger traces." 2022-08-30 10:54:04 +00:00
Priyanka Patel
6e50f90cd7 (Hierarchy View) Create Viewer for surface flinger traces.
Created the viewer component for SF traces, including rects view,
properties view, hierarchy view (for re-use in other apps). This CL
contains hierarchy view and associated reusable components.

Bug: b/238089034 b/232081297
Test: npm run test:all. upload/run any SF trace to see what it looks
like.

Change-Id: I3dd7c3f73ac7d7dac9b65d5fc7853e9fc8b8e56e
2022-08-30 09:15:55 +00:00