232 Commits

Author SHA1 Message Date
David Worsham
b304148d46
fuchsia: Shutdown Dart VM properly (#23243) 2020-12-28 18:16:27 -08:00
Gary Qian
1c975f1e7c
AssetResolver updating in AssetManager for Dynamic features (#23130) 2020-12-23 17:39:55 -08:00
Dan Field
5a2244c581
Reland path volatility tracker, disabling it if deterministic rendering is requested (#23226)
* Reland path volatility tracker (#23063)" (#23220)

This reverts commit fceef3aaa9d156e8ec3f4a079c142921882f70d8.

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

This reverts commit 4f914253bd7cd2a5cca3fd97213df37494e9bf37.

* Fix tracing
2020-12-14 17:21:55 -08:00
gaaclarke
f37c8c5796
Implemented FlutterEngineGroup and Spawn API. (#22975) 2020-12-14 17:07:44 -08:00
Dan Field
4f914253bd
Revert "Set SkPath::setIsVolatile based on whether the path survives at least two frames (#22620)" (#23044)
This reverts commit 2efc7c10aa12005010c837a1023024bb26bee143.
2020-12-11 15:39:24 -08:00
Dan Field
2efc7c10aa
Set SkPath::setIsVolatile based on whether the path survives at least two frames (#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
8d4b7f3a68
Add split AOT loading unit failure/error code path (#22857) 2020-12-08 22:58:01 -08:00
Gary Qian
fcbfa9f527
Split AOT Engine Runtime (#22624) 2020-12-02 13:28:01 -08:00
Gary Qian
53fc019aab
Split AOT Android Embedder and shell (#22179) 2020-11-19 17:22:26 -08:00
Kaushik Iska
1ff237fdca
Reland "remove surface dependance on external view embedder (#22468)" (#22470) 2020-11-12 15:37:12 -08:00
Kaushik Iska
021ff04336
Reverts 2 commits that remove surface dependance on external view embedder (#22468)
* Revert "Remove GetExternalViewEmbedder from surface (#22272)"

This reverts commit 5419f70f173db1c9f2d5db4c289560e68ce9b77b.

* Revert "Rasterizer is initialized with an external view embedder (#22405)"

This reverts commit f95df42e6e3d80f17c2024e9956768be9416717f.
2020-11-12 08:41:11 -08:00
Kaushik Iska
f95df42e6e
Rasterizer is initialized with an external view embedder (#22405)
This allows us to not rely on surface methods for getting
the external view embedder.

Conflicts:
	shell/common/rasterizer.cc
	shell/common/rasterizer_unittests.cc
2020-11-11 12:49:03 -08:00
Kaushik Iska
caf678d30f
Move common graphics utils to //flutter/common/graphics (#22320) 2020-11-10 12:34:02 -08:00
Gary Qian
e231e3bc93
Remove extra method in ComputePlatformResolvedLocale (#22362) 2020-11-06 16:34:45 -08:00
Chris Bracken
74472ce6da
Revert "Rasterizer is initialized with an external view embedder (#22348)" (#22367)
This reverts commit 0d5f2e901d1953d04eb45004666d34a4537a0060.

Due to merge conflicts, this also reverts #22275:

Revert "Do not involve external_view_embedder in submit frame process if threads are not merged. (#22275)"

This reverts commit 016fbde1bb275288242e2cf097b52af1dd66ab06.
2020-11-06 15:26:47 -08:00
Kaushik Iska
0d5f2e901d
Rasterizer is initialized with an external view embedder (#22348)
This allows us to not rely on surface methods for getting
the external view embedder.
2020-11-06 09:01:28 -08:00
Chris Bracken
c449c8ee50
Eliminate FLUTTER_NOLINT where possible (#21904)
This removes most of the remaining FLUTTER_NOLINT comments and opts
these files back into linter enforcement.

I've filed https://github.com/flutter/flutter/issues/68273 to require
that all FLUTTER_NOLINT comments be followed by a GitHub issue URL
describing the problem to be fixed.
2020-10-16 12:44:49 -07:00
Yuqian Li
190fd8eb51
Reland "Create root isolate asynchronously (#20142)" (#21747)
This reverts commit 5585ed99039efb3705025e1c58170cdb86af111b.

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
15c587404c
Preserve specified AssetResolvers when performing a hot restart or updating the asset directory (#21611)
Follow up from #21436 . That PR works for all embeddings except for Android, which creates a special JNI AssetResolver. Since the shell cannot recreate this resolver, update the logic to preserve existing resolvers instead.
2020-10-08 09:22:01 -07:00
Jonah Williams
3c0da65c0c
Allow hot reload without syncing all asset files to devFS (#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
149df4318d
Reland multiple display support for embedder API (#21464) 2020-09-28 12:35:34 -07:00
Kaushik Iska
8d165faca1
Revert multiple display support for embedder API (#21456)
This reverts commits
- 67fdd7ededcbb161a857cc187619ae115c8c8e7f.
- 854943d5c8670a241524b71945b2c8ca77246556.

See: https://github.com/flutter/flutter/issues/66829
2020-09-28 09:46:46 -07:00
Kaushik Iska
67fdd7eded
Embedder API Support for display settings (#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
Dan Field
aa8d5d4b9b
Avoid sending a 0 DPR to framework (#21389)
* Avoid sending a 0 DPR to framework

* check width and height as well
2020-09-25 10:35:57 -07:00
Matej Knopp
5c9dddc376
Discard wrong size layer tree instead of rendering it (#21179) 2020-09-18 12:37:02 -07:00
chenjianguang
5271340b88
Fix usage of WeakPtr valid check (#20106) 2020-09-09 15:34:24 -07:00
Emmanuel Garcia
367c6dbd12
Don't use GetTaskQueueId() in rasterizer as it breaks Fuchsia (#20983) 2020-09-03 16:40:01 -07:00
0xZero
ac8b9c4c52
Member variables should appear before the |WeakPtrFactory|. (#20899) 2020-09-03 14:34:01 -07:00
Dan Field
634e499bcc
Use hint freed specifically for image disposal (#20754)
* Use hint freed specifically for image disposal
2020-09-02 13:41:58 -07:00
Yuqian Li
5585ed9903
Revert "Create root isolate asynchronously (#20142)" (#20937)
This reverts commit 95f2b72728ee7e51800f1784e458e45dac675b3a.
2020-09-01 22:05:53 -07:00
chenjianguang
95f2b72728
Create root isolate asynchronously (#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
Jason Simmons
1bd9b8e85b
Reset Shell::weak_factory_gpu_ on the raster thread (#20869) 2020-08-31 16:03:02 -07:00
Emmanuel Garcia
1b0c684326
Add ability to disable the raster thread merger (#20800) 2020-08-28 17:25:00 -07:00
Dan Field
4a88d5e109
Revert hint_freed (#20746)
This caused over-aggressive GCs, which vastly increased CPU usage benchmarks.

* Revert "fix build (#20644)"

This reverts commit b59793ee20be29463fac7a79635bf20253f04107.

* Revert "Hint freed (#19842)"

This reverts commit 3930ac1b25820baee3c67d921a0b009606cb3dae.
2020-08-25 11:55:40 -07:00
Dan Field
3930ac1b25
Hint freed (#19842)
* Hint the VM when a layer or picture goes out of scope
2020-08-19 14:04:31 -07:00
Chris Yang
e7136c3f59
Ensure threads are merged when tearing down the Rasterizer (#19919) 2020-08-19 08:31:01 -07:00
Yuqian Li
f644d03500
Add a service protocol for raster cache memory (#20466)
Related issue: https://github.com/flutter/flutter/issues/56719
2020-08-13 20:11:47 -07:00
Zachary Anderson
7dd092dd31
Enable more linting (#20187) 2020-07-31 21:30:58 -07:00
Greg Spencer
98cfd1db78
Move platform specific information to PlatformConfiguration class (#19652) 2020-07-31 17:21:02 -07:00
Yuqian Li
2d8a00e21d
Add purge-persistent-cache (#20013)
For https://github.com/flutter/flutter/issues/39526
2020-07-28 10:29:59 -07:00
gaaclarke
21efd7325e
Made the linter print out more information in its output and fixed bugs (#19895) 2020-07-22 15:38:09 -07:00
Dan Field
35d7d4aa6c
Make Shell::NotifyLowMemoryWarning trace (#19283) 2020-06-24 15:58:02 -07:00
Kaushik Iska
c8b077fa1a
Revert "Remove pipeline in favor of layer tree holder (#18901)" (#19066)
Reverting for b/158816279
2020-06-16 13:15:57 -07:00
Gary Qian
3a96741247
Platform resolved locale and Android localization refactor (#18645) 2020-06-16 04:29:50 -07:00
Michael Goderbauer
486f26fbf9
Rename trace-whitelist to trace-allowlist (#19047) 2020-06-15 20:52:43 -07:00
Kaushik Iska
28e7b7999f
Remove pipeline in favor of layer tree holder (#18901)
Relanding of a change that was reverted in:
https://github.com/flutter/engine/pull/18427
2020-06-09 12:19:34 -07:00
chenjianguang
89cf074d37
Setup default font manager after engine created, to improve startup performance (#18225) 2020-05-28 17:53:04 -07:00
Chris Yang
9ce1e5c5c7
Introduce TaskRunnerAffineWeakPtrFactory to generate TaskRunnerAffineWeakPtrs (#18346) 2020-05-19 16:36:17 -07:00