Tong Mu
927fd200ed
Revert "Reland 2: Multiview Pipeline ( #47239 )" ( flutter/engine#49238 )
...
This reverts commit 87171e73397f7edfd4c145fbaebdd7208954debf.
Internal performance test shows that this PR negatively affects startup time. I'll reland this PR in parts.
b/307872797
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-12-19 22:30:01 +00:00
Tong Mu
87171e7339
Reland 2: Multiview Pipeline ( flutter/engine#47239 )
...
The last attempt https://github.com/flutter/engine/pull/47234 was reverted because there was another test merged in the meantime that violates the rule added in this PR.
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-10-23 23:46:25 +00:00
Zachary Anderson
d549483298
Revert "Reland: Multiview pipeline " ( flutter/engine#47237 )
...
Reverts flutter/engine#47234
Failures like
https://ci.chromium.org/ui/p/flutter/builders/prod/Mac%20Production%20Engine%20Drone/186568/overview
making the tree red.
2023-10-23 15:17:36 -07:00
Tong Mu
9ed503a734
Reland: Multiview pipeline ( flutter/engine#47234 )
...
This PR relands https://github.com/flutter/engine/pull/44473 .
The previous PR was immediately reverted after merging because we found that the PR could cause illegal renders to be skipped on debug builds but crash the app on release builds. This PR makes the `Animator::Render` skip illegal renders as well. This should not be the final shape of this feature, and thus a TODO is added.
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-10-23 21:35:04 +00:00
auto-submit[bot]
47c3403c39
Reverts "Multiview pipeline" ( flutter/engine#47174 )
...
Reverts flutter/engine#44473
Initiated by: dkwingsmt
This change reverts the following previous change:
Original Description:
This PR makes `Animator` able to handle multiple views, and updates unit tests accordingly.
Before:
<img width="543" alt="image" src="https://github.com/flutter/engine/assets/1596656/f7d0e0e4-cc85-4a6e-b516-1896ac3c1b35 ">
After:
<img width="614" alt="image" src="https://github.com/flutter/engine/assets/1596656/68106301-66ef-4cd1-aeaf-d9c6127ccec2 ">
Now `Animator::Render` must be called during `Animator::BeginFrame`, which is split into `BeginFrame` and `EndFrame`. This requirement is made possible by https://github.com/flutter/engine/pull/45555 . The reason to split is to allow `ShellTest::PumpOneFrame` to insert a render from C++ code.
`ShellTest::PumpOneFrame` is also refactored to allow pumping a frame without any views.
A few unit tests are tweaked to resolve racing condition.
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-10-20 20:57:08 +00:00
Tong Mu
1cfde62821
Multiview pipeline ( flutter/engine#44473 )
...
This PR makes `Animator` able to handle multiple views, and updates unit tests accordingly.
Before:
<img width="543" alt="image" src="https://github.com/flutter/engine/assets/1596656/f7d0e0e4-cc85-4a6e-b516-1896ac3c1b35 ">
After:
<img width="614" alt="image" src="https://github.com/flutter/engine/assets/1596656/68106301-66ef-4cd1-aeaf-d9c6127ccec2 ">
Now `Animator::Render` must be called during `Animator::BeginFrame`, which is split into `BeginFrame` and `EndFrame`. This requirement is made possible by https://github.com/flutter/engine/pull/45555 . The reason to split is to allow `ShellTest::PumpOneFrame` to insert a render from C++ code.
`ShellTest::PumpOneFrame` is also refactored to allow pumping a frame without any views.
A few unit tests are tweaked to resolve racing condition.
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-10-20 20:38:23 +00:00
gaaclarke
c8aa0844f2
[Impeller] implements a retry mechanism for dart:ui/Image.toByteData. ( flutter/engine#46840 )
...
Design doc: [link](https://docs.google.com/document/d/1Uuiw3pdQxNFTA8OQuZ-kuvYg1NB42XgccQCZeqr4oII/edit#heading=h.hn6wreyrz6fm )
fixes: https://github.com/flutter/flutter/issues/135245
One slight deviation from the design doc is that I decided to make ContextMTL respond to changes to the SyncSwitch instead of having it observe the app state directly. The benefits are:
1) This keeps that functionality in one location
1) It makes writing tests much easier
1) There's no need of conditional compilation between macos and ios
1) There is no need to add an objc class
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-10-16 18:31:13 +00:00
gaaclarke
c053bc814b
[Impeller] Started throwing errors if dart:ui/Image.toByteData fails ( flutter/engine#46738 )
...
issue: https://github.com/flutter/flutter/issues/135245
This is a first step. Next we'll implement a retry.
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide] and the [C++,
Objective-C, Java style guides].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I added new tests to check the change I am making or feature I am
adding, or the PR is [test-exempt]. See [testing the engine] for
instructions on writing and running engine tests.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I signed the [CLA].
- [x] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2023-10-13 09:04:47 -07:00
Dan Field
b6fa0a20a5
Print a warning when a message channel is used on the wrong thread. ( flutter/engine#42928 )
...
Fixes https://github.com/flutter/flutter/issues/128746
Prints a warning the first time a platform channel sends a message from the wrong thread with instructions/link to the site about how to fix this.
2023-06-22 18:16:40 +00:00
Tong Mu
57758b70c8
Use ShellTest::Config struct to create Shell ( flutter/engine#42332 )
2023-06-11 10:38:17 -07:00
Dan Field
020577edbb
Make NotifyIdle reject close and past deadlines. ( flutter/engine#37737 )
...
This patch also eliminates some extraneous tracing that is happening
every frame. It is possible to get the same trace calls by enabling
the API stream if needed.
Also refactors the NotifyIdle callsites to just always work in
TimeDeltas rather than converting back and forth between them and
TimePoints, which I think reads more clearly.
2022-11-18 18:17:53 +00:00
gaaclarke
e41c775200
Removed instances of unnecessary values ( flutter/engine#36221 )
2022-09-26 21:28:04 +00:00
Kaushik Iska
d8e73006e0
Add service protocol method to facilitate getting snapshots ( flutter/engine#32628 )
2022-04-13 13:39:05 -07:00
ColdPaleLight
b64598bef6
Refactor type of deadline in the method NotifyIdle to fml::TimePoint ( flutter/engine#30737 )
2022-01-19 17:25:09 -08:00
Dan Field
87dcc5293f
Optmize path volatility tracker ( flutter/engine#30299 )
2021-12-13 16:59:04 -08:00
gaaclarke
8c4ccf58e2
Reapply: Android background platform channels ( flutter/engine#29346 )
...
* Revert "Revert "Android Background Platform Channels (#29147 )""
This reverts commit 7ed91e14ccc1f5ffc4cb13d1d37e27d370c8f7cd.
* Made this PR less of a breaking change by keeping setMessageHandler's signature the same
2021-10-27 10:11:36 -07:00
Dan Field
d5c36f87f5
Revert "Android Background Platform Channels ( #29147 )" ( flutter/engine#29344 )
...
This reverts commit c40f7670e7aff3a42be2cbac0df067009278d639.
2021-10-26 14:52:13 -07:00
gaaclarke
c40f7670e7
Android Background Platform Channels ( flutter/engine#29147 )
2021-10-21 16:08:02 -07:00
Dan Field
542896d8c9
Start animator paused ( flutter/engine#29007 )
2021-10-04 15:48:01 -07:00
gaaclarke
1734ce7f8a
Moved PlatformMessage's to unique_ptrs ( flutter/engine#25860 )
2021-05-06 20:19:01 -07:00
Chinmay Garde
a0a8fb04d8
Wire up Metal shader precompilation from offline training runs. ( flutter/engine#25644 )
2021-04-19 16:24:02 -07:00
gaaclarke
8d44387269
Started initializing the gpu disable syncswitch based on the app state. ( flutter/engine#24503 )
2021-02-24 22:24:29 -08:00
Kaushik Iska
8b9acb11b8
Move common graphics utils to //flutter/common/graphics ( flutter/engine#22320 )
2020-11-10 12:34:02 -08:00
Yuqian Li
9fdea6bbbc
Do not remove directories in purge ( flutter/engine#21478 )
...
Otherwise, the persistent cache may hold invalid directories and make
subsequent store fail.
The newly added unit tests would fail without the fix.
2020-10-05 20:05:00 -07:00
Chris Bracken
2586db3b22
Clean up C++ includes ( flutter/engine#21127 )
...
Cleans up header order/grouping for consistency: associated header, C/C++ system/standard library headers, library headers, platform-specific #includes.
Adds <cstring> where strlen, memcpy are being used: there are a bunch of places we use them transitively.
Applies linter-required cleanups. Disables linter on one file due to included RapidJson header. See https://github.com/flutter/flutter/issues/65676
This patch does not cover flutter/shell/platform/darwin. There's a separate, slightly more intensive cleanup for those in progress.
2020-09-11 21:18:35 -07:00
Dan Field
f83e92cbaf
Use hint freed specifically for image disposal ( flutter/engine#20754 )
...
* Use hint freed specifically for image disposal
2020-09-02 13:41:58 -07:00
Dan Field
35d014eee7
Revert hint_freed ( flutter/engine#20746 )
...
This caused over-aggressive GCs, which vastly increased CPU usage benchmarks.
* Revert "fix build (#20644 )"
This reverts commit 5e03f90cdd9392f95b47d08b398c18cab6d16b12.
* Revert "Hint freed (#19842 )"
This reverts commit 73490a2ca444c8ca491712cde21a459453af8795.
2020-08-25 11:55:40 -07:00
Dan Field
73490a2ca4
Hint freed ( flutter/engine#19842 )
...
* Hint the VM when a layer or picture goes out of scope
2020-08-19 14:04:31 -07:00
Chris Yang
72162b7a66
Ensure threads are merged when tearing down the Rasterizer ( flutter/engine#19919 )
2020-08-19 08:31:01 -07:00
Yuqian Li
4dec444c69
Add a service protocol for raster cache memory ( flutter/engine#20466 )
...
Related issue: https://github.com/flutter/flutter/issues/56719
2020-08-13 20:11:47 -07:00
Zachary Anderson
95b2fed2dc
Enable more linting ( flutter/engine#20187 )
2020-07-31 21:30:58 -07:00
liyuqian
02f828632c
Use FixtureTest to remove duplicate code ( flutter/engine#19219 )
...
Fixes https://github.com/flutter/flutter/issues/59109
2020-06-30 10:55:38 -07:00
Chris Yang
8500bd4156
Reland "Improve iOS PlatformViews to better handle thread merging. #16935 " ( flutter/engine#17609 )
2020-04-10 13:25:02 -07:00
liyuqian
6c93145ef5
Read SkSLs from asset ( flutter/engine#17601 )
...
Fixes https://github.com/flutter/flutter/issues/53117
Test added:
- ShellTest.CanLoadSkSLsFromAsset
2020-04-10 00:16:33 -07:00
Chris Yang
efe45cd875
Revert "Improve iOS PlatformViews to better handle thread merging. ( #16935 )" ( flutter/engine#17600 )
...
This reverts commit 930696bbb75ffdb098df4081e0353f4fac38b075.
2020-04-08 21:15:38 -07:00
Chris Yang
930696bbb7
Improve iOS PlatformViews to better handle thread merging. ( flutter/engine#16935 )
2020-04-08 17:33:33 -07:00
Jason Simmons
02720fbca8
Fix include paths of fml/time headers in the shell and rasterizer ( flutter/engine#17502 )
2020-04-03 12:33:54 -07:00
Kaushik Iska
ce0ec9042f
[pipeline] Add trace event for lag between target and display times ( flutter/engine#17384 )
...
This change also adds TimeRecorder which records time at the start
of each frame to capture the latest vsync target display time and
wires it in to the rasterizer to add trace events when there is a lag.
2020-04-02 17:15:45 -07:00
liyuqian
d968e224ca
Add service protocol to get SkSLs ( flutter/engine#17300 )
...
Fixes https://github.com/flutter/flutter/issues/53114
2020-03-24 21:42:12 -07:00
Chinmay Garde
2a949ca345
Isolate and move common portable ELF loading from fixtures into //flutter/testing. ( flutter/engine#16305 )
...
Also update all known test harnesses to use this and fixes the broken shell_unittests harness.
Fixes https://github.com/flutter/flutter/issues/49853
2020-01-31 12:52:00 -08:00
George Wright
2d2da1dd64
Refactor ShellTest to allow for different ShellTestPlatformViews ( flutter/engine#15972 )
...
This paves the way for us to have shell_unittests backed by different rendering APIs (e.g. OpenGL, Vulkan, Metal).
2020-01-24 13:29:12 -08:00
Kaushik Iska
76d887b711
Reland Wire up Opacity on Fuchsia ( flutter/engine#14559 )
...
This reverts commit 6919709e47661c5cd48d9b0d3bfde986b9c1af84.
On top of the revert, it reverted a commit in the PR:
https://github.com/flutter/engine/pull/14024
This reverts commit ea67e5b0b930ebf552bc7dbd678a35ee6a129c39.
2019-12-18 16:05:38 -08:00
Kaushik Iska
6919709e47
Revert "Wire up Opacity on Fuchsia, round 2 ( #14024 )" ( flutter/engine#14543 )
...
This reverts commit cb0aca7f74a34a6a79f6b7123bd0643a135cf56a.
2019-12-18 10:29:47 -08:00
Gary Qian
50c528c9aa
Rename 'test_vsync_waiters' to 'vsync_waiters_test' for consistency. ( flutter/engine#14519 )
2019-12-18 04:32:03 +09:00
Kaushik Iska
1150b2e5af
[testing] Make vsync waiters pluggable in shell_unittests ( flutter/engine#14463 )
...
This makes it so that the platform views can be passed
an arbitraty CreateVsyncWaiter callback that lets us inject
a vsync waiter other than just the simulated monotonic vsync waiter
that currently exists.
2019-12-12 14:15:36 -08:00
Kaushik Iska
10205291d4
[testing] Move test vsync waiters to their own TUs ( flutter/engine#14456 )
...
This move makes it easier to add more vsync waiters.
2019-12-12 12:27:56 -08:00
David Worsham
cb0aca7f74
Wire up Opacity on Fuchsia, round 2 ( flutter/engine#14024 )
...
* Remove erroneous ChildView opacity
* Wire frame metrics through contexts
* Maintain layer stack inside of SceneBuilder
* Remove EnsureSingleChild
* Centralize system-composite and elevation logic
* Wire up OpacityLayer to Scenic
2019-12-04 19:29:31 -08:00
David Worsham
df08c2593a
Relanding: Add Flow unittests and fixtures ( flutter/engine#14091 )
2019-12-03 14:33:02 -08:00
liyuqian
52e74298e0
Revert PRs to unblock David and Jim's work ( flutter/engine#14088 )
...
* Revert "Add flow test fixtures and tests (#13986 )"
This reverts commit 32915132bacdfd0d631421b23bb6a6d5db1095ab.
* Revert "Dynamically determine whether to use offscreen surface based on need (#13976 )"
This reverts commit a13401ce86b3019c39154d56644b7b9eb4a5bbe5.
2019-12-03 12:02:37 -08:00
David Worsham
32915132ba
Add flow test fixtures and tests ( flutter/engine#13986 )
2019-12-03 09:43:02 -08:00