610 Commits

Author SHA1 Message Date
Dan Field
08312a825e Lint and fix bugprone-use-after-move violations (flutter/engine#35978) 2022-09-09 02:41:03 +00:00
gaaclarke
42c469183e Started handling messages from background isolates for iOS (flutter/engine#35174) 2022-09-08 00:03:27 +00:00
Dan Field
7cea2d1361 Try to deflake service isolate startup (flutter/engine#35950) 2022-09-06 13:26:49 -07:00
yaakovschectman
8e3c8bc88f Engine startup event timed after VM initializes (flutter/engine#35713)
* Engine startup event timed after VM initializes

* Formatting

* Update FlutterEngineMainEnter event comment

* Remove engine_start_time

* Remove unused variable
2022-08-31 10:48:44 -04:00
Jonah Williams
27b4f29d7e Include TextureLayer in contents of toImageSync (flutter/engine#35608) 2022-08-23 02:16:06 +00:00
Casey Hillers
1c20221e24 Revert "Include TextureViews in the output of Scene.toImage[Sync]" (flutter/engine#35587) 2022-08-22 10:26:09 +00:00
Jonah Williams
ed952f4503 Include TextureViews in the output of Scene.toImage[Sync] (flutter/engine#35527)
Update Picture rasterization for toImage to accept a layer tree, optionally flattening on the raster thread if present.
Update Deferred GPU image for toImageSync to accept a layer tree, flattening it the first time it creates an image, storing the resulting display list.

This is also a performance fix for the zoom page transition, which currently does too much work on the UI thread on frame 1
2022-08-19 16:28:30 -07:00
Jonah Williams
1245043020 Support hot reload of asset fonts (flutter/engine#35213) 2022-08-08 18:06:05 +00:00
Dan Field
a41257c563 Reland "dart:ui conversion from native to FfiNative" (#33116)" (flutter/engine#34700)
* Reland "dart:ui conversion from native to FfiNative" (#33116)"

This reverts commit d85395558f3d72c64d9c75e00c6ebdd5bf4583e3.

Resolves merge conflicts and updates modified/newly added
methods, and fixes the incorrect argument counts
on some of the Path methods.
2022-07-18 15:51:07 -07:00
ColdPaleLight
e1fe7327b1 Use the correct 'SnapshotDelegate' in 'RuntimeController::Spawn' (flutter/engine#34523) 2022-07-13 01:09:04 +00:00
Bernardo Eilert Trevisan
a08a568e0a Relanded "Implement support for explicit specification of JIT snapshots (#34244)"
This reverts commit b989d4723510771017ef598403a2366a8f1bcac7.
2022-07-08 15:19:30 -04:00
Jason Simmons
b989d47235 Revert "Implement support for explicit specification of JIT snapshots (#34244)" (flutter/engine#34517)
This reverts commit 042ee2546c1569850f628e33e34385299e2df3c7.
2022-07-07 16:59:07 -07:00
Bernardo Eilert Trevisan
042ee2546c Implement support for explicit specification of JIT snapshots (flutter/engine#34244) 2022-07-07 22:48:05 +00:00
Dan Field
0586f7b588 Drop --enable-display-list flag, remove associated branched code (flutter/engine#34233) 2022-06-23 00:07:04 +00:00
Chris Bracken
53a9648da9 [lint] Merge impeller .clang-tidy into main config (flutter/engine#33692)
Merges most (but not all) of the impeller .clang-tidy rules into the
main .clang-tidy config. Merges:

readability-identifier-naming.PrivateMemberSuffix (_)
readability-identifier-naming.EnumConstantPrefix (k)
modernize-use-default-member-init.UseAssignment
Does not merge:

readability-identifier-naming.PublicMethodCase (CamelCase)
readability-identifier-naming.PrivateMethodCase (CamelCase)
These last two are not merged due to the non-trivial number of existing
field accessors that use field_name() methods to directly return
field_name_. While these are permitted by the C++ style guide, we may
want to move to a single, simple rule and name everything in CamelCase.
These can be enabled in a followup patch.

No new tests added, since this change is style-only.
2022-06-21 11:52:42 -07:00
Alexander Markov
8292927857 Remove uses of --lazy-async-stack Dart VM flag (flutter/engine#33964) 2022-06-10 10:12:56 -07:00
Chris Bracken
56fbdd0232 [lint] Enforce k prefix for global constants (flutter/engine#33666)
Enforces that all global constants are prefixed with a 'k' as per the
style guide and updates the codebase into conformance where necessary.

This does not change any public API.

Additional testing provided by the addition of the lint rule.

Ref: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#begin-global-constant-names-with-prefix-k
2022-05-27 18:33:38 -07:00
Zachary Anderson
00607f96ea Reland: Roll clang and buildroot (flutter/engine#33339) 2022-05-14 06:04:14 -07:00
Jonah Williams
8aef5df7b1 Add support for loading asset directly from ImmutableBuffer (flutter/engine#32999) 2022-05-10 19:39:04 -07:00
Chris Bracken
09285aac02 Use empty in place of size checks vs 0 (flutter/engine#33151) 2022-05-06 13:09:04 -07:00
Chris Bracken
1af24ccf62 Set Platform.executable on startup (flutter/engine#33127)
Previously, using Platform.executable (from dart:io) returned null (if
non-null-by-default was disabled) or threw an exception (if NNBD was
enabled) since we weren't setting it.

We now pass the executable name to Dart during VM startup based on the
first value in the FlutterProjectArgs::command_line_argv array passed to
FlutterEngineRun (or FlutterEngineInitialize) on startup. argv[0] (if
specified) is explicitly documented as being required to be the
executable name in embedder.h. In the case where no argv[0] is
specified, we instead set Platform.executable to "Flutter" in order to
avoid violating the (non-nullable) type annotation on
Platform.executable.

Note that dart::bin::SetExecutableName() does NOT make a copy of the
input string, so that value needs to be available for the entire lifetime
of the VM.

This also adds EmbedderConfigBuilder::SetExecutableName() to support
setting a fake executable name in unittests. By default, we continue to
set the name "embedder_unittest" unless overridden using this method.

See: https://api.flutter.dev/flutter/dart-io/Platform/executable.html
See: https://github.com/dart-lang/sdk/issues/48427

Issue: https://github.com/flutter/flutter/issues/83921
2022-05-05 11:14:16 -07:00
Zachary Anderson
d85395558f Revert "dart:ui conversion from native to FfiNative" (flutter/engine#33116) 2022-05-04 16:24:06 -07:00
Clement Skau
ca1dc06bc1 dart:ui conversion from native to FfiNative (flutter/engine#29607) 2022-05-04 09:29:05 -07:00
Zachary Anderson
524c17fcab Add a dart:ui-internal flag to check if impeller is enabled (flutter/engine#33040) 2022-05-03 11:27:07 -07:00
Zachary Anderson
a5caec7780 Delete DartIsolateTest::ValidLoadingUnitSucceeds (flutter/engine#32970) 2022-04-27 16:09:04 -07:00
Dan Field
5c27c4acbf Avoid calling Dart_TimelineGetMicros when systrace is enabled (flutter/engine#32968) 2022-04-27 14:59:03 -07:00
Ryan Macnak
393e331f6f Set the VM's file callbacks. (flutter/engine#32837)
These are used to output various tracing enabled by VM flags.
2022-04-26 15:06:03 -07:00
Jason Simmons
d9de6d31cf Disable the timeline in release mode on Android unless systrace is enabled (flutter/engine#32909) 2022-04-26 10:54:03 -07:00
Dan Field
f51504259a Do not depend on Dart in FML (flutter/engine#32846) 2022-04-21 19:22:45 -07:00
Dan Field
9e46531319 Remove redundant trace events (flutter/engine#32812) 2022-04-21 13:28:03 -07:00
Kaushik Iska
d8e73006e0 Add service protocol method to facilitate getting snapshots (flutter/engine#32628) 2022-04-13 13:39:05 -07:00
Dan Field
4101b52aca Unify unhandled error reporting, add PlatformDispatcher.onError (flutter/engine#32078) 2022-04-09 14:44:04 -07:00
gaaclarke
968e18b66e Removed error log statement for dart plugin registrant. (flutter/engine#32321) 2022-03-30 13:40:04 -07:00
gaaclarke
237c111725 Dart Plugin Registrant - Reland e525aced2737 (flutter/engine#32189) 2022-03-23 18:20:05 -07:00
gaaclarke
8057786ee4 Revert "Started looking for the dart plugin registrant at runtime (#31418)" (flutter/engine#32162)
This reverts commit e525aced2737dffaae17d0bb9619783abfe117cf.
2022-03-21 13:42:07 -07:00
gaaclarke
eb45cf1c9d Fixed image generator registry usage with spawn. (flutter/engine#31622) 2022-03-17 13:10:11 -07:00
gaaclarke
70271f2263 Add Dart entrypoint to execute the dart plugin registrant. (flutter/engine#31720)
* Adds Dart entrypoint to execute the dart plugin registrant.

* added negative test and added web ui interface

* removed linter warning
2022-03-02 17:50:23 -08:00
gaaclarke
9b0587193e added dart plugin registrant test executables to run_tests.py (flutter/engine#31726) 2022-02-28 19:51:57 -08:00
gaaclarke
e525aced27 Started looking for the dart plugin registrant at runtime (flutter/engine#31418) 2022-02-28 15:50:55 -08:00
Ryan Macnak
8b133f69ea Label ConcurrentMessageLoop worker threads for the Dart VM. (flutter/engine#31168) 2022-02-17 13:14:10 -08:00
Siva
1cf55bbfd6 Revert mark idle (flutter/engine#31487)
* Turn off mark_when_idle option as it appears to cause a regression.
We can turn it back on once we investigate the cause and fix it.

* Format.
2022-02-15 18:47:20 -08:00
Zachary Anderson
eca60c0b90 Add clang-analyzer-* and clang-diagnostic-* to .clang-tidy (flutter/engine#31291) 2022-02-09 12:26:34 -08:00
Martin Kustermann
fa5e12d50a Fix incorrect handling of error handling in case an isolate initialization fails (flutter/engine#31207)
For isolates spawned by the application via `Isolate.spawn()`ed, the VM
will create a "lightweight" isolate and invoke the `initialize_isolate`
embedder callback to initialize it.

The embedder-provided callback will be invoked with the active isolate
and is expected to return with that active isolate - irrespective of
whether it succeeded to initialize or not.
=> The unsuccessful path was using `Dart_ExitIsolate()` - which is
   incorrect.

This PR fixes that by not exiting the isolate. As a side-effect of the
fix, we also do less `Dart_EnterIsolate()`/`Dart_ExitIsolate()` calls in
initialization (which makes it faster) and handle failure to spawn the
root isolate. Furthermore this PR removes some dead code and replaces it
with `FML_DCHECK()`s instead.

The PR adds a test that will set the root library to null which will make the
engine fail initializing of the isolate and therefore trigger this error handling
path.

Fixes https://github.com/flutter/flutter/issues/90478
2022-02-07 08:21:47 +01:00
Ryan Macnak
ac6374ce77 Enable incremental marking during idle time. (flutter/engine#31167) 2022-02-01 09:21:13 -08:00
eggfly
42cc820c92 Cleanup unused code in the UIDartState and other tests. (flutter/engine#31152) 2022-01-31 18:20:02 -08:00
Brandon DeRosier
925224a9ee Prefix remaining OS defines with FML_ namespace (flutter/engine#31172) 2022-01-31 14:31:44 -08:00
Brandon DeRosier
2d4f908b9d Add FML_ prefix to fml/build_config.h macros (flutter/engine#31141) 2022-01-31 11:53:51 -08:00
Siva
f31c8eb26c Add option to enable serial GC (flutter/engine#30975)
* Roll Dart SDK from e256855d07ba to a3b62f366529 (4 revisions) (#21809)

* Roll Dart SDK from e655b9a3839e to b58cfe5ab24e (1 revision) (#21920)

* Roll Dart SDK from fc82eeed7df3 to 8be6a08153cc (1 revision) (#22005)

* Roll Dart SDK from fe12b0536f42 to a188781c9fc8 (1 revision) (#22379)

* Roll Skia from 95b5fb9213d7 to 68ac3b9ec3ca (17 revisions) (#22713)

* Roll Dart SDK from 2c74e62a050c to f9760fc12871 (5 revisions) (#22881)

* Roll Dart SDK from 68d1c7504f7d to f166571c7bc4 (1 revision) (#23056)

* Roll Dart SDK from 970d74c42472 to fd72dbb5b82b (1 revision) (#23820)

* Trigger an engine build to re-open the tree (#26056)

This commit is empty and simply triggers a new build to open the tree.

Commit e9ca785106ddc672d945062758800bdf1dd0aa68 was re-built after a
succesful build; upload to the cloud storage bin failed.

* Roll Skia from d9a7c5953df3 to 827bb729a84d (2 revisions) (#26096)

* Roll Dart SDK from d616108772bd to a527411e5100 (0 revision) (#26156)

* Roll Dart SDK from bb9d96ffbafa to 7250fd6379b2 (0 revision) (#26374)

* Roll Dart SDK from 202c42e3395c to 2e9c4305a6aa (1 revision) (#26578)

* Roll buildroot to 275038b8be7196927b0f71770701f3c2c3744860 (#26945)

* [test] empty commit (#27599)

https://flutter-review.googlesource.com/c/infra/+/15660

* Roll Dart SDK from e1414001c93b to 686070850ee3 (1 revision) (#27620)

* Empty commit to apply latest LUCI config (#27767)

* Roll Dart SDK from 3b11f88c96a5 to 976f160b547f (3 revisions) (#29436)

* Empty commit to fix main tree status (#29760)

* Add option to enable serial GC
This option can be used to avoid thread contention issues for the UI thread when running on low power devices with limited number of cores.

* Fix format.

* Added test.

* Add build rule.

* Address review comments.

Co-authored-by: skia-flutter-autoroll <skia-flutter-autoroll@skia.org>
Co-authored-by: Chris Bracken <chris@bracken.jp>
Co-authored-by: Casey Hillers <chillers@google.com>
2022-01-25 17:06:18 -08: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
Alexander Aprelev
b6176f8901 Remove use of '--enable-isolate-groups' dart vm flag. (flutter/engine#30839)
The flag was removed after isolate groups were enabled by default.

Fixes https://github.com/flutter/flutter/issues/95331
2022-01-13 09:11:45 -08:00