- 04 10月, 2019 1 次提交
-
- 17 9月, 2019 1 次提交
-
-
由 George Wright 提交于
Manage resource and onscreen contexts using separate IOSGLContext objects. FlutterView owns the onscreen context, and PlatformViewIOS owns the resource context.
-
- 12 9月, 2019 2 次提交
-
-
由 Jim Graham 提交于
This reverts commit 4ac0663d.
-
由 George Wright 提交于
Manage resource and onscreen contexts using separate IOSGLContext objects. FlutterView owns the onscreen context, and PlatformViewIOS owns the resource context.
-
- 07 9月, 2019 2 次提交
-
-
由 Kaushik Iska 提交于
Revert "Manage resource and onscreen contexts using separate IOSGLContext objects (#11798)" (#12055) This reverts commit a353f93d.
-
由 George Wright 提交于
Manage resource and onscreen contexts using separate IOSGLContext objects
-
- 24 8月, 2019 2 次提交
-
-
由 Dan Field 提交于
-
由 Chinmay Garde 提交于
Uses the same technique used during OpenGL composition to elide root surface access. The refactoring of this approach is tracked in https://github.com/flutter/flutter/issues/38466 Fixes https://github.com/flutter/flutter/issues/39009.
-
- 14 8月, 2019 1 次提交
-
-
由 Chinmay Garde 提交于
This patch allows embedders to split the Flutter layer tree into multiple chunks. These chunks are meant to be composed one on top of another. This gives embedders a chance to interleave their own contents between these chunks. The Flutter embedder API already provides hooks for the specification of textures for the Flutter engine to compose within its own hierarchy (for camera feeds, video, etc..). However, not all embedders can render the contents of such sources into textures the Flutter engine can accept. Moreover, this composition model may have overheads that are non-trivial for certain use cases. In such cases, the embedder may choose to specify multiple render target for Flutter to render into instead of just one. The use of this API allows embedders to perform composition very similar to the iOS embedder. This composition model is used on that platform for the embedding of UIKit view such and web view and map views within the Flutter hierarchy. However, do note that iOS also has threading configurations that are currently not available to custom embedders. The embedder API updates in this patch are ABI stable and existing embedders will continue to work are normal. For embedders that want to enable this composition mode, the API is designed to make it easy to opt into the same in an incremental manner. Rendering of contents into the “root” rendering surface remains unchanged. However, now the application can push “platform views” via a scene builder. These platform views need to handled by a FlutterCompositor specified in a new field at the end of the FlutterProjectArgs struct. When a new platform view in introduced within the layer tree, the compositor will ask the embedder to create a new render target for that platform view. Render targets can currently be OpenGL framebuffers, OpenGL textures or software buffers. The type of the render target returned by the embedder must be compatible with the root render surface. That is, if the root render surface is an OpenGL framebuffer, the render target for each platform view must either be a texture or a framebuffer in the same OpenGL context. New render target types as well as root renderers for newer APIs like Metal & Vulkan can and will be added in the future. The addition of these APIs will be done in an ABI & API stable manner. As Flutter renders frames, it gives the embedder a callback with information about the position of the various platform views in the effective hierarchy. The embedder is then meant to put the contents of the render targets that it setup and had previously given to the engine onto the screen (of course interleaving the contents of the platform views). Unit-tests have been added that test not only the structure and properties of layer hierarchy given to the compositor, but also the contents of the texels rendered by a test compositor using both the OpenGL and software rendering backends. Fixes b/132812775 Fixes flutter/flutter#35410
-
- 13 8月, 2019 1 次提交
-
-
由 Kaushik Iska 提交于
After pre-roll we know if there have been any mutations made to the IOS embedded UIViews. If there are any mutations and the thread configuration is such chat the mutations will be committed on an illegal thread (GPU thread), we merge the threads and keep them merged until the lease expires. The lease is currently set to expire after 10 frames of no mutations. If there are any mutations in the interim we extend the lease. TaskRunnerMerger will ultimately be responsible for enforcing the correct thread configurations. This configuration will be inactive even after this change since still use the same thread when we create the iOS engine. That is slated to change in the coming PRs.
-
- 03 7月, 2019 4 次提交
-
-
由 Kaushik Iska 提交于
* ExternalViewEmbedder can CancelFrame after pre-roll - Resets the state so next pre-roll can be successful. - Commit any pending `CATransaction` so we don't create nested transactions. * Update flow/embedded_views.h
-
由 Kaushik Iska 提交于
* refactoring to move the mutator stack handling to preroll * more review fixes * Add support for external view embedded to know if it has changed * remove the need to reset * address comments * Rename to HasPendingViewOperations
-
由 Chris Yang 提交于
* refactoring to move the mutator stack handling to preroll * more review fixes
-
由 Chris Yang 提交于
-
- 13 6月, 2019 1 次提交
-
-
由 Zachary Anderson 提交于
* Revert "[fuchsia] Fix alignment of Fuchsia/non-Fuchsia tracing (#9289)" This reverts commit f80ac5f5. * Revert "Align fuchsia and non-fuchsia tracing (#9199)" This reverts commit 78265484.
-
- 06 6月, 2019 1 次提交
-
-
由 Dan Field 提交于
-
- 18 4月, 2019 1 次提交
-
-
由 liyuqian 提交于
This follows our namespace change from shell to flutter: https://github.com/flutter/engine/pull/8520.
-
- 10 4月, 2019 1 次提交
-
-
由 Chinmay Garde 提交于
-
- 23 1月, 2019 1 次提交
-
-
由 Brian Osman 提交于
Behavior (visual) changes should be very minor. Things that are to be expected: * A few things were not color managed correctly by the transform canvas (color emoji, some color filters). Those will be handled correctly with the tagged surfaces (although we're always transforming to sRGB, so nothing should change until we target a wider gamut). * Image filtering will happen in the source color space, rather than the destination. Very minor. * The transform canvas did caching of images in the destination color space. Now, the conversion happens at draw time. If there are performance issues, images can be pre-converted to the destination with makeColorSpace().
-
- 10 11月, 2018 2 次提交
-
-
由 Amir Hardon 提交于
Right now we do it whenever the platform views preview flag is on. This is less efficient, filed https://github.com/flutter/flutter/issues/24133 to only do this when there's a platform view in the tree.
-
由 Amir Hardon 提交于
-
- 09 11月, 2018 2 次提交
-
-
由 Amir Hardon 提交于
Moved the frame buffer specific logic from IOSGLContext to IOSGLRenderTarget. use recording canvases for overlays Support platform view overlays with gl rendering. This also changes the overlay canvases (for both software and gl rendering) be recording canvases, and only rasterize them after finishing the paint traversal.
-
由 Amir Hardon 提交于
When we visit a PlatformViewLayer during the paint traversal it replaces the PaintContext's canvas with a new one that is painted ontop of the embedded view. We need to make sure that operations applied by parent layers are also applied to the new canvas. To achieve this we collect all the canvases in a SkNWayCanvas and use this canvas by non leaf nodes. Leaf nodes still paint only to the "current" canvas. This PR moves the overlay canvas creation from the paint phase to the preroll phase, collects them into a SkNWayCanvas and set it in PaintContext. To keep this PR focused, I only used the internal_nodes_canvas in the tranform_layer. Will followup with a PR that changes all internal layers to use the internal_nodes_canvas.
-
- 08 11月, 2018 1 次提交
-
-
由 Michael Goderbauer 提交于
-
- 06 11月, 2018 1 次提交
-
-
由 Amir Hardon 提交于
When the flag is true, we currently use a single thread configuration, and disabled the raster cache for opacity layers. The flag's name is 'io.flutter_embedded_views_preview'.
-
- 02 11月, 2018 1 次提交
-
-
由 Amir Hardon 提交于
The overlay surfaces are going to be the same IOSSurface implementation with the platform views controller set to null (so these are surfaces that don't support embedding platform views to them). * Adds a FlutterOverlayView which is a UIView that's showing an overlay surface. * Creates an overlay surface for each embedded UIView (done in FlutterPlatformViewsController). * Changes CompositeEmbeddedView to return a new canvas. * Makes the PlatformViewLayer replace the PaintContext's canvas with the canvas for the overlay view. * Changed canvas in PaintContext to be a pointer so it can be changed. TBD in following PRs: * Copy the current canvas state when replacing a canvas in PaintContext. * Make FlutterOverlayView work with a GL backend (currently it only works with software rendering)
-
- 01 11月, 2018 2 次提交
-
-
由 Amir Hardon 提交于
Also tracks the order of embedded views from frame to frame, and only removes and reattaches subviews if there is a structural change to the UIView hierarchy.
-
由 Amir Hardon 提交于
This PR breaks PlatformViewsController's construction dependency on FlutterView, which allows making FlutterEngine its owner instead of FlutterViewController. Also renamed the FlutterScreenshotDelegate to FlutterViewEngineDelegate which is FlutterView's delegate to the engine, and expanded it to provide a view embedder.
-
- 27 10月, 2018 1 次提交
-
-
由 Amir Hardon 提交于
For flow to manipulate the embedded UIViews during the paint traversal it needs some hook in PaintContext. This PR introduces a ViewEmbeder interface that is implemented by the iOS PlatformViewsController and plumbs it into PaintContext. The ViewEmbedder interface is mainly a place holder at this point, as this PR is focused on just the plumbing.
-
- 27 7月, 2018 1 次提交
-
-
由 Chinmay Garde 提交于
-
- 14 4月, 2018 1 次提交
-
-
由 Chinmay Garde 提交于
* Re-land "Support multiple shells in a single process. (#4932)" This reverts commit 723c7d01.
-
- 13 4月, 2018 1 次提交
-
-
由 Vyacheslav Egorov 提交于
This reverts commit a3327bff.
-
- 12 4月, 2018 1 次提交
-
-
由 Chinmay Garde 提交于
This reverts commit 9199b40f.
-
- 11 4月, 2018 2 次提交
-
-
由 Chinmay Garde 提交于
This reverts commit 6baff4c8.
-
由 Chinmay Garde 提交于
* Support multiple shells in a single process. The Flutter Engine currently works by initializing a singleton shell instance. This shell has to be created on the platform thread. The shell is responsible for creating the 3 main threads used by Flutter (UI, IO, GPU) as well as initializing the Dart VM. The shell, references to task runners of the main threads as well as all snapshots used for VM initialization are stored in singleton objects. The Flutter shell only creates the threads, rasterizers, contexts, etc. to fully support a single Flutter application. Current support for multiple Flutter applications is achieved by making multiple applications share the same resources (via the platform views mechanism). This scheme has the following limitations: * The shell is a singleton and there is no way to tear it down. Once you run a Flutter application in a process, all resources managed by it will remain referenced till process termination. * The threads on which the shell performs its operations are all singletons. These threads are never torn down and multiple Flutter applications (if present) have to compete with one another on these threads. * Resources referenced by the Dart VM are leaked because the VM isn't shutdown even when there are no more Flutter views. * The shell as a target does not compile on Fuchsia. The Fuchsia content handler uses specific dependencies of the shell to rebuild all the shell dependencies on its own. This leads to differences in frame scheduling, VM setup, service protocol endpoint setup, tracing, etc.. Fuchsia is very much a second class citizen in this world. * Since threads and message loops are managed by the engine, the engine has to know about threading and platform message loop interop on each supported platform. Specific updates in this patch: * The shell is no longer a singleton and the embedder holds the unique reference to the shell. * Shell setup and teardown is deterministic. * Threads are no longer managed by the shell. Instead, the shell is given a task runner configuration by the embedder. * Since the shell does not own its threads, the embedder can control threads and the message loops operating on these threads. The shell is only given references to the task runners that execute tasks on these threads. * The shell only needs task runner references. These references can be to the same task runner. So, if the embedder thinks that a particular Flutter application would not need all the threads, it can pass references to the same task runner. This effectively makes Flutter application run in single threaded mode. There are some places in the shell that make synchronous calls, these sites have been updated to ensure that they don’t deadlock. * The test runner and the headless Dart code runner are now Flutter applications that are effectively single threaded (since they don’t have rendering concerns of big-boy Flutter application). * The embedder has to guarantee that the threads and outlive the shell. It is easy for the embedder to make that guarantee because shell termination is deterministic. * The embedder can create as many shell as it wants. Typically it creates a shell per Flutter application with its own task runner configuration. Most embedders obtain these task runners from threads dedicated to the shell. But, it is entirely possible that the embedder can obtain these task runners from a thread pool. * There can only be one Dart VM in the process. The numerous shell interact with one another to manage the VM lifecycle. Once the last shell goes away, the VM does as well and hence all resources associated with the VM are collected. * The shell as a target can now compile and run on Fuchsia. The current content handler has been removed from the Flutter engine source tree and a new implementation has been written that uses the new shell target. * Isolate management has been significantly overhauled. There are no owning references to Dart isolates within the shell. The VM owns the only strong reference to the Dart isolate. The isolate that has window bindings is now called the root isolate. Child isolates can now be created from the root isolate and their bindings and thread configurations are now inherited from the root isolate. * Terminating the shell terminates its root isolates as well as all the isolates spawned by this isolate. This is necessary be shell shutdown is deterministic and the embedder is free to collect the threads on which the isolates execute their tasks (and listen for mircrotasks flushes on). * Launching the root isolate is now significantly overhauled. The shell side (non-owning) reference to an isolate is now a little state machine and illegal state transitions should be impossible (barring construction issues). This is the only way to manage Dart isolates in the shell (the shell does not use the C API is dart_api.h anymore). * Once an isolate is launched, it must be prepared (and hence move to the ready phase) by associating a snapshot with the same. This snapshot can either be a precompiled snapshot, kernel snapshot, script snapshot or source file. Depending on the kind of data specified as a snapshot as well as the capabilities of the VM running in the process, isolate preparation can fail preparation with the right message. * Asset management has been significantly overhauled. All asset resolution goes through an abstract asset resolver interface. An asset manager implements this interface and manages one or more child asset resolvers. These asset resolvers typically resolve assets from directories, ZIP files (legacy FLX assets if provided), APK bundles, FDIO namespaces, etc… * Each launch of the shell requires a separate and fully configured asset resolver. This is necessary because launching isolates for the engine may require resolving snapshots as assets from the asset resolver. Asset resolvers can be shared by multiple launch instances in multiple shells and need to be thread safe. * References to the command line object have been removed from the shell. Instead, the shell only takes a settings object that may be configured from the command line. This makes it easy for embedders and platforms that don’t have a command line (Fuchsia) to configure the shell. Consequently, there is only one spot where the various switches are read from the command line (by the embedder and not the shell) to form the settings object. * All platform now respect the log tag (this was done only by Android till now) and each shell instance have its own log tag. This makes logs from multiple Flutter application in the same process (mainly Fuchsia) more easily decipherable. * The per shell IO task runner now has a new component that is unfortunately named the IOManager. This component manages the IO GrContext (used for asynchronous texture uploads) that cooperates with the GrContext on the GPU task runner associated with the shell. The IOManager is also responsible for flushing tasks that collect Skia objects that reference GPU resources during deterministic shell shutdown. * The embedder now has to be careful to only enable Blink on a single instance of the shell. Launching the legacy text layout and rendering engine multiple times is will trip assertions. The entirety of this runtime has been separated out into a separate object and can be removed in one go when the migration to libtxt is complete. * There is a new test target for the various C++ objects that the shell uses to interact with the Dart VM (the shell no longer use the C API in dart_api.h). This allows engine developers to test VM/Isolate initialization and teardown without having the setup a full shell instance. * There is a new test target for the testing a single shell instances without having to configure and launch an entire VM and associated root isolate. * Mac, Linux & Windows used to have different target that created the flutter_tester referenced by the tool. This has now been converted into a single target that compiles on all platforms. * WeakPointers vended by the fml::WeakPtrFactory(notice the difference between the same class in the fxl namespace) add threading checks on each use. This is enabled by getting rid of the “re-origination” feature of the WeakPtrFactory in the fxl namespace. The side effect of this is that all non-thread safe components have to be created, used and destroyed on the same thread. Numerous thread safety issues were caught by this extra assertion and have now been fixed. * Glossary of components that are only safe on a specific thread (and have the fml variants of the WeakPtrFactory): * Platform Thread: Shell * UI Thread: Engine, RuntimeDelegate, DartIsolate, Animator * GPU Thread: Rasterizer, Surface * IO Thread: IOManager This patch was reviewed in smaller chunks in the following pull requests. All comments from the pulls requests has been incorporated into this patch: * flutter/assets: https://github.com/flutter/engine/pull/4829 * flutter/common: https://github.com/flutter/engine/pull/4830 * flutter/content_handler: https://github.com/flutter/engine/pull/4831 * flutter/flow: https://github.com/flutter/engine/pull/4832 * flutter/fml: https://github.com/flutter/engine/pull/4833 * flutter/lib/snapshot: https://github.com/flutter/engine/pull/4834 * flutter/lib/ui: https://github.com/flutter/engine/pull/4835 * flutter/runtime: https://github.com/flutter/engine/pull/4836 * flutter/shell: https://github.com/flutter/engine/pull/4837 * flutter/synchronization: https://github.com/flutter/engine/pull/4838 * flutter/testing: https://github.com/flutter/engine/pull/4839
-
- 05 12月, 2017 1 次提交
-
-
由 Brian Osman 提交于
Fixes flutter/flutter#13308 Overlooked this case when I previously removed linear blending. MakeS32 creates a surface with a color space attached (triggering the linear blending behavior). MakeN32 creates a legacy surface (no color space), which matches what the other backend bindings do (including the GL surface factory, and the raster cache).
-
- 17 10月, 2017 1 次提交
-
-
由 Chinmay Garde 提交于
-
- 13 9月, 2017 1 次提交
-
-
由 Michael Goderbauer 提交于
* format * license script adaptions * updated licenses * review comments
-
- 12 9月, 2017 1 次提交
-
-
由 George Kulakowski 提交于
* Fix remaining ftl->fxl conversions The previous scripting pass at this did not account for objective c file endings * Update tonic DEPS reference to the post-fxl version
-
- 19 7月, 2017 1 次提交
-
-
由 Brian Osman 提交于
Revert "Revert "Reland "Run Flutter on iOS and Android with color correct Skia (#3826)" (#3878)" (#3895) This reverts commit 1db18a40.
-