This introduces `PlatformDispatcher.implicitView`, a low-level primitive for the framework's bootstrapping. Most code, including the framework after bootstrapping, will use `View.of(context)` instead of this new API. This new primitive will let us deprecate the `window` global.
Goals:
1. **Enable multi-window**. The `PlatformDispatcher.implicitView` is nullable. If `null`, the app must create a window to get a view it can draw into.
2. **Backwards compatibility**. For "single window" apps, `PlatformDispatcher.instance.implicitView` should behave as similar to `window` as possible.
1. The `PlatformDispatcher.instance.implicitView.viewId` should be `0`.
1. The `PlatformDispatcher.instance.implicitView` must be available synchronously at root isolate startup. This allows the framework to determine if it can make single window assumptions at startup.
2. The `PlatformDispatcher.instance.implicitView` reference must not change after startup: if it is null at startup, it must always be null; if it is non-null at startup, it must always be non-null. If "single window" app enters headless mode, the implicit view must remain non-null.
In the future, the embedder will control whether an implicit view is created: mobile & legacy desktop apps will have an implicit view, multi-window desktop apps won't have an implicit view. This requires updating the engine's embedder API and is out-of-scope for this change. For now, all apps will have an implicit view.
Part of https://github.com/flutter/flutter/issues/120306
* working commit
* some clean up
* white space fixes
* whitespace
* remove unused import
* Addressing PR comment, fix tests, update touch packet on Andriod
* formatting n whitespace again
* add new field to web ui pointer.dart
* update test
* whitespace
* fix test
* PR comments
* fix test
* whitespace
* fix test by factoring out logic into helper function
* whitespace
* fix malformed string
* pr comments
* fix type issue
* sigh whitespace
* revert test changes :)
* pr comments + separate out tests
* extra space
* change test name
* Implemented wide gamut images for iOS
Moved the surface to an extended range color format.
* wrong gamma but default pixel format set to bgra10_xr
* BGR10_XR add
* format
* updated todos
* updated todo with information about pixel formats
* switched logic for determining if we have a wide gamut image
* cleaned up gamut math to match style and linked source
* made the color attachment pixel format match the surface
* updated vulkan format switch
* removed comment
* added enable disable switch
* moved default to bgr10 for now since there is a bug where someone is still reading this, msaa?
* fixed the decoder settings to make sure we don't lose wide gamut colors
* fixed stored srgb gamut variable
* fixed false lint
* updated test
* added ability to grab the surface data for tests
* made the screenshot utility return the format
* added width and height to the platform channel payload
* fixed a couple of broken targets
* moved back the default pixel buffer format
* cleanup and add docstrings
* made the surfacedata feature only available in debug builds
* added decoding unit test
* fixed objc tests
* turned off by default
* bdero feedback1
* bdero2
* bdero3
* fixed merge issue
* removed using std::shared_ptr
This patch also eliminates some extraneous tracing that is happening
every frame. It is possible to get the same trace calls by enabling
the API stream if needed.
Also refactors the NotifyIdle callsites to just always work in
TimeDeltas rather than converting back and forth between them and
TimePoints, which I think reads more clearly.
* Add calls to Dart_NotifyDestroyed when the flutter view is destroyed.
* Add unit test case.
* Format.
* Ensure the destroy task runs.
* Address code review comments.
* Revert "Revert "Reland layer state stack" (#37178)"
This reverts commit 21cc000359d8a4da097e8849e83dcbe8ac941e01.
* fix double-transform rendering issues in #114359
* adjust recently added unit test to state_stack APIs
* introduce LSS delegates to simplify some code and reduce overhead
* Fix ShellTest.OnServiceProtocolEstimateRasterCacheMemoryWorks
* add unit test for tracker.setTransform(4x4) and fix bug
* fix culling issue in LayerTree::Flatten
* Tweak Texture::Paint API
* Support external textures for iOS
* format code
* Tweak code
* format
* Clean code
* [Impeller] Support YUV external textures on iOS
* Fix test
* Clean code
* Fix compile error
* Add todo link
* Clean code