126 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
Gary Qian
2bfbb4197c AssetResolver updating in AssetManager for Dynamic features (flutter/engine#23130) 2020-12-23 17:39:55 -08:00
gaaclarke
3d4aa5548a Implemented FlutterEngineGroup and Spawn API. (flutter/engine#22975) 2020-12-14 17:07:44 -08:00
zljj0818
0ef14f3ca3 More rename from GPU thread to raster thread (flutter/engine#22819) 2020-12-03 15:03:02 -08:00
Chris Yang
4f25c151f3 Fix shell_unittests flakes related to external_view_embedder (flutter/engine#22683) 2020-11-23 15:48:03 -08:00
Chris Yang
f12c38bd68 re-enable skipandsubmitframe (flutter/engine#22546) 2020-11-17 09:53:01 -08:00
Kaushik Iska
8b9acb11b8 Move common graphics utils to //flutter/common/graphics (flutter/engine#22320) 2020-11-10 12:34:02 -08:00
Chris Yang
e7f73e509c Reland "Do not involve external_view_embedder in submit frame process if threads are not merged. #22275" (flutter/engine#22372) 2020-11-06 21:04:02 -08:00
Chris Bracken
ca1db50228 Revert "Rasterizer is initialized with an external view embedder (#22348)" (flutter/engine#22367)
This reverts commit cccecc46e10341d655b6bd388222f189215da506.

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 d3902fc979fac68d498e4fe33584647c375c06ac.
2020-11-06 15:26:47 -08:00
Chris Yang
d3902fc979 Do not involve external_view_embedder in submit frame process if threads are not merged. (flutter/engine#22275) 2020-11-06 11:04:01 -08:00
freiling
4903a92b2b SKP based shader warmup (flutter/engine#20643) 2020-11-04 23:19:02 -08:00
Greg Spencer
06b6f8af89 Reland: Migration to PlatformDispatcher and multi-window (flutter/engine#21932)
This re-lands #20496 and #21780 after fixing the semantics-enabling code that was causing the post-submit web_smoke_test to fail.

Below is the description from the original PR:

This is a PR for converting the dart:ui code in the engine to use a multi-window API. The goal here is to convert from the window singleton to an API that has the concept of multiple windows. Also, I'm matching up the new PlatformDispatcher class to talk directly to the PlatformConfiguration class in the engine. I'm not attempting to actually enable creating multiple windows here, just migrate to an API that has a concept of multiple windows. The multi-window API in this PR currently only ever creates one window.

The design doc for this change is here.

The major changes in this PR:

Move the platfom-specific attributes out of Window, and into the new PlatformDispatcher class that holds all of the platform state, so that the platform code need only update the configuration on this class.
Create FlutterView, FlutterWindow, and SingletonFlutterWindow classes to separate out the concepts of a view (of which there may be multiple in a window), a window (of which there may be multiple on a screen, and they host views), and a window where there is only ever expected to be one (this hosts the entire API of the former Window class, and will eventually be the type of the window singleton).
Next step after this PR lands:

Remove the Window class entirely (it is replaced by SingletonFlutterWindow). Some minor changes in the Framework are needed to switch to using SingletonFlutterWindow directly first.

The Window class still exists in this PR, but will be removed as soon as the framework is converted to point to the SingletonFlutterWindow class instead. They share the same API, just have different names (Window is currently a subclass of SingletonFlutterWindow). The intention is that the Window name will be freed up to use as a widget class name in the framework for managing windows. The singleton called window will remain, and keep the same API it has now.
2020-10-22 14:54:25 -07:00
Chinmay Garde
c721e67cb7 Isolates launched by the engine instance use the settings of that instance. (flutter/engine#22052)
This regression was introduced in https://github.com/flutter/engine/pull/21820
for sound-null safety. The settings used to launch the VM were incorrectly used
to determine the isolate lifecycle callbacks. Since the first shell/engine in
the process also starts the VM, these objects are usually identical. However,
for subsequent engine shell/engine launches, the callbacks attached to the new
settings object would be ignored. The unit-test harness is also structured in
such a way that each test case tears down the VM before the next. So all
existing tests created a bespoke VM for the test run, and, the tests that did
create multiple isolates did not also test attaching callbacks to the settings
object.

Fixes https://github.com/flutter/engine/pull/22041
2020-10-22 02:20:50 -07:00
Clement Skau
559463b492 Enable lazy-async-stacks by-default in all modes (Take 4) (flutter/engine#21802) 2020-10-20 10:31:15 +02:00
Chris Bracken
ef868edd36 Eliminate FLUTTER_NOLINT where possible (flutter/engine#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
0c645869e3 Revert "Migration to PlatformDispatcher and multi-window #20496" (flutter/engine#21792)
* Revert "Fix documentation build for window changes. (#21780)"

This reverts commit a539d91840d2fbbb4aa07eeed6a92d654db167ab.

* Revert "Migration to PlatformDispatcher and multi-window (#20496)"

This reverts commit a58fec63f196175eedfc5fbaedce9336dab5c508.
2020-10-12 19:26:41 -07:00
Greg Spencer
a58fec63f1 Migration to PlatformDispatcher and multi-window (flutter/engine#20496)
This is a PR for converting the dart:ui code in the engine to use a multi-window API. The goal here is to convert from the window singleton to an API that has the concept of multiple windows. Also, I'm matching up the new PlatformDispatcher class to talk directly to the PlatformConfiguration class in the engine. I'm not attempting to actually enable creating multiple windows here, just migrate to an API that has a concept of multiple windows. The multi-window API in this PR currently only ever creates one window.

The design doc for this change is here.

The major changes in this PR:

Move the platfom-specific attributes out of Window, and into the new PlatformDispatcher class that holds all of the platform state, so that the platform code need only update the configuration on this class.
Create FlutterView, FlutterWindow, and SingletonFlutterWindow classes to separate out the concepts of a view (of which there may be multiple in a window), a window (of which there may be multiple on a screen, and they host views), and a window where there is only ever expected to be one (this hosts the entire API of the former Window class, and will eventually be the type of the window singleton).
Next step after this PR lands:

Remove the Window class entirely (it is replaced by SingletonFlutterWindow). Some minor changes in the Framework are needed to switch to using SingletonFlutterWindow directly first.

The Window class still exists in this PR, but will be removed as soon as the framework is converted to point to the SingletonFlutterWindow class instead. They share the same API, just have different names (Window is currently a subclass of SingletonFlutterWindow). The intention is that the Window name will be freed up to use as a widget class name in the framework for managing windows. The singleton called window will remain, and keep the same API it has now.
2020-10-09 16:29:16 -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
Dan Field
5e3ad78d3a Avoid sending a 0 DPR to framework (flutter/engine#21389)
* Avoid sending a 0 DPR to framework

* check width and height as well
2020-09-25 10:35:57 -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
George Wright
82b966ba18 Disable ShellTest.SkipAndSubmitFrame for flakes (flutter/engine#21254) 2020-09-17 16:20:52 -07:00
Martin Kustermann
bbaa27cd9f Add --enable-isolate-groups to allowed flags in switches.cc (flutter/engine#21149)
This will allow customers to try out the lightweight isolate support in the Dart VM in AOT mode.

To be future proof, we also add the negative flags to the allow list, thereby allowing the Dart VM to
change the default in the future, while still allowing customers to opt out.

Issue b/158554251
2020-09-17 14:33:51 -07:00
Chris Bracken
d03692449b Prefer C++ standard headers to their C counterpart (flutter/engine#21091)
We currently use a mix of C standard includes (e.g. limits.h) and their
C++ variants (e.g. climits). This migrates to a consistent style for all
cases where the C++ variants are acceptable, but leaves the C
equivalents in place where they are required, such as in the embedder
API and other headers that may be used from C.
2020-09-11 17:10:00 -07:00
Emmanuel Garcia
8a317ebabc Add a new raster status kSkipAndRetry frame (flutter/engine#21059) 2020-09-11 16:29:11 -07:00
David Worsham
916cee368c fuchsia: Compile disabled RasterThreadMerger code (flutter/engine#20984) 2020-09-09 18:40:01 -07:00
Zachary Anderson
5ef8d060bc Revert "Enable lazy-async-stacks by-default in all modes (Take 3) (#20895)" (flutter/engine#21043)
This reverts commit 4200d23617a13ae4e477483ad43493dd36e4d00b.
2020-09-09 09:25:17 -07:00
Clement Skau
4200d23617 Enable lazy-async-stacks by-default in all modes (Take 3) (flutter/engine#20895)
Lazy async stacks were already enabled by-default in AOT mode in [0] - which made the
gen_snapshot invocations use "--lazy-async-stacks --no-causal-async-stacks".

This change does the same with the engine defaults, which makes this be enabled
by-default in JIT mode as well.

See go/dart-10x-faster-async for more information.

This is a re-land: A fix for what we believe to have caused the last revert has landed upstream in Dart in dart-lang/sdk@0004589

[0] flutter/flutter@3478232
2020-09-07 10:55:48 +02:00
Jason Simmons
44bd4cf1d7 Log the results when ShellTest.Screenshot fails (flutter/engine#20932)
This test has been flaky on LUCI recently.

See https://github.com/flutter/flutter/issues/65026
2020-09-03 14:13:55 -07:00
Emmanuel Garcia
6f802144be Wait for first frame before checking layer tree (flutter/engine#20910) 2020-08-31 15:03:31 -07:00
Emmanuel Garcia
2308969ed6 Fix race condition (flutter/engine#20905) 2020-08-31 10:11:41 -07:00
Emmanuel Garcia
9d05be2966 Add ability to disable the raster thread merger (flutter/engine#20800) 2020-08-28 17:25: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
David Worsham
87f65be19e fuchsia: Clean shell_unittests under FEMU (flutter/engine#20704) 2020-08-24 12:47:31 -07:00
Dan Field
5e03f90cdd fix build (flutter/engine#20644) 2020-08-19 14:35:45 -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
David Worsham
8b4e07c198 fuchsia: Increase timeout for flaky test (flutter/engine#20606) 2020-08-18 17:14:30 -07:00
Chris Yang
e6ebeb9e68 Only create raster_thread_merge when explicitly requested by the embedding platform (flutter/engine#20487) 2020-08-16 10:31:01 -07:00
David Worsham
ad2bff1014 Reland: "fuchsia: Remove dead code / break dependencies" (flutter/engine#20532)
Reland #19396 with a fix for improper scale that was affecting internal tests

Tested: Ran all unittests, ran internal tests, and ran workstation on Fuchsia
BUG: 53062, 53063
2020-08-14 20:41:18 -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
David Worsham
4e60afdf2a Fix broken shell_unittests on Fuchsia (flutter/engine#20422)
Fixes https://github.com/flutter/flutter/issues/53399
2020-08-11 17:31:25 -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
Jason Simmons
6de80232b2 Revert "Enable lazy-async-stacks by-default in all modes (2) (#19270)" (flutter/engine#20165)
This reverts commit 9a94fd08b4493c7af12d2c119f1f67f3a4288264.
2020-07-30 18:34:51 -07:00
Clement Skau
9a94fd08b4 Enable lazy-async-stacks by-default in all modes (2) (flutter/engine#19270) 2020-07-29 12:25:30 +02:00
Adlai Holler
e5614964f4 Use the GrDirectContext factories instead of deprecated GrContext ones (flutter/engine#19962)
This is part of a larger effort to expose the difference between GrDirectContext,
which runs on the GPU thread and can directly perform operations like uploading
textures, and GrRecordingContext, which can only queue up work to be delivered
to the GrDirectContext later.
2020-07-28 13:32:09 -07:00
gaaclarke
ee0e1788d9 Made the linter print out more information in its output and fixed bugs (flutter/engine#19895) 2020-07-22 15:38:09 -07:00
David Worsham
919f8e6a42 Move fuchsia/scenic integration behind #define (flutter/engine#19003)
Additionally create "_next" permutations for all of the test binaries
on Fuchsia, in order to test both code-paths.

Using the #define follow-up CLs can also create a flutter_runner_next
binary that does not contain any legacy integration code.

BUG: 53847
2020-06-26 14:03:18 -07:00
Sanjay Chouksey
f1286c6356 Add PlatformView support for Fuchsia (flutter/engine#19132)
* Add PlatformView support for Fuchsia

This change allows embedding views provided by fuchsia components into
a flutter app running on Fuchsia. This conforms to Flutters idiomatic
approach to composite PlatformView alongside other rendered layers.

This uses the `view embedder` infrastructure to allow
`PlatformViewLayer`
to hold fuchsia views. This is meant to eventually supplant the legacy
`SceneHost` and `ChildViewLayer` mechanism to embed fuchsia `ChildView`.

To see how this will get used check out:
https://fuchsia-review.googlesource.com/c/experiences/+/398536/6/examples/hello_experiences/lib/fuchsia_view.dart

Includes unittests for platform_view.cc.

Note: This change has no impact on the legacy code to embed fuchsia
views.

* Rename OnCreateViewMethodCall to OnCreateView

Same for OnDestroyViewMethodCall to OnDestroyView

Co-authored-by: Sanjay Chouksey <sanjayc@google.com>
2020-06-25 16:27:39 -07:00