- 27 6月, 2020 1 次提交
-
-
由 David Worsham 提交于
Additionally create "_next" permutations for all of the test binaries on Fuchsia, in order to test both code-paths. Using the #define follow-up CLs can also create a flutter_runner_next binary that does not contain any legacy integration code. BUG: 53847
-
- 29 5月, 2020 1 次提交
-
-
由 Jim Graham 提交于
Choose a child more likely to remain stable from frame to frame as the target to cache in the OpacityLayer.
-
- 08 5月, 2020 1 次提交
-
-
由 liyuqian 提交于
This reverts commit a7a25d3b and relands our reland https://github.com/flutter/engine/pull/17915. Additionally, we fixed the cull rect logic in `OpacityLayer::Preroll` which is the root cause of https://github.com/flutter/flutter/issues/56298. We've always had that root problem before but it did not trigger performance issues because we were using the OpacityLayer's `paint_bounds`, instead of its child's `paint_bounds` for preparing the layer raster cache. A correct handling of the cull rect should allow us to cull at any level. It also turns out that our ios32 (iPhone4s) performacne can regress a lot without snapping. My theory is that although the picture has a fractional top left corner, many drawing operations inside the picture have integral coordinations. In older hardwares, keeping those coordinates integral seems to be performance critical. To avoid flutter/flutter#41654, the snapping will still be disabled if the matrix has non-scale-translation transformations.
-
- 05 5月, 2020 1 次提交
-
-
由 liyuqian 提交于
-
- 02 5月, 2020 1 次提交
-
-
由 liyuqian 提交于
This reverts commit b5aedb30 and relands #17712. Fixes flutter/flutter#53288 and flutter/flutter#41654. Together with #17791, this reland addresses some of Jim's concerns in the original PR #17712. The major part of this PR is still the same as the original PR, and the performance / golden image impacts should be the same.
-
- 24 4月, 2020 1 次提交
-
-
由 liyuqian 提交于
This avoids the possible matrix mismatch between RasterCache::Get and RasterCacheResult::draw. See https://github.com/flutter/engine/pull/17790 for an example that tries to fix an earlier mismatch.
-
- 17 4月, 2020 2 次提交
-
-
由 liyuqian 提交于
This fixes https://github.com/flutter/flutter/issues/53288 and https://github.com/flutter/flutter/issues/41654. It removes the problematic `GetIntegralTransCTM`, but preserves the rect round-out in `RasterCacheResult::draw` for performance considerations: the average frame raster time doesn't change much but the worst frame raster time significantly regressed if rect round-out is removed. That's probably because a new shader needs to be compiled to draw raster cache with fractional offsets.
- 03 3月, 2020 1 次提交
-
-
由 Chris Bracken 提交于
Revert "Try rasterizing images and layers only once , even when their rasterization fails. Further enforce the same access threshold on layers as on Pictures. Previously layers would always be cached. The latter is a semantic change. (#16545)" (#16889) This caused regression in several benchmarks, including: animated_placeholder_perf. Regression tracked in https://github.com/flutter/flutter/issues/51776. This reverts commit 01a52b99.
-
- 29 2月, 2020 1 次提交
-
-
由 Sebastian Jeltsch 提交于
Try rasterizing images and layers only once, even when their rasterization fails. Further enforce the same access threshold on layers as on Pictures. Previously layers would always be cached. The latter is a semantic change. (#16545) If Rasterization fails, i.e. image.is_valid() is false, the cache might try rasterizing the image again on the next frame. Not only is this wasteful put might also prevent other pictures to be cached within the current frame budget.
-
- 07 2月, 2020 1 次提交
-
-
由 Sebastian Jeltsch 提交于
RasterCache::Get() methods were not updating the RasterCache::Entry access_count and used_this_frame fields, as is done in RasterCache::Prepare(). This can result in onscreen images being evicted from the cache as new entries are created (e.g. as new elements scroll onscreen).
-
- 09 11月, 2019 1 次提交
-
-
由 Michael Klimushyn 提交于
This is a duplicate of flutter/engine#13360 with the test switched to use the software backend instead of the GL backend. After some debugging and testing on another GL embedder I think the issue with the test is some bug having to do with the GL implementation in the test harness specifically. Fixes flutter/flutter#38903
-
- 31 10月, 2019 2 次提交
-
-
由 Michael Klimushyn 提交于
This caused EmbedderTest.VerifyB143464703 to fail after merging into master. ``` ../../flutter/shell/platform/embedder/tests/embedder_unittests.cc:3111: Failure Value of: ImageMatchesFixture("verifyb143464703.png", renderered_scene) Actual: false Expected: true [ FAILED ] EmbedderTest.VerifyB143464703 (2507 ms) ``` This reverts commit 3ad3bc76.
-
由 Michael Klimushyn 提交于
Previously the cache was disabled on whether or not PlatformViews were globally enabled. Instead track their existence in the view hierarchy and only disable RasterCache if a PlatformView is actually present.
-
- 18 4月, 2019 1 次提交
-
-
由 liyuqian 提交于
This follows our namespace change from shell to flutter: https://github.com/flutter/engine/pull/8520.
-
- 29 3月, 2019 1 次提交
-
-
由 liyuqian 提交于
-
- 14 3月, 2019 1 次提交
-
-
由 Chinmay Garde 提交于
Reland ""Add support for trace counters with variable arguments and instrument the raster cache." (#8145) This reverts commit bc901324 and fixes the discovered on Windows builds.
-
- 12 3月, 2019 2 次提交
-
-
由 Chinmay Garde 提交于
Revert "Add support for trace counters with variable arguments and instrument the raster cache. (#8094)" (#8122) This reverts commit 2a0d3542.
-
由 Chinmay Garde 提交于
-
- 09 2月, 2019 1 次提交
-
-
由 liyuqian 提交于
This decreases worst_frame_rasterizer_time_millis from 30ms to 10ms when we enabled picture raster cache in tiles_scroll (i.e., lower the threshold from 10 to 5).
-
- 13 11月, 2018 1 次提交
-
-
由 Michael Goderbauer 提交于
-
- 08 11月, 2018 1 次提交
-
-
由 Michael Goderbauer 提交于
-
- 12 10月, 2018 3 次提交
-
-
由 liyuqian 提交于
Reverts flutter/engine#6442 container_layer.h file is not synced which broke the bots
-
由 liyuqian 提交于
We first test this with OpacityLayer. This test alone (without retained rendering) should have ~30% speedup as we'll have fewer render target switches by snapshoting in the Preroll instead of saveLayer in the Paint. In my local flutter_gallery transition perf tests, the average frame time drops from ~16ms to ~12ms. https://github.com/flutter/flutter/issues/21756
- 12 9月, 2018 1 次提交
-
-
由 liyuqian 提交于
It should be sufficient to provide the matrix to preroll.
-
- 29 8月, 2018 1 次提交
-
-
由 Chinmay Garde 提交于
-
- 27 7月, 2018 1 次提交
-
-
由 Chinmay Garde 提交于
-
- 24 5月, 2018 1 次提交
-
-
由 liyuqian 提交于
Fixes 1. https://github.com/flutter/flutter/issues/12148 2. most part of https://github.com/flutter/flutter/issues/17731 except some tiny AA diffs.
-
- 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
-
- 30 3月, 2018 1 次提交
-
-
由 Jeff Brown 提交于
-
- 17 3月, 2018 1 次提交
-
-
由 mikejurka 提交于
-
- 09 11月, 2017 1 次提交
-
-
由 mikejurka 提交于
Plumb through Scenic display metrics to use during Preroll.
-
- 12 9月, 2017 1 次提交
-
-
由 George Kulakowski 提交于
-
- 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.
-
- 14 7月, 2017 1 次提交
-
-
由 Collin Jackson 提交于
This reverts commit 2d9155e1. Fixes a regression with semitransparent images (flutter/flutter#11169)
-