Commit Graph

3024 Commits

Author SHA1 Message Date
Martin Stjernholm
c611ab31bf Merge "Support <include> directives in manifests."
am: ed31855802

Change-Id: I31034b5f65fa75bfbcd18f26464510e88e470b10
2019-08-29 14:26:17 -07:00
Martin Stjernholm
0c28099695 Support <include> directives in manifests.
Test: "development/tools/repo_pull/repo_pull.py pull ..." on a large topic
  from a manifest with includes.
Bug: 140113116
Change-Id: I781c9a3ca0bcdf53cc8ed1896b3ec12389e4e797
2019-08-27 18:45:46 +01:00
Vishnu Nair
b5568bfcc8 WinScope: Support missing layers
The new sf layer transform changes breaks when missing layers are added since they do not contain transform
data. Fix this is by adding a transform when creating missing layers.

Also set the transform type when populating transform matrices so they are displayed as IDENTITY.

Test: Open trace from bug
Fixes: 130886882
Merged-In: I85f52bd3dc9174499c4a4840c6b5e80555f28fc7
Change-Id: I85f52bd3dc9174499c4a4840c6b5e80555f28fc7
2019-06-18 12:59:15 +00:00
Vishnu Nair
7f45d5d5ec Winscope: Fix how layers with transforms and positions are rendered
Currently position is applied to the layer bounds before applying the transform. The bounds
are also not bounded by parent bounds.

Change the logic to use the calculated layer bounds and apply the transform with position when
rendering the layer on screen.
Keep existing logic to view traces before layer bounds were added.

Bug: 128925841
Test: open winscope with old (P) and new trace (Q ToT). Check if layers are rendered correctly when rotated.
Merged-In: Ia91262e4dfe3e8ad647acf8e0cf961e270441cde
Change-Id: Ia91262e4dfe3e8ad647acf8e0cf961e270441cde
2019-06-18 12:59:07 +00:00
Vishnu Nair
47c7571f0b WinScope: Modify instead of replacing proto objects
Converting the proto object inorder to set the enum string values
or display default values replaces existing proto objects and its
properties which maybe used by the formatter function.

Instead replace toObject method with a custom one that limits
modifications to the existing proto objects.

Test: run WinScope and check WM and SF traces

Merged-In: Ie084d288aaf569476f1e9284c3a9c8a06364a61a
Change-Id: Ie084d288aaf569476f1e9284c3a9c8a06364a61a
2019-06-18 12:58:28 +00:00
Nataniel Borges
4e524b0b78 Support SF traces without any layers (needed when booting SF)
When using continuous logging and having the trace enabled by default,
the first entries have no layers and crash Winscope.

Test: Flash a device with SF tracing enabled by default. Record the
initial trace. Open trace in Winscope.

Merged-In: I693815ff3e6468291770d3e8197e21bf75a2a87a
Change-Id: I693815ff3e6468291770d3e8197e21bf75a2a87a
2019-06-18 12:58:09 +00:00
Vishnu Nair
5c006d104a Winscope: Translate layer flags in Surface flinger dump
Test: Open sf trace and check if flags are translated
Fixes: 127436444
Merged-In: If696d33054ae566d209b769427f5681d4e1ff876
Change-Id: If696d33054ae566d209b769427f5681d4e1ff876
2019-06-18 12:58:02 +00:00
Nataniel Borges
d122ad83ff Update Display default checkbox label
Replace label for `Show default properties` and add tooltip explaining
what this checkbox is used for

Test: Open winscope
Merged-In: I39de3e1d7c203d5273084bd54c4d2f749e8e6f5f
Change-Id: I39de3e1d7c203d5273084bd54c4d2f749e8e6f5f
2019-06-18 12:57:56 +00:00
Nataniel Borges
7f63847ec5 Add Type to transform objects.
Add a type, based on the framework/native definitions, to the transform
objects.

If the transform matrix can be reconstructed from the type (identity,
translate, rotate 0/90/180/270) it should not be stored on the protobuf,
but should instead be reconstructed on Winscope.

Test: Record a Proto3 SF trace. Open it without displaying default
values in Winscope. Check if it is correct. Select a legacy trace. Open
it in Winscope. Check is it is also correct.

Merged-In: I03744efba2c8740d7c543f6793bce0ba7bf6d975
Change-Id: I03744efba2c8740d7c543f6793bce0ba7bf6d975
2019-06-18 12:57:47 +00:00
Nataniel Borges
eacb719985 Fix visibility rule for SF traces on Winscope
When traces don't have a visible region object assigned winscope crashes
while loading a SF trace.

Test: Open a SF trace without a visible region object on winscope. It
should no longer crash

Merged-In: I7919a0301ccfb6a0811fd15feb718c8ac0b210b1
Change-Id: I7919a0301ccfb6a0811fd15feb718c8ac0b210b1
2019-06-18 12:57:40 +00:00
Nataniel Borges
f1e0f50a01 Allow SF traces to omit default values on the property list
The C++ proto2 implementation write the default values ot the file.
Until the surface flinger dump is updated to proto3, this implementation
will not have any effect.

Test: (Un)Check the `display defaults` checkbox. Load a file. If the
checkbox is unchecked, default values should not appear on winscope,
otherwise they should appear.

Merged-In: I2432966f3e14aba5fc1dee26d5a09c743406b417
Change-Id: I2432966f3e14aba5fc1dee26d5a09c743406b417
2019-06-18 12:57:33 +00:00
Nataniel Borges
10ef665c58 Fix "TypeError: Cannot read property 'x' of null" on SF traces
The protobuf definition allows the position attribute not to be defined.
Winscope crashes if the position is not defined, instead of assuming it
as (x: 0, y: 0)

Test: Load a SF protobuf object without the position attribute. Check if
Winscope does't crash while loading it.

Merged-In: Ib12ba7875f1e7b22819274c1cd9961a1dbfe82cf
Change-Id: Ib12ba7875f1e7b22819274c1cd9961a1dbfe82cf
2019-06-18 12:57:26 +00:00
Nataniel Borges
31e6237fdb Display only elements actually visible on the screen as "Visible"
Use the visibleRegion property to determine if a layer is visible on
the screen or not. Elements may have a size and a crop but be displayed
below another.

While the visible option cannot be used to render the elements due to
transforms, it only has a value if the element is displayed on the
screen.

Note that elements may still not appear on the screen as all their
visible regions are below the screen (right < 0 or bottom < 0)

Test: Open trace in winscope, check if only layers visible on the screen have a visible chip and are displayed.
Merged-In: I75137a5057a5bda96db887b110b053e64b49f885
Change-Id: I75137a5057a5bda96db887b110b053e64b49f885
2019-06-18 12:57:19 +00:00
Nataniel Borges
38a1bf9a7b Display SF layer based on size, crop & parent instead of buffer size
It is no longer possible to use only the size property because Color
layers do not set a buffer size.

Use the following rule to highlight the selected layers on the UI:
- If the layer has a size and a crop, use their intersection.
- Else, if the layer has no size, but has crop, use the crop as size
- Else, use the parent size

Bug: 121198524
Test: Open trace in winscope, select visible layer, check if highlighted
Merged-In: I55298f20efa31830097a41d45d8d8b1c6b4ed2e6
Change-Id: I55298f20efa31830097a41d45d8d8b1c6b4ed2e6
2019-06-18 12:57:11 +00:00
Vishnu Nair
f27cb3c0b4 WinScope: Support boundless surfaces in WinScope
SurfaceFlinger trace relies on Display Root#0 layer size to set the display bounds. This layer will
no longer have a size once b/114413815 is fixed. Instead, sf transform will set the bounds to undefined and the
bounds be calculated to be the union of the layer sizes.
see: http://x20web/teams/android-window-manager/winscope/winscope-staging-vishnun.html
Bug: 114413815
Test: build winscope and open trace

Merged-In: Ic04d524f0e095374321ef818f0d0ff420a2d3827
Change-Id: Ic04d524f0e095374321ef818f0d0ff420a2d3827
2019-06-18 12:57:04 +00:00
Vishnu Nair
38ed9eb5d7 Winscope: Use a unique stableId for all layers and wm entries
Top level of the hierarchy contains the entry with a timestamp. When
navigating the timeline with arrow keys, entry loses focus since
the timestamp changes.

See: https://android-window-manager.teams.x20web.corp.google.com/winscope/winscope-staging-vishnun.html

Test: Open trace in winscope, click on entry & navigate timeline with arrow keys
Merged-In: Ifbd88da717354c66d96a05d25a9d619fa5209e26
Change-Id: Ifbd88da717354c66d96a05d25a9d619fa5209e26
2019-06-18 12:56:57 +00:00
Adrian Roos
80ad0baa5b Winscope: keep backwards compatibility prior to windowFrames
We should still be able to properly render traces taken prior to the WindowFrames
refactor - if the property is not available, use the legacy property instead.

Test: yarn run dev
Merged-In: Ie10f7d14ac5673e8be844d2d5a4fa752d502b9df
Change-Id: Ie10f7d14ac5673e8be844d2d5a4fa752d502b9df
2019-06-18 12:56:49 +00:00
chaviw
c3ab197057 Use windowFrames.frame instead of frame to draw the area.
The code is changed so the frame protobuf is now under another class
called windowFrames. Update the js code so it can properly draw the
frame with the new code change.

Test: Ran on localhost with updated protobuf file
Bug: 111359087
Merged-In: I072daae54601120de5b6eaa0a64ee7c3096e4a43
Change-Id: I072daae54601120de5b6eaa0a64ee7c3096e4a43
2019-06-18 12:56:42 +00:00
Kevin DuBois
d8fcba313b Winscope: fix .pb location for sf traces
Trace location was incorrect. Changing to correct location.

Test: run capture_sf_trace.sh, upload to winscope, see trace

Merged-In: Ia84501014e6cf83d2fb1d167c1a7aac8b64a06d4
Change-Id: Ia84501014e6cf83d2fb1d167c1a7aac8b64a06d4
Fixes: b/110715663
2019-06-18 12:56:35 +00:00
Adrian Roos
a6e652ac81 Winscope: apply surface transforms in preview
Test: capture surface trace of screen rotation animation, verify it shows correctly.
Merged-In: Ia9528401a0d8542266a7898be6d032a6cf166946
Change-Id: Ia9528401a0d8542266a7898be6d032a6cf166946
2019-06-18 12:56:27 +00:00
Vishnu Nair
1a59a9b592 WinScope: Show IME windows
Test: Check trace with IME windows shown

Merged-In: If69e1bc340c0c79a5fb07385cc6921dd093e8fc2
Change-Id: If69e1bc340c0c79a5fb07385cc6921dd093e8fc2
2019-06-18 12:56:16 +00:00
Adrian Roos
2af3a86382 WinScope: Properly show child windows.
Merged-In: I188bb2c327bc61c309f7e3e3746f0af4241a94a9
Change-Id: I188bb2c327bc61c309f7e3e3746f0af4241a94a9
2019-06-18 12:51:23 +00:00
Vishnu Nair
aace7b7129 Merge "WinScope: Support missing layers" into qt-dev
am: ceaa4b38bb

Change-Id: I766685ceeec30373a32c43e0af9ae43f03f4a2b8
2019-04-19 15:12:13 -07:00
Vishnu Nair
4c71de20a8 WinScope: Support missing layers
The new sf layer transform changes breaks when missing layers are added since they do not contain transform
data. Fix this is by adding a transform when creating missing layers.

Also set the transform type when populating transform matrices so they are displayed as IDENTITY.

Test: Open trace from bug
Fixes: 130886882
Change-Id: I85f52bd3dc9174499c4a4840c6b5e80555f28fc7
2019-04-19 10:18:08 -07:00
Colin Cross
cf6423f70d Update idegen for guava 27.1
Objects.toStringHelper has been replaced with
MoreObjects.toStringHelper.

Bug: 130306229
Test: m checkbuild
Change-Id: I0110d355aa071f3f5c8174c7dfa3c8403ac8f596
Merged-In: I0110d355aa071f3f5c8174c7dfa3c8403ac8f596
Exempt-From-Owner-Approval: cherry pick
(cherry picked from commit 9502c0fe6a)
2019-04-15 21:44:57 -07:00
Colin Cross
9502c0fe6a Update idegen for guava 27.1
Objects.toStringHelper has been replaced with
MoreObjects.toStringHelper.

Bug: 130306229
Test: m checkbuild
Change-Id: I0110d355aa071f3f5c8174c7dfa3c8403ac8f596
2019-04-11 16:38:07 -07:00
Aurimas Liutikas
788e18625a Merge "idegen: Add darwin support for index-gen" am: ad14f556e2 am: 7af51100c6
am: b3ee377578

Change-Id: I04418a4bad42c67aeb4ad44d560ed94cdf4c80c0
2019-04-03 03:01:04 -07:00
Brandon McAnsh
66e5fb0f7f idegen: Add darwin support for index-gen
Change-Id: I1f4490bc224a4275a6345bbfae92b9fdc62bde3e
Signed-off-by: Brandon McAnsh <brandon@moblabs.com>
2019-03-22 14:49:46 -04:00
Vishnu Nair
13f8d14dd3 Winscope: Fix how layers with transforms and positions are rendered
Currently position is applied to the layer bounds before applying the transform. The bounds
are also not bounded by parent bounds.

Change the logic to use the calculated layer bounds and apply the transform with position when
rendering the layer on screen.
Keep existing logic to view traces before layer bounds were added.

Bug: 128925841
Test: open winscope with old (P) and new trace (Q ToT). Check if layers are rendered correctly when rotated.
Change-Id: Ia91262e4dfe3e8ad647acf8e0cf961e270441cde
2019-03-19 17:10:48 -07:00
TreeHugger Robot
5434b295d0 Merge "WinScope: Modify instead of replacing proto objects" 2019-03-08 21:21:59 +00:00
Nataniel Borges
55bece9c22 Support SF traces without any layers (needed when booting SF)
When using continuous logging and having the trace enabled by default,
the first entries have no layers and crash Winscope.

Test: Flash a device with SF tracing enabled by default. Record the
initial trace. Open trace in Winscope.

Change-Id: I693815ff3e6468291770d3e8197e21bf75a2a87a
2019-03-08 09:41:04 -08:00
Vishnu Nair
8175a12c8d WinScope: Modify instead of replacing proto objects
Converting the proto object inorder to set the enum string values
or display default values replaces existing proto objects and its
properties which maybe used by the formatter function.

Instead replace toObject method with a custom one that limits
modifications to the existing proto objects.

Test: run WinScope and check WM and SF traces

Change-Id: Ie084d288aaf569476f1e9284c3a9c8a06364a61a
2019-03-06 21:44:47 +00:00
Vishnu Nair
b24b5af37c Winscope: Translate layer flags in Surface flinger dump
Test: Open sf trace and check if flags are translated
Fixes: 127436444
Change-Id: If696d33054ae566d209b769427f5681d4e1ff876
2019-03-05 09:37:35 -08:00
Nataniel Borges
83d03e1eae Update Display default checkbox label
Replace label for `Show default properties` and add tooltip explaining
what this checkbox is used for

Test: Open winscope
Change-Id: I39de3e1d7c203d5273084bd54c4d2f749e8e6f5f
2019-02-27 14:31:54 -08:00
Nataniel Borges
b810df4bf4 Add Type to transform objects.
Add a type, based on the framework/native definitions, to the transform
objects.

If the transform matrix can be reconstructed from the type (identity,
translate, rotate 0/90/180/270) it should not be stored on the protobuf,
but should instead be reconstructed on Winscope.

Test: Record a Proto3 SF trace. Open it without displaying default
values in Winscope. Check if it is correct. Select a legacy trace. Open
it in Winscope. Check is it is also correct.

Change-Id: I03744efba2c8740d7c543f6793bce0ba7bf6d975
2019-02-27 13:10:31 -08:00
Nataniel Borges
ff8f10348f Fix visibility rule for SF traces on Winscope
When traces don't have a visible region object assigned winscope crashes
while loading a SF trace.

Test: Open a SF trace without a visible region object on winscope. It
should no longer crash

Change-Id: I7919a0301ccfb6a0811fd15feb718c8ac0b210b1
2019-02-20 16:49:30 -08:00
Nataniel Borges
2f0f088d9d Allow SF traces to omit default values on the property list
The C++ proto2 implementation write the default values ot the file.
Until the surface flinger dump is updated to proto3, this implementation
will not have any effect.

Test: (Un)Check the `display defaults` checkbox. Load a file. If the
checkbox is unchecked, default values should not appear on winscope,
otherwise they should appear.

Change-Id: I2432966f3e14aba5fc1dee26d5a09c743406b417
2019-02-19 13:45:13 -08:00
Nataniel Borges
f6095a82fa Fix "TypeError: Cannot read property 'x' of null" on SF traces
The protobuf definition allows the position attribute not to be defined.
Winscope crashes if the position is not defined, instead of assuming it
as (x: 0, y: 0)

Test: Load a SF protobuf object without the position attribute. Check if
Winscope does't crash while loading it.

Change-Id: Ib12ba7875f1e7b22819274c1cd9961a1dbfe82cf
2019-02-14 15:37:30 -08:00
Nataniel Borges
591618c8b5 Display only elements actually visible on the screen as "Visible"
Use the visibleRegion property to determine if a layer is visible on
the screen or not. Elements may have a size and a crop but be displayed
below another.

While the visible option cannot be used to render the elements due to
transforms, it only has a value if the element is displayed on the
screen.

Note that elements may still not appear on the screen as all their
visible regions are below the screen (right < 0 or bottom < 0)

Test: Open trace in winscope, check if only layers visible on the screen have a visible chip and are displayed.
Change-Id: I75137a5057a5bda96db887b110b053e64b49f885
2019-01-07 10:14:48 -08:00
Nataniel Borges
2d20ae0d76 Display SF layer based on size, crop & parent instead of buffer size
It is no longer possible to use only the size property because Color
layers do not set a buffer size.

Use the following rule to highlight the selected layers on the UI:
- If the layer has a size and a crop, use their intersection.
- Else, if the layer has no size, but has crop, use the crop as size
- Else, use the parent size

Bug: 121198524
Test: Open trace in winscope, select visible layer, check if highlighted
Change-Id: I55298f20efa31830097a41d45d8d8b1c6b4ed2e6
2019-01-07 10:11:19 -08:00
Vishnu Nair
9a7231033b WinScope: Support boundless surfaces in WinScope
SurfaceFlinger trace relies on Display Root#0 layer size to set the display bounds. This layer will
no longer have a size once b/114413815 is fixed. Instead, sf transform will set the bounds to undefined and the
bounds be calculated to be the union of the layer sizes.
see: http://x20web/teams/android-window-manager/winscope/winscope-staging-vishnun.html
Bug: 114413815
Test: build winscope and open trace

Change-Id: Ic04d524f0e095374321ef818f0d0ff420a2d3827
2018-11-28 15:04:08 -08:00
Junyu Lai
a7a941bf54 Merge "Add C++ support for coding style check tool." am: a93b22a51c am: 7fdbd9c776
am: 3c6ed00a0a

Change-Id: I41115bda490d64671ff32d10c4886350c5a8eafb
2018-11-04 18:45:20 -08:00
junyulai
cb1339fd47 Add C++ support for coding style check tool.
Test: manually run this script on both C++ & Java commits
Change-Id: I92f2d89fbe956a04f9547657b7b17357575fb4af
2018-10-30 10:17:14 +08:00
Chalard Jean
068ef14ba9 Merge "Address comments from #725016" am: 5ca3145db9 am: 50b0f7388b
am: 0d3e0e5aec

Change-Id: Ib008dce8a112b5b3cae07a58a8ce03e1d521278f
2018-10-16 20:11:16 -07:00
Chalard Jean
508c33e94b Merge "Add the core connectivity tools directory and a first tool" am: 735170647e am: d8bb6995f0
am: f92d0c91dc

Change-Id: Ie0ef53c56a41cd9279604c897481bdc853d51758
2018-10-16 03:08:08 -07:00
Chalard Jean
1ecd3f6236 Address comments from #725016
Test: ran this
Change-Id: Iedda798519297499a1d6d28e4aac2199456e9e92
2018-10-16 18:53:57 +09:00
Chalard Jean
735170647e Merge "Add the core connectivity tools directory and a first tool" 2018-10-16 09:49:50 +00:00
Logan Chien
80d6fdefea Merge changes Ie7a1b820,If986af3a,Iaf4016c7 am: e8d1c1adeb am: 092a492f4d
am: e8d3ec8205

Change-Id: Ic491d587dc5a3041e7de16e68cc020328e2a2f9c
2018-09-10 19:57:45 -07:00
Logan Chien
2da2f27813 repo-review: Add set/delete topic and set hashtags
Test: ./repo_review.py --set-topic test [query]
Test: ./repo_review.py --delete-topic [query]
Test: ./repo_review.py --add-hashtag test [query]
Test: ./repo_review.py --remove-hashtag test [query]
Change-Id: Ie7a1b82022d81850754543366202892c437f7968
2018-09-07 19:13:11 +08:00
Logan Chien
e1f29c1ee0 repo-review: Extract _process() for error handling
Test: ./repo_review.py -l Verified +1 [query]
Test: ./repo_review.py -m 'Test message' [query]
Test: ./repo_review.py --abandon 'Abandon message' [query]
Change-Id: If986af3a7ace7766e0854d611542deb6a474165b
2018-09-07 11:58:55 +08:00