Commit Graph

65 Commits

Author SHA1 Message Date
Dan Field 43fa420b04 Make IOManager own resource context (#7272)
* Make IOManager own resource context
2019-01-14 13:46:38 -08:00
Zachary Anderson b7f6bf0192 Pass deadline to embedder idle notification callback (#7444) 2019-01-10 14:08:43 -08:00
Chinmay Garde b972f75db5 Allow embedders to add per shell idle notification callbacks. (#7427) 2019-01-09 14:33:56 -08:00
Gary Qian 0ea994a649 Minor Docs to runtime controller WindowData (#6991) 2018-12-12 17:25:56 -08:00
Jason Simmons 3978f07530 Keep a copy of each engine's description that can be accessed outside the engine's UI thread (#6885)
The service protocol's ListViews method needs to return description data for
each engine in the process.  Previously ListViews would queue a task to each
UI thread to gather this data.  However, the UI thread might be blocked from
executing tasks (e.g. if the Dart isolate is paused), resulting in a deadlock.

This change provides a copy of the engine's description data to the
ServiceProtocol's global list of engines, allowing ListViews to run without
accessing any UI threads.

Fixes https://github.com/flutter/flutter/issues/24400
2018-11-16 14:47:40 -08:00
Michael Goderbauer 09ef73ff6e Fix code smells reported by chrome's clang plugin (#6833) 2018-11-12 19:59:29 -08:00
Michael Goderbauer 70a1106b50 Unify copyright lines (#6757) 2018-11-07 12:24:35 -08:00
Chinmay Garde 20c805c973 Ensure that Scene::toImage renders texture backed images. (#6636)
TL;DR: Offscreen surface is created on the render thread and device to host
transfer performed there before task completion on the UI thread.

While attempting to snapshot layer trees, the engine was attempting to use the
IO thread context. The reasoning was that this would be safe to do because any
textures uploaded to the GPU as a result of async texture upload would have
originated from this context and hence the handles would be valid in either
context. As it turns out, while the handles are valid, Skia does not support
this use-case because cross-context images transfer ownership of the image from
one context to another. So, when we made the hop from the UI thread to the IO
thread (for snapshotting), if either the UI or GPU threads released the last
reference to the texture backed image, the image would be invalid. This led to
such images being absent from the layer tree snapshot.

Simply referencing the images as they are being used on the IO thread is not
sufficient because accessing images on one context after their ownership has
already been transferred to another is not safe behavior (from Skia's
perspective, the handles are still valid in the sharegroup).

To work around these issues, it was decided that an offscreen render target
would be created on the render thread. The color attachment of this render
target could then be transferred as a cross context image to the IO thread for
the device to host tranfer.

Again, this is currently not quite possible because the only way to create
cross context images is from encoded data. Till Skia exposes the functionality
to create cross-context images from textures in one context, we do a device to
host transfer on the GPU thread. The side effect of this is that this is now
part of the frame workload (image compression, which dominate the wall time,
is still done of the IO thread).

A minor side effect of this patch is that the GPU latch needs to be waited on
before the UI thread tasks can be completed before shell initialization.
2018-10-22 17:40:24 -07:00
Michael Klimushyn abd04b459c Programmatically set the root isolate's debug name (#6596)
An integration test will be added to the framework's repo as a followup.

Addresses flutter/flutter#22009
2018-10-18 14:47:24 -07:00
Gary Qian 35340ceaf0 Pass full locale list with script and variant codes to framework (#6557)
* Locale Passing

* Pass full locale list and script and variant codes to framework

* Working Android locale list passing and fallback
2018-10-17 10:53:01 -07:00
Gary Qian 61cf4c01fd Pass scriptcode and variantcode to dart:ui Window. (#6493) 2018-10-10 17:22:59 -07:00
Jonah Williams dcd2956f88 Initial support for more finely-grained a11y features on Window (#5901) 2018-07-31 18:18:19 -07:00
Chinmay Garde 9f8285ac6c Remove all dependencies on Garnet. (#5869) 2018-07-26 12:49:34 -07:00
Jason Simmons 0bad812c72 Migrate to a standalone Tonic repository separated from Topaz (#5817) 2018-07-23 11:49:35 -07:00
Jonah Williams 2e57ecd38f Revert rollback of "add assistiveTechnologyEnabled to window" (#5750) 2018-07-16 09:04:20 -07:00
Jonah Williams 9af920ef22 Revert "Add assistiveTechnologyEnabled flag to window" (#5746)
Reverts flutter/engine#5740
2018-07-13 15:55:49 -07:00
Jonah Williams 9ece2752aa Add assistiveTechnologyEnabled flag to window (#5740) 2018-07-13 13:47:31 -07:00
Jason Simmons efd6663344 Maintain a FontCollection for each engine instance instead of a process-wide singleton (#5521) 2018-06-13 14:28:21 -07:00
Ben Konyi 8d8d91bfc3 IsolateNameServer reland (#5519)
* Reland "Added IsolateNameServer functionality (#5410)"

This reverts commit c3976b3c71.

* Fixed issue with isolate_name_server_test which caused test to timeout

* Disabled thread_annotations on Android as they aren't supported in the
NDK headers for std::mutex. Readded thread annotations to
IsolateNameServer.
2018-06-13 11:57:10 -07:00
Ben Konyi c3976b3c71 Revert "Added IsolateNameServer functionality (#5410)" (#5516)
This reverts commit 61a2d129cf.
2018-06-12 17:03:13 -07:00
Ben Konyi 61a2d129cf Added IsolateNameServer functionality (#5410)
* Added IsolateNameServer functionality, which allows for the association
of string names with isolate SendPort ids that can be used to establish
inter-isolate communications.
2018-06-12 15:50:48 -07:00
Chinmay Garde 5441ee79ff Allow embedders to specify a custom advisory URI and entrypoint. (#5408)
The Fuchsia embedder wants to specify the application name in the field for the advisory URI. This allows embedders to specify whatever they want.
2018-05-29 15:10:12 -07:00
Ryan Macnak fb709e25e3 [fuchsia] Plumbing for sharing between AOT snapshots. (#5351) 2018-05-24 13:24:14 -07:00
Chinmay Garde d97b6d859a Allow explicit specification of the isolate snapshot. (#5193)
The mobile shells all use the same isolate snapshot. This is also the snapshot used by the service isolate. This works towards a world where the isolate snapshot is no longer a member variable of the DartVM instance. Instead, all snapshots must be specified in the run configuration. For now, the new `Shell::Create` overload will only be used by Fuchsia till I refactor `dart_vm.cc`.

There are no API updates to the mobile shells.
2018-05-07 17:28:31 -07:00
Chinmay Garde 00911b2a85 Don't send platform messages to isolates that are not running. (#5031)
Isolates may be launched and awaiting snapshot association. We don't
want to send such isolates any messages before their "main" method is
called. In such cases, the engine may intercept and store certain
launch specific information.
2018-04-17 17:10:17 -07:00