During the implementation of custom compositor integration, the embedder gets
callbacks on the render thread to prepare render targets (framebuffers,
textures, etc) for the engine to render into, callbacks to present these render
targets along with platform managed contents, and, callbacks to collect render
targets once they can no longer be recycled by the engine in subsequent frames.
During these callbacks, the engine mandates the OpenGL state on the render
thread be preserved. This restriction has been the source of hard to isolate
issues where the embedder trampled on the OpenGL bindings state in the callback
but failed to restore state before control went back to the engine. Due to the
nature of the OpenGL API, such errors are easy to make and overlook. This patch
lifts the restriction from the embedder. Embedders may now freely work with the
OpenGL state in custom compositor callbacks and the engine will make sure to
disregard OpenGL bindings when control flows back to it.
Disregarding current OpenGL state has a certain performance penalty and the
majority of this patch handles refactoring various engine embedder components
such that this happens only once per frame. The most trivial version of this
patch would reset context bindings on every transition of control flow from the
embedder to the engine. However, that naive approach would have necessitated
more than 50 binding resets in existing unit-test cases (depending on the number
of platform view interleaving levels and render target recycling hit rates). In
this implementation, bindings will be reset only once per frame and this does
not depend on the number of platform views in the scene.
The majority of this patch is a refactoring of engine subsystems used in
`ExternalViewEmbedder::SubmitFrame` which is thoroughly documented with each
opportunity for the embedder to invalidate OpenGL state tagged.
The refactoring also enables the implementation of the following optimizations
to engine behavior which should aid in reducing the memory needed for the
creation of render targets. These optimization include:
* The engine will only ask the embedder for render targets in which it expects
to render into. This was a quirk in the way in which root and non-root render
targets were handled. The engine could require the embedder to create a render
target but then realize it didn’t have anything to render into it. In the
presentation callback, it would skip that render target. But the embedder
still had to allocate that extra render target. This will no longer be the
case and should reduce memory use.
* The engine may now skip always realizing (via the embedder render target
creation callback) and presenting the root render target. This was also a side
effect of the same quirk. Previously, the engine would always ask the embedder
to present the root render target even if it was empty. Since this is no
longer the case, few render targets should be allocated which will reduce
memory consumption.
* The engine will now ask the embedder to collect unused render targets before
it asks it to create new ones. The previous behavior was to ask the embedder
for new targets and then collect old ones. This would cause spikes in memory
use when the size of the render targets would change. These memory use spikes
should now be troughs.
* The previous render target cache also considered the platform view ID in cache
viability considerations (instead of just the size of the render target). This
was a bug which has been fixed. This should lead to better cache utilization
in some situations.
These optimizations are now codified in unit-tests and the updated test
expectations are a result of these optimizations now being in place.
* Fixes https://github.com/flutter/flutter/issues/50751
* Fixes https://github.com/flutter/flutter/issues/46911
* Fixes https://github.com/flutter/flutter/issues/43778
* Fixes b/146142979
* making edge default test browser on windows. adding some skips (not all) for methods failing on edge
* skip failing tests. make egde default for testing
* skip one more test
* addressing reviewer comments. removing extra bat file
This change creates a test only implementation of flutter::Surface backed by an
offscreen Vulkan GrContext. Much of the code in this test Surface was lifted
from flutter::VulkanWindow which I was unable to use without extricating it
from the VkSurface/VkSwapchain code which we do not want to use in offscreen
tests. I would recommend refactoring VulkanWindow to separate GrContext
creation and VkSwapchain creation in order to promote greater code reuse
between onscreen and offscreen vulkan paths.
This change is excersised thoroughly by the shell tests and was manually
tested against these tests on Fuchsia on Intel.
* Manual roll of Dart 0299903f3e...fcf88fe6fa
dart-lang/sdk@ fcf88fe6fa Revert "[vm/concurrency] Remove redundant isolates list, ensure shutdown procedure waits until the isolates actually got deleted"
dart-lang/sdk@ c894118574 [dart2js] Migrate js patch file to NNBD.
dart-lang/sdk@ 0d34bf5571 Remove another one of the unittest-like libraries.
dart-lang/sdk@ 40d544bc26 Always count non-core libs when tracking migration progress.
dart-lang/sdk@ 9e2d9ecd92 tests for missing getter/setter available suggestions
dart-lang/sdk@ 63c8bb7e46 Collect information about the AST structure at completion points
dart-lang/sdk@ c7b501625e Validate not only errors, but also warnings.
dart-lang/sdk@ 867d6537df enum constant and named cons test cases
dart-lang/sdk@ 01e079eff1 The initial dartdev pub * command - pass on all arguments from the 'dartdev pub *' invocation directly to 'pub *'.
dart-lang/sdk@ 4bde1f1851 Migration: test to make sure exact nullability isn't applied too much.
dart-lang/sdk@ ed705e8c84 Move DEAD_NULL_COALESCE reporting to ErrorVerifier.
dart-lang/sdk@ 93bb4b0f1b [dart2js] Migrate a couple of trivial libraries to nnbd.
dart-lang/sdk@ b03ef5b3fe Convert more doc comments in analysis_server
dart-lang/sdk@ 4ca3d267ee Run legacy co19 tests in analyzer-asserts-weak configuration.
dart-lang/sdk@ 166edab750 [dart2js] Migrate developer patch file to nnbd.
dart-lang/sdk@ 0838c9ebc2 Enable co19_2 legacy tests in the NNBD bots.
dart-lang/sdk@ d42b7bc15a partition imported/not-imported suggestion sets / de-dup
dart-lang/sdk@ 6a7d4e22b5 [vm/aot] Include entries for null in the dispatch table to avoid check.
dart-lang/sdk@ 27e64c309e [vm/aot] Optimize selector offsets for smaller instruction sequences.
dart-lang/sdk@ 1c2d378068 [vm/aot] Use TFA to eliminate unused selectors in dispatch table.
dart-lang/sdk@ 022b362e84 [vm/aot/tfa] Add missing visitor methods for call site instrumentation.
dart-lang/sdk@ e75c9192a1 Start converting dartdoc style in analysis_server
dart-lang/sdk@ 16033f922d Enable prefer_contains in analysis_server
dart-lang/sdk@ 1cc9413926 Add dartfix support for prefer_contains
dart-lang/sdk@ bcc0900e6a [vm] AOT blobs snapshots are obsolete. Remove dead code.
dart-lang/sdk@ a0323c755f convert test path (for windows)
dart-lang/sdk@ c90fca7188 [infra] Inline content of cloud epiloque file into approval script
dart-lang/sdk@ 902e2b097b Revert "[vm] Arm Assembler simplify code for SubImmediateSetFlags"
dart-lang/sdk@ c096f9d6e5 [gardening] Fix 3H patching logic with respect to newly added dependencies.
dart-lang/sdk@ 34447c8dbb Revert "[ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API"
dart-lang/sdk@ 0a8484ca20 [CFE/VM] Add patch after 'Use package config v2'
dart-lang/sdk@ f1d715b4d6 [dart2js] migrate dart:_interceptors and dart:internal patch files
dart-lang/sdk@ 3fbf5f93b6 [vm, service] Fix stack overflow in heap_snapshot.dart's data representation.
dart-lang/sdk@ 43bbf73da3 Update doc comments for dart:js_util
dart-lang/sdk@ fb7e6ba494 fix nnbd http parsing bug for http_headers_test
dart-lang/sdk@ cefd113de2 [dart2js] Migrate convert to nnbd.
dart-lang/sdk@ ddef611e04 Copy over the README.
dart-lang/sdk@ ca6cb6ce75 Always pass --default-language-version=2.7 to analyzer for legacy tests.
dart-lang/sdk@ 0a57671f90 [vm/nnbd] Use legacy types to create lists in Dart_NewListOf
dart-lang/sdk@ 5c332bea91 Stop using 'factory something() => null;' in most cases.
dart-lang/sdk@ 3d1b8b26c2 [ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API
dart-lang/sdk@ 91eee195fc [http] loosen status code constraints and rephrase some http exceptions
dart-lang/sdk@ 86b1b9d03c Enhance member depth completion metrics
dart-lang/sdk@ dd9adebad0 [dartdevc] Fixes to support un-forking dart:_runtime
dart-lang/sdk@ 84ff9e5008 Fix NullabilityEliminator to substitute type parameters in bounds.
dart-lang/sdk@ 0966e06ee4 Reland "[vm/nnbd] Enable type testing stubs in NNBD weak mode"
dart-lang/sdk@ f57f1eb56b Add an analyzer test step to test legacy code using the unforked SDK
dart-lang/sdk@ afaeb04137 sanity check project files for errors
dart-lang/sdk@ 4f6a5811fc Add json support to completion metrics computation
dart-lang/sdk@ 86f8e3438a Migrate language_2/async_nested to NNBD.
dart-lang/sdk@ b671b916d4 Treat the observatory service tests as opted out of NNBD.
dart-lang/sdk@ 78b1e15637 Don't report NULLABLE_TYPE_IN_CATCH_CLAUSE in opt-out libraries.
dart-lang/sdk@ 60295a2cef [dart2js] Migrate async_patch.dart to nnbd.
dart-lang/sdk@ 272a03a71d [ddc,dart2js] restore null check in dart:js
dart-lang/sdk@ 0fa3d79a3f Move applying LEGACY_ERASURE to isCorrectOverrideOf().
dart-lang/sdk@ e0621b65b2 [nnbd] Stop writing chunked into headers
dart-lang/sdk@ 9f4769fd30 [ddc] Add back nullcheck in js_array
dart-lang/sdk@ fa74c546b1 Use default FeatureSet for a file in its unlinked unit key hash.
dart-lang/sdk@ e34299101c Add back null check to _StreamIterator constructor in NNBD.
dart-lang/sdk@ c96f1928f6 Revert "[vm/nnbd] Enable type testing stubs in NNBD weak mode"
dart-lang/sdk@ 08778f9045 In legacy libraries apply LEGACY_ERASURE to concrete members.
dart-lang/sdk@ ad5ee10e69 [dart2js] Migrate a number of trivial libraries to nnbd fork.
dart-lang/sdk@ 30213c4188 Fix expression compiler tests on windows
dart-lang/sdk@ 5fd18be9c5 track analysis errors
dart-lang/sdk@ 31de73f074 [infra] Publish results messages to pub/sub at a slower rate
dart-lang/sdk@ 81d4ac07d4 [CFE] Use package config v2
dart-lang/sdk@ ed2df21191 [cfe] Decouple MemberBuilder from ClassMember
dart-lang/sdk@ 776b984115 [cfe] Correctly register parameters as initialized
dart-lang/sdk@ 6a2c350a3e [cfe] Fix isSubtypeOf for FutureOrs
* Update to edd64e6d5c7924a5fb1ef80c5226d24006e7977b