Fixes https://github.com/flutter/flutter/issues/125640
This doesn't actually do anything, instead it forces opaque to false. If developers want opaque to be false, they can just set it directly.
Reverts: flutter/engine#55418
Initiated by: bdero
Reason for reverting: [Engine->Framework roll breakage](https://github.com/flutter/flutter/issues/155727#issuecomment-2375489803)
Original PR Author: matanlurey
Reviewed By: {jonahwilliams}
This change reverts the following previous change:
Closes https://github.com/flutter/flutter/issues/155131.
Not only did I rename the method, but I also changed the contract slightly - now `onSurfaceAvailable` is _only_ invoked _after_ `onSurfaceDestroyed` has been called. The cost is a single `boolean`, and it honestly makes the API make a lot more sense than someone having to track this themselves.
/cc @johnmccutchan (OOO), and @flutter/android-reviewers.
When running with merged platform and ui threads, set the dart thread name of the main thread to io.futter.ui. Also change the thread mask settings to avoid creating an unused UI thread.
Closes https://github.com/flutter/flutter/issues/155131.
Not only did I rename the method, but I also changed the contract slightly - now `onSurfaceAvailable` is _only_ invoked _after_ `onSurfaceDestroyed` has been called. The cost is a single `boolean`, and it honestly makes the API make a lot more sense than someone having to track this themselves.
/cc @johnmccutchan (OOO), and @flutter/android-reviewers.
Fixes https://github.com/flutter/flutter/issues/141482
Since the introduction of the flutter compositor, the windows embedder will create an offscreen framebuffer and then blit this to the onscreen framebuffer. Therefore, the onscreen framebuffer should not be constructed as a multisample framebuffer - and the EGL config can match skia.
Also cleans up selection of the impeller PixelFormat, which might not have matched the selected compositor format because it was hardcoded to RGBA_8888
Fixes https://github.com/flutter/flutter/issues/155133
Dl dispatching still relies on cull rects computed during that dispatch process. Make sure that the text frame dispatcher doesn't populate text frames that are way offscreen.
This culling is more conservative than the rendering dispatcher. We'd need to do some refactoring so the logic isn't repeated multiple times.
Fixes https://github.com/flutter/flutter/issues/135898
Note that the macOS embedder is still using the apple texture cache object from the SkiaMetalContext. it can't initialize an equivalent ImpellerMetalContext without creating a second copy of the content context and all that jazz, so I'm leaving that as is for now.
This is a precondition to use more high-level templates in fuchsia-gn-sdk to replace build rules in flutter.
Meanwhile fuchsia-gn-sdk does not use pm anymore and this change is also helpful to get rid of the use of pm.
Briefly, it removes all cmx_file parameters and avoids specifying duplicated parameters (binary / target_name / default cml file).
Bug: http://b/353729557, http://b/40935282
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Previously, gesture origin position relied on hover events. But iOS 18 screen mirroring feature sends only pan/scale gestures, but doesn't hover. So we need to check the gesture location every time.
Fixes https://github.com/flutter/flutter/issues/153897
- **Add light and dark test back to FlutterView.java**
- **Migrate some but not all usages of Robolectric.setupActivity in FlutterViewTest.java**
- **Remove suppress warnings on tests that no longer need it, update documentation for ones that still need the suppression**
Fixes https://github.com/flutter/flutter/issues/154746
Partial work on https://github.com/flutter/flutter/issues/133151
Today, only a generic "internal inconsistency" error returned. But custom builds that selectively disable rendering backends may find this error to be too vague.
- **add test back with no other changes**
- **Add legacy test and setup shadow**
2 and 3 of 5 flutter/flutter/issues/154746
Improved legacy testing by validating a fullscreen and non fullscreen codepaths.
Added `.git-blame-ignore-revs` because git was failing to give blame values with that file missing. I dont think I added a global config anywhere but adding an empty file should not cause a problem.
The existing code had a lot of additional checks that didn't seem to
need to be there.
BGR could be passed back to Flutter, but this was never used in creating
the texture.
There has been a report of a Flutter app on Linux with swapped red and
blue color channels, so this seems like it is likely not working on some
drivers.
The original logic was introduced in
87509d8518cea0e90912cc30b08192b1dd4da760
ui.Canvas and ui.SceneBuilder now use the DlPath object directly from the ui.Path object. This results in increased sharing of the wrapper objects which then increases the sharing of both the converted Impeller paths and Skia's volatile flag.
The VolatilePathTracker mechanism is deleted and rather than count the number of frames that a path is stable for, instead we count the number of times it is used for rendering. If a path is used 100 times in a single frame, it will become non-volatile and start being cached almost immediately. The cached Impeller paths are now also tracked for all instances of the same path, rather than for each call site that originated from a DisplayList dispatch.
I've found a few instances where Vulkan worked correctly but surface control did not. lets add a debugging flag we can ask folks to try to narrow down the issue.
Part 1/5 for re adding tests documented in flutter/flutter/issues/154746
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide] and the [C++,
Objective-C, Java style guides].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I added new tests to check the change I am making or feature I am
adding, or the PR is [test-exempt]. See [testing the engine] for
instructions on writing and running engine tests.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [x] I signed the [CLA].
- [x] All existing and new tests are passing.
We're seeing issues with and "und" (undefined) locale and exceptions in
applications (see https://github.com/ubuntu/app-center/issues/1659). It
seems the GLib method for getting the language names doesn't clean up
invalid values, so we should do that.
The engine has historically used `package:litetest`, a home grown invention that is a wrapper around the Dart SDK.
In https://github.com/flutter/flutter/issues/133569, we've moved over to the heavier weight `package:test`, which has been simplified since first evaluated by the Dart SDK vending the dependencies we need. The last user of `package:litetest` is a single test in the Fuchsia SDK, `zircon_tests`.
This PR migrates the test from `litetest` (which will be deleted) to the Dart SK vendored `async_minittest`. For this simple test case, there is only a 1-line behavioral change (`notEquals(foo)` becomes `!= foo, true`), and it allows us to remove dependencies from the tree.
Skia is changing how it handles its internal copy of Vulkan headers to
prevent them from accidentally leaking to users and potentially
overriding the user's Vulkan headers. Users of Skia are responsible for
providing the Vulkan headers when including Skia's public Vk headers.
This change only includes Skia's public Vk headers when Flutter is
providing the Vulkan headers.
Switch from using the clumsy manual CacheablePath object to a more automatic DlPath object for holding paths in DisplayLists and dispatching them to either Skia or Impeller with auto-conversion.
For now DlPath is just a wrapper around SkPath with an auto-generating Impeller Path object which is very similar in design from what was done with the CacheablePath object except that it manages the caching of the Impeller path internally without extra burden on Impeller or Skia. There is also no need to communicate with the Dispatch method as to which type of path you prefer, they're all "auto-converting" DlPath objects now.
For now, ui.Path still generates an SkPath and so we wrap it when we record it into a DisplayList, just like the former CacheablePath mechanism. It will be a simple conversion to create the DlPath wrapper in ui.Path, though, so as to maintain the cached Impeller paths across frames even if the DisplayList itself is not preserved.
Eventually DlPath will take on more of a role of hiding the construction and internal representation of the paths so that we could be using SkPath, impeller::Path, or some other internal storage. For now, SkPath will likely remain primary storage for a while so that we can deal with PathOps.
Fixes https://github.com/flutter/flutter/issues/154549
Each overlay surface gets its own content context and each cc gets its own transient buffer. So not reseting the overlay surfaces causes a memory leak. The overlay surfaces would just continue to allocate into the same buffer which would allocate endlessly
This is a re-land of https://github.com/flutter/engine/pull/55006, except that we special case the navigation channel to immediately dispatch its message if the isolate is not yet running.
This preserves the existing behavior relied upon by several iOS add2app tests, as well as the still used embedder v1 - and potentially undicovered future embedders.
Reverts: flutter/engine#55006
Initiated by: jonahwilliams
Reason for reverting: still failling mac module test
Original PR Author: jonahwilliams
Reviewed By: {jason-simmons}
This change reverts the following previous change:
Reland of https://github.com/flutter/engine/pull/54975
Fixes the initial route behavior for iOS. Previously the initial route setting would _always_ be posted as a task, which after merging the threads would fire after isolate creation, thus it would not actually update the initial route setting. Fixed Engine constructor so that it reads the initial route from the settings.
Reland of https://github.com/flutter/engine/pull/54975
Fixes the initial route behavior for iOS. Previously the initial route setting would _always_ be posted as a task, which after merging the threads would fire after isolate creation, thus it would not actually update the initial route setting. Fixed Engine constructor so that it reads the initial route from the settings.
Wean the DlOpReceiver interface and implementations off of using the SkScalar, Sk[I]Rect, and SkPoint objects in favor of our own DL/Impeller versions.
The start of an ongoing effort to eventually compartmentalize all use of Skia interfaces into a single backend rendering module that is one of 2 semi-pluggable renderers.
Reverts: flutter/engine#54975
Initiated by: jtmcdole
Reason for reverting: I believe this change caused flutter/flutter to break in an engine roll. It was one of two changes - the other being a webui change.
Tests broken:
module_test_ios: testDualCold
router test:
```
[2024-09-05 17:43:20.837343] [STDOUT] stderr: [ +135 ms] VMServiceFlutterDriver: Connected to Flutter application.
[2024-09-05 17:43:20.841927] [STDOUT] stdout: [ +4 ms] 00:00 [32m+0[0m:
Original PR Author: jonahwilliams
Reviewed By: {jason-simmons, johnmccutchan}
This change reverts the following previous change:
If we use runNowOrPostTask on platform channel responses, then we may not wake up the dart message loop. If nothing else wakes it up, then the embedder may hang on platform channel responses.
This fixes several google3 integration tests when run in merged thread mode.
If we use runNowOrPostTask on platform channel responses, then we may not wake up the dart message loop. If nothing else wakes it up, then the embedder may hang on platform channel responses.
This fixes several google3 integration tests when run in merged thread mode.