120 Commits

Author SHA1 Message Date
gaaclarke
5026c62732 lightweight flutter engines: sharing skia contexts for the io thread (flutter/engine#23508) 2021-01-13 13:04:16 -08:00
gaaclarke
dbc486213c Plumbing refactor to allow the usage of Dart_CreateIsolateInGroup (flutter/engine#23549)
Did the plumbing refactor that allows us to call Dart_CreateIsolateInGroup when applicable.
2021-01-12 16:43:12 -08:00
David Worsham
61b749c7fd fuchsia: Shutdown Dart VM properly (flutter/engine#23243) 2020-12-28 18:16:27 -08:00
Gary Qian
2bfbb4197c AssetResolver updating in AssetManager for Dynamic features (flutter/engine#23130) 2020-12-23 17:39:55 -08:00
Dan Field
dedf9bd1af Reland path volatility tracker, disabling it if deterministic rendering is requested (flutter/engine#23226)
* Reland path volatility tracker (#23063)" (#23220)

This reverts commit b56fc25561417f96e17dacab375e66f474a54c94.

* allow disabling based on whether deterministic rendering is needed
2020-12-22 08:25:20 -08:00
Dan Field
b56fc25561 Revert "Reland path volatility tracker (#23063)" (flutter/engine#23220)
This reverts commit 77c7096efb0b1392acc9793c386561a3c36012ba.
2020-12-21 13:53:18 -08:00
Dan Field
77c7096efb Reland path volatility tracker (flutter/engine#23063)
* Revert "Revert "Set SkPath::setIsVolatile based on whether the path survives at least two frames (#22620)" (#23044)"

This reverts commit feda80cb42f99e2588a9a6b9ab3dd1f812d0f45b.

* Fix tracing
2020-12-14 17:21:55 -08:00
gaaclarke
3d4aa5548a Implemented FlutterEngineGroup and Spawn API. (flutter/engine#22975) 2020-12-14 17:07:44 -08:00
Dan Field
feda80cb42 Revert "Set SkPath::setIsVolatile based on whether the path survives at least two frames (#22620)" (flutter/engine#23044)
This reverts commit 2d52a3c87c97660a050e4bf5559091d0cec262f3.
2020-12-11 15:39:24 -08:00
Dan Field
2d52a3c87c Set SkPath::setIsVolatile based on whether the path survives at least two frames (flutter/engine#22620)
This patch defaults the volatility bit on SkPaths to false, and then flips it to true if the path survives at least two frames.
2020-12-10 13:57:23 -08:00
Gary Qian
19afd06afc Add split AOT loading unit failure/error code path (flutter/engine#22857) 2020-12-08 22:58:01 -08:00
zljj0818
0ef14f3ca3 More rename from GPU thread to raster thread (flutter/engine#22819) 2020-12-03 15:03:02 -08:00
Gary Qian
9352ed557e Split AOT Engine Runtime (flutter/engine#22624) 2020-12-02 13:28:01 -08:00
Gary Qian
3676366194 Split AOT Android Embedder and shell (flutter/engine#22179) 2020-11-19 17:22:26 -08:00
Kaushik Iska
8b9acb11b8 Move common graphics utils to //flutter/common/graphics (flutter/engine#22320) 2020-11-10 12:34:02 -08:00
Gary Qian
6fc7f7b41f Remove extra method in ComputePlatformResolvedLocale (flutter/engine#22362) 2020-11-06 16:34:45 -08:00
Yuqian Li
34774974ab Reland "Create root isolate asynchronously (#20142)" (flutter/engine#21747)
This reverts commit 19ebd61442fd3bf6a69af2156c8b118fc8578ec2.

Additionally, the following _flutter.runInView deadlock is fixed.

Previously, a deadlock would occur when service protocol
_flutter.runInView is used to restart the engine wihtout tearing down
the shell: the shared mutex of the service protocol will be locked
during the restart as it's in the middle of handling a service protocol
message; if ServiceProtocol::AddHandler is also called during the
restart, the deadlock happens as AddHandler also requires such lock.

test/integration.shard/background_isolate_test.dart would fail
without this fix.
2020-10-12 12:02:30 -07:00
Jonah Williams
e37debbf9b Allow hot reload without syncing all asset files to devFS (flutter/engine#21436)
Always add the asset resolver from the configuration settings directory when restarting or recreating the asset manager
2020-10-02 14:09:07 -07:00
Kaushik Iska
a5f4486147 Reland multiple display support for embedder API (flutter/engine#21464) 2020-09-28 12:35:34 -07:00
Kaushik Iska
bd90847bad Revert multiple display support for embedder API (flutter/engine#21456)
This reverts commits
- 5f34b8442366463b5ad53e3e87e7920a006392eb.
- fc8b468d84f1fef5bf5183dd0b36d9411d454ea7.

See: https://github.com/flutter/flutter/issues/66829
2020-09-28 09:46:46 -07:00
Kaushik Iska
5f34b84423 Embedder API Support for display settings (flutter/engine#21355)
Embedders can now notify shell during startup about the various displays and their corresponding settings.
Adds a notion of Display update type which can later include chages to displays during runtime such as addition / removal / reconfiguration of displays.

We also remove the responsibility of providing the refresh rate from `vsync_waiter` to `DisplayManager`.
Rewires existing platform implementations of the said API to use `Shell::OnDisplayUpdate` to notify the display manager of the startup configuration.

DisplayManager is also thread-safe to account for rasterizer and UI thread accesses.
2020-09-25 11:04:10 -07:00
Matej Knopp
62a0f720af Discard wrong size layer tree instead of rendering it (flutter/engine#21179) 2020-09-18 12:37:02 -07:00
0xZero
c70c748e0d Member variables should appear before the |WeakPtrFactory|. (flutter/engine#20899) 2020-09-03 14:34:01 -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
Yuqian Li
19ebd61442 Revert "Create root isolate asynchronously (#20142)" (flutter/engine#20937)
This reverts commit b3bb6df94c4537240fb563c2394c18ed984a82df.
2020-09-01 22:05:53 -07:00
chenjianguang
b3bb6df94c Create root isolate asynchronously (flutter/engine#20142)
## Description
As the related issue refer, the application may be doing too much work on its main thread even in a simple hello_world demo.
That is because the creation of `Engine` on the ui thread takes a noticeable time, and it is blocking the platform thread in order to run `Shell::Setup` synchronously.
The cost of `Engine`'s constructor is mainly about the creating of root isolate. Actually, there used to be another time-consuming process, the default font manager setup, which was resolved by https://github.com/flutter/engine/pull/18225. 
Similar to https://github.com/flutter/engine/pull/18225, this pr move the creation of root isolate out from creating `Engine`. After this action, the main thread blocking is quite an acceptable slice.

## Related Issues
https://github.com/flutter/flutter/issues/40563 could be resolved by this pr.
2020-09-01 13:31:00 -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
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
Dan Field
b43d17a5a3 Remove the dummy rasterizer delegate now that flutter_runner is in tree, and cleanup ctor params (flutter/engine#20486) 2020-08-13 14:46:01 -07:00
Zachary Anderson
95b2fed2dc Enable more linting (flutter/engine#20187) 2020-07-31 21:30:58 -07:00
Greg Spencer
e994f832d2 Move platform specific information to PlatformConfiguration class (flutter/engine#19652) 2020-07-31 17:21:02 -07:00
Kaushik Iska
ce2baf1ce0 Revert "Remove pipeline in favor of layer tree holder (#18901)" (flutter/engine#19066)
Reverting for b/158816279
2020-06-16 13:15:57 -07:00
Gary Qian
c9fa545cf3 Platform resolved locale and Android localization refactor (flutter/engine#18645) 2020-06-16 04:29:50 -07:00
David Worsham
d2b7646e68 Move Surface and friends to flow/ (flutter/engine#18938) 2020-06-09 16:03:01 -07:00
Kaushik Iska
1430d4e26b Remove pipeline in favor of layer tree holder (flutter/engine#18901)
Relanding of a change that was reverted in:
https://github.com/flutter/engine/pull/18427
2020-06-09 12:19:34 -07:00
Chris Yang
80c707a642 Introduce TaskRunnerAffineWeakPtrFactory to generate TaskRunnerAffineWeakPtrs (flutter/engine#18346) 2020-05-19 16:36:17 -07:00
Kaushik Iska
5519277f4a Revert "Remove pipeline in favor of layer tree holder (#18285)" (flutter/engine#18427)
This reverts commit 0219ee95d8ffdef4d839f0419ce5e1f22b27d8d1.
2020-05-15 12:27:32 -07:00
Kaushik Iska
0219ee95d8 Remove pipeline in favor of layer tree holder (flutter/engine#18285)
go/flutter-pipeline-improvements for more details.
2020-05-14 10:46:14 -07:00
Kaushik Iska
1acb5d4817 Fix latest_frame_target_time race (flutter/engine#18279)
There are some cases where onAnimatorDraw gets called before
onAnimatorBeginFrame, in these cases we need to update the
latest_frame_target_time to be the target time for the current frame.

This manifested as an issue in release mode Android builds:
https://firebase.corp.google.com/project/flutter-infra/testlab/histories/bh.27c33c672e9b01f2/matrices/4903344583855476919/executions/bs.ee4f6f7ad8671a34
2020-05-11 14:52:22 -07:00
Kaushik Iska
1785bb19b0 Revert "Remove pipeline in favor of layer tree holder (#17688)" (flutter/engine#18242) 2020-05-08 16:09:02 -07:00
Kaushik Iska
dee9634111 Remove pipeline in favor of layer tree holder (flutter/engine#17688)
go/flutter-pipeline-improvements for more details.
2020-05-08 10:51:10 -07:00
Chris Yang
d1d6103681 Introduce TaskRunnerChecker, TaskRunnerAffineWeakPtr (flutter/engine#17649) 2020-05-01 11:28:20 -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
10824995dd Rename GPU thread to raster thread in code comments (flutter/engine#17329)
1. Simple "GPU thread" to "raster thread" replacement.

2. Regex replace "GPU([\n\r\s]+//+ thread)" with "raster$1".

3. Regex replace "// gpu$" with "// raster".

4. Simple test change.

5. Run ci/format.sh
2020-03-25 22:49:59 -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
ef31000576 Allow embedders to schedule a callback on all engine managed threads. (flutter/engine#15980)
`FlutterEnginePostCallbackOnAllNativeThreads` schedule a callback to be run on
all engine managed threads. The engine will attempt to service this callback the
next time the message loops for each managed thread is idle. Since the engine
manages the entire lifecycle of multiple threads, there is no opportunity for
the embedders to finely tune the priorities of threads directly, or, perform
other thread specific configuration (for example, setting thread names for
tracing). This callback gives embedders a chance to affect such tuning.

Fixes flutter/flutter#49551
Fixes b/143774406
Fixes b/148278215
Fixes b/148278931
2020-01-27 13:49:39 -08:00
chunhtai
1571512735 Add shell api to set default for windows data (flutter/engine#14002) 2020-01-08 19:36:10 -08:00
gaaclarke
ec5cf813f6 Made a way to turn off the OpenGL operations on the IO thread for backgrounded apps (flutter/engine#13908) 2019-11-22 14:08:33 -08:00