763 Commits

Author SHA1 Message Date
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
Zachary Anderson
51c9ae9566
Add --strict_null_safety_checks to the Dart flag allowlist (#23144) 2020-12-17 09:44:00 -08:00
gaaclarke
9643c9d110
Started shutting down the sampler when it gets deleted (#23012) 2020-12-14 17:59:13 -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
mikerreed
6ae2594b97
opt into new Skia APIs (#22845) 2020-12-03 15:28:02 -08:00
zljj0818
48befc59d4
More rename from GPU thread to raster thread (#22819) 2020-12-03 15:03:02 -08:00
Gary Qian
fcbfa9f527
Split AOT Engine Runtime (#22624) 2020-12-02 13:28:01 -08:00
Kaushik Iska
eb6eabcb51
Reland "Introduce a delegate class for gpu metal rendering (#22611)" (#22777)
This reverts commit 0d71d27aa7d9058841bbba104021927c7f17b7ce.
2020-12-02 13:04:10 -06:00
Jonah Williams
d85cb10707
add trace kernel flag to allowlist (#22812) 2020-12-02 09:49:04 -08:00
Kaushik Iska
adb3312f0c
Revert "Introduce a delegate class for gpu metal rendering (#22611)" (#22775)
This reverts commit 5bf6533538e034bbfecd39680186e559c8a90da3.
2020-11-30 14:47:01 -06:00
Kaushik Iska
5bf6533538
Introduce a delegate class for gpu metal rendering (#22611) 2020-11-25 15:46:38 -06:00
Brian Osman
298bf68b10
Fix use of uninitialized memory in animator (#22714)
* Fix use of uninitialized memory in animator

Discovered via MSAN build of embedder_unittests
2020-11-24 14:51:31 -05:00
Chris Yang
054bfef24b
Fix shell_unittests flakes related to external_view_embedder (#22683) 2020-11-23 15:48:03 -08:00
Gary Qian
53fc019aab
Split AOT Android Embedder and shell (#22179) 2020-11-19 17:22:26 -08:00
gaaclarke
1c3bc02649
started providing the GPU sync switch to external view embedders (#22302) 2020-11-17 18:43:01 -08:00
Chris Yang
2c2e3a2885
re-enable skipandsubmitframe (#22546) 2020-11-17 09:53:01 -08:00
Dan Field
63a6fe3cf9
Opt in fixutres (#22502) 2020-11-13 12:02:07 -08:00
Kaushik Iska
1ff237fdca
Reland "remove surface dependance on external view embedder (#22468)" (#22470) 2020-11-12 15:37:12 -08:00
Dan Field
d07368169e
Limit heap growth on Android (#20473)
Limit heap growth to half of totalMem by default, with the option to set it higher or lower in the AndroidManifest
2020-11-12 14:53:54 -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
5419f70f17
Remove GetExternalViewEmbedder from surface (#22272)
This decouples surfaces from view embedders.
2020-11-11 13:45:24 -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
Chris Yang
fb72023d38
Reland "Do not involve external_view_embedder in submit frame process if threads are not merged. #22275" (#22372) 2020-11-06 21:04: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
Chris Yang
016fbde1bb
Do not involve external_view_embedder in submit frame process if threads are not merged. (#22275) 2020-11-06 11:04:01 -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
Kaushik Iska
6e95e005f1
Platform views have CreateExternalViewEmbedder (#22214) 2020-11-06 05:30:48 -08:00
freiling
3105db8ee8
SKP based shader warmup (#20643) 2020-11-04 23:19:02 -08:00
gaaclarke
122f242588
added unit tests to the rasterizer (#22282) 2020-11-04 13:56:29 -08:00
gaaclarke
4e9459e007
Refactored the FlutterEngine to make it easier to implement spawn functionality (#21890) 2020-10-30 15:29:10 -07:00
stuartmorgan
06b0910e2d
Fix possible use of std::moved value in Rasterizer (#22125) 2020-10-28 18:12:03 -07:00
Filip Filmar
992689c70d
[fuchsia] Adds a test for timezone change (#21934) 2020-10-23 18:52:02 -07:00
Greg Spencer
6bc70e4a11
Reland: Migration to PlatformDispatcher and multi-window (#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
defa8be2b1
Isolates launched by the engine instance use the settings of that instance. (#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
e78e405e6a
Enable lazy-async-stacks by-default in all modes (Take 4) (#21802) 2020-10-20 10:31:15 +02:00
Chris Bracken
49c35b6177
Eliminate unnecessary linter opt-outs (#21935)
Eliminates FLUTTER_NOLINT where they can be landed without triggering
lint failures.
2020-10-16 17:24:23 -07:00
Chinmay Garde
5bd7260a1e
Enable loading snapshots with sound null safety enabled. (#21820)
Snapshots compiled with sound null-safety enabled require changes to the way in
which isolates are launched. Specifically, the `Dart_IsolateFlags::null_safety`
field needs to be known upfront. The value of this field can only be determined
once the kernel snapshot is available. This poses a problem in the engine
because the engine used to launch the isolate at shell initialization and only
need the kernel mappings later at isolate launch (when transitioning the root
isolate to the `DartIsolate::Phase::Running` phase). This patch delays launch of
the isolate on the UI task runner till a kernel mapping is available. The side
effects of this delay (callers no longer having access to the non-running
isolate handle) have been addressed in this patch. The DartIsolate API has also
been amended to hide the method that could return a non-running isolate to the
caller.  Instead, it has been replaced with a method that requires a valid
isolate configuration that returns a running root isolate. The isolate will be
launched by asking the isolate configuration for its null-safety
characteristics.

A side effect of enabling null-safety is that Dart APIs that work with legacy
types will now terminate the process if used with an isolate that has sound
null-safety enabled. These APIs may no longer be used in the engine. This
primarily affects the Dart Convertors in Tonic that convert certain C++ objects
into the Dart counterparts. All known Dart Converters have been updated to
convert C++ objects to non-nullable Dart types inferred using type traits of the
corresponding C++ object. The few spots in the engine that used the old Dart
APIs directly have been manually updated. To ensure that no usage of the legacy
APIs remain in the engine (as these would cause runtime process terminations),
the legacy APIs were prefixed with the `DART_LEGACY_API` macro and the macro
defined to `[[deprecated]]` in all engine translation units. While the engine
now primarily works with non-nullable Dart types, callers can still use
`Dart_TypeToNonNullableType` to acquire nullable types for use directly or with
Tonic. One use case that is not addressed with the Tonic Dart Convertors is the
creation of non-nullable lists of nullable types. This hasn’t come up so far in
the engine.

A minor related change is reworking tonic to define a single library target.
This allows the various tonic subsystems to depend on one another. Primarily,
this is used to make the Dart convertors use the logging utilities. This now
allows errors to be more descriptive as the presence of error handles is caught
(and logged) earlier.

Fixes https://github.com/flutter/flutter/issues/59879
2020-10-16 14:53:26 -07: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
Jenn Magder
4494a83742
Add flag to not publish the observatory port over mDNS (#21883) 2020-10-15 14:53:20 -07:00
Jenn Magder
40c226e253
Revert "Add flag to not publish the observatory port over mDNS (#21632)" (#21882)
This reverts commit dc848f154b9c5534262e5b8d3f0360a1beafdeb5.
2020-10-15 12:32:24 -07:00
Jenn Magder
dc848f154b
Add flag to not publish the observatory port over mDNS (#21632)
* Add flag to not publish the observatory port over mDNS

* Review edits

* Format
2020-10-15 10:48:50 -07:00
Yuqian Li
c2938d06b1
Revert "Migration to PlatformDispatcher and multi-window #20496" (#21792)
* Revert "Fix documentation build for window changes. (#21780)"

This reverts commit 931a04683d6eb49fc92059b2384ac5b1618d5422.

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

This reverts commit 85b0031f73544e448354047dc6a236c0b0808252.
2020-10-12 19:26:41 -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