525 Commits

Author SHA1 Message Date
Martin Kustermann
fde57f1f1d Remove usages of --no-causal-async-stacks (flutter/engine#26877)
Passing the --causal-async-stacks flag to the VM will cause it to error
on VM startup. The VM will remove the flag entirely, but before doing so
we'll have to remove usages of the negated version of the flag, namely
--no-causal-async-stacks.
2021-06-23 14:30:26 +02:00
Dan Field
e6a9345f19 Remove outdated annotations from fixtures (flutter/engine#26828) 2021-06-19 10:09:02 -07:00
Ryan Macnak
53cd841914 Remove compilation trace saving. (flutter/engine#26642) 2021-06-10 13:34:02 -07:00
Jason Simmons
e9cc9be7e1 Provide the isolate cleanup callback to Dart_CreateIsolateInGroup (flutter/engine#26599) 2021-06-07 12:24:03 -07:00
Brandon DeRosier
a83c8ab61d Refactor: Group together externally-managed UIDartState. (flutter/engine#26247)
Group together externally-managed UIDartState.

It's a frequent pattern to enable access to shell resources from the
framework via UIDartState. These handles are passed through several
other objects, where they lay mostly dormant. This refactor just aims
to ease maintenance of this state.

UIDartState is essentially just an easy to extend bus for dropping
off the shell kids in UIDartState, with constructors/operators that
remove the need for providing a full initializer lists in unittests.
2021-05-20 18:01:53 -07:00
Brandon DeRosier
b9982cdec7 Add image generator registry (flutter/engine#25987)
Add image generator protocol and priority registry.

The protocol supports multi-frame images as well as optional
subpixel/downsampled decoding.
2021-05-17 12:12:46 -07:00
gaaclarke
4d98fd9744 Switch PlatformMessages to hold data in Mappings (flutter/engine#25867) 2021-05-13 10:28:25 -07:00
gaaclarke
1734ce7f8a Moved PlatformMessage's to unique_ptrs (flutter/engine#25860) 2021-05-06 20:19:01 -07:00
Dan Field
ce6f1f5fd0 Avoid calling Dart_HintFreed more than once every five seconds (flutter/engine#25827) 2021-05-03 12:19:01 -07:00
Matej Knopp
5d512fb39e Enable JIT memory protection on macOS (flutter/engine#25819) 2021-04-28 19:19:01 -07:00
Kaushik Iska
dc0fb6e4a7 Reland "TaskSources register tasks with MessageLoopTaskQueues dispatcher" (flutter/engine#25692) 2021-04-21 14:29:02 -07:00
Kaushik Iska
17e7c26da8 Revert TaskRunner changes to fix Fuchsia Test failures (flutter/engine#25690) 2021-04-21 09:15:24 -07:00
Kaushik Iska
988c4ffb83 TaskSources register tasks with MessageLoopTaskQueues dispatcher (flutter/engine#25307) 2021-04-19 07:20:11 -07:00
gaaclarke
e5a0923572 Made sure not to delete handles of dart objects if the isolate has been deleted (flutter/engine#25506) 2021-04-13 17:42:28 -07:00
Emmanuel Garcia
1bad6de1da Reland Dart plugin registrant (flutter/engine#25496) 2021-04-12 13:30:01 -07:00
Zachary Anderson
753dfc4a8e Revert "Reland: Call Dart plugin registrant if available (#25375)" (flutter/engine#25462) 2021-04-06 16:04:01 -07:00
Jason Simmons
9fd7208df1 Remove the DartIsolate::PostMessage timeline event (flutter/engine#25433) 2021-04-05 16:09:02 -07:00
Chris Bracken
f4d1c89df1 Extract Dart logging to the embedders (flutter/engine#25402)
Previously messages logged from Dart code (e.g. via the print function)
were handled directly in the engine by platform-specific code. This
factors out a LogMessage(tag, message) callback that embedders can
implement with platform-specific code.

This also eliminates a dependency on platform-specific code in the core,
and provides more flexibility to embedders than the current fallback to
stdout, which can be a problem on platforms without a traditional stdout
or with restrictions on stdout.

Fixes https://github.com/flutter/flutter/issues/79685
2021-04-05 15:43:21 -07:00
Emmanuel Garcia
d20f5e016a Reland: Call Dart plugin registrant if available (flutter/engine#25375) 2021-04-02 15:00:17 -07:00
Chris Bracken
9b4a0264d5 Correct typos throughout the engine/embedder (flutter/engine#25346)
Used the the `misspell` tool available at
https://github.com/client9/misspell, then applied hand-corrections. It's
possible we could adopt this as a presubmit, but there are still enough
false positives that it may not be worth the effort.
2021-04-01 11:08:19 -07:00
Kaushik Iska
6301223cee [tracing] Add trace events for DartIsolate::HandleMessage (flutter/engine#25241)
This captures majority of the non frame related workload
happening on the UI thread.
2021-03-25 14:59:00 -07:00
Zachary Anderson
7c93f9b45f Revert "Call Dart plugin registrant if available (#23813)" (flutter/engine#25221) 2021-03-25 08:59:02 -07:00
Jason Simmons
8c6f4a36de Signal an error if an Isolate.spawnUri call uses an unsupported URI (flutter/engine#24583) 2021-03-10 16:45:02 -08:00
Chris Bracken
13cf185e1c Correct setup-related typos (flutter/engine#24846)
Corrects uses of setup as a verb to 'set up', leaves noun/noun-phrase
forms of setup as 'setup'. Also settles on 'teardown' as opposed to
tear-down for consistency across the codebase.

A few other minor comment/wording corrections.
2021-03-08 17:31:10 -08:00
David Worsham
3215611f74 Fix use of multiple shells w/ different snapshots (flutter/engine#24152) 2021-02-03 17:42:36 -08:00
Jason Simmons
5c4a3d6a92 Avoid calling Dart timeline APIs during Dart_Cleanup (flutter/engine#24007)
The Dart timeline is not thread safe if an engine thread that is not
controlled by Dart calls Dart_TimelineEvent while another thread is
calling Dart_Cleanup.

Fixes https://github.com/flutter/flutter/issues/74134
2021-02-02 09:12:55 -08:00
gaaclarke
9f222fa212 Fixed plumbing of the spawning isolate for Shell::Spawn. (flutter/engine#24112) 2021-02-01 15:32:15 -08:00
Tong Mu
ee1cc9f5ab Hardware keyboard: Web, embedder, and dart:ui (flutter/engine#23466) 2021-01-28 17:19:02 -08:00
gaaclarke
c57c021c17 Started using Dart_CreateInGroup when using spawn on a release build (flutter/engine#23782) 2021-01-22 14:29:01 -08:00
Emmanuel Garcia
45f3827017 Call Dart plugin registrant if available (flutter/engine#23813) 2021-01-21 23:44:01 -08:00
Dan Field
e778949043 Reland path vol tracker (flutter/engine#23840)
This time making sure to deref the native object on GC.
2021-01-21 16:03:43 -08:00
Dan Field
cb57183325 revert path volatility tracker (flutter/engine#23822) 2021-01-21 08:34:02 -08:00
xster
8b90c7869e FlutterEngineGroup for Android (flutter/engine#23675) 2021-01-19 12:29:02 -08:00
Zachary Anderson
c4f4e564da Unconditionaly enable some tracing on startup (flutter/engine#23729) 2021-01-15 22:22:20 -08:00
gaaclarke
8af69442c0 share font collections between spawn engines (flutter/engine#23603) 2021-01-13 11:38:48 -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
Jason Simmons
095b5d15fb Provide a runtime switch for selecting SkParagraph text layout (flutter/engine#23474) 2021-01-07 12:59:03 -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
Gary Qian
d7ab4b01cd Disable flaky/hanging split AOT test (flutter/engine#23070) 2020-12-15 21:18:07 -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
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
Daco Harkes
b6c5eff614 WeakPersistentHandle migration (flutter/engine#19843)
and roll Dart to 52783837369de45d3372cb6c6b7cdd63e71cd829.
2020-11-03 13:06:53 +01:00
Jason Simmons
73ea2c2fea Remove some obsolete code from RuntimeController (flutter/engine#22091) 2020-10-26 10:42:02 -07: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