The `FlutterWindowsView` needs the `DwmIsCompositionEnabled` win32 API to check whether it should block presents until the v-blank to prevent screen tearing.
Currently, the view used the `FlutterWindow` to allow mocking this win32 API. However, the window is a complex type with lots of other responsibilities. The `WindowsProcTable` is the new preferred type for mocking win32 API.
Part of https://github.com/flutter/flutter/issues/140626
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
The Windows embedder has three ways to get an `HWND`:
1. `GetWindowHandle` which returns the `HWND`
2. `GetPlatformWindow` which returns the `HWND` wrapped as a `PlatformWindow`
3. `GetRenderTarget` which returns the `HWND` wrapped as a `RenderTarget`
These abstractions are no longer useful now that we removed the UWP embedder. This change removes `PlatformWindow` and `RenderTarget` and uses `HWND` directly.
This change is a refactoring with no semantic changes.
I tried to do this for Vulkan too but hit the limit of my patience for today on debugging why the Vulkan backend was segfaulting on shutdown.
Half of https://github.com/flutter/flutter/issues/140419
This change removes the last usages of the Rect internal fields from outside the class, allowing the removal of a `friend` declaration and paving the way to reimplement the Rect methods with ltrb fields.
The original fix had a bad return value that caused the rendering to abort rather than proceed normally without the blurring.
I also changed the color being used so that the contents would show up in golden diffs which use a white background for unrendered pixels.
Save a recording/screenshot to the uploaded xcresult when a Scenario test fails.
<img width="1052" alt="Screenshot 2023-12-14 at 6 34 47â¯PM" src="https://github.com/flutter/engine/assets/682784/c1294497-28f6-4400-b21c-da689a224dc4">
<img width="244" alt="Screenshot 2023-12-14 at 6 41 03â¯PM" src="https://github.com/flutter/engine/assets/682784/f769dd5f-a71b-4320-b9ef-64eac722166a">
No more errant spew as reported in https://github.com/flutter/engine/pull/19668 when this was originally turned off.
```
Test Case '-[StatusBarTest testTapStatusBar]' started.
t = 0.00s Start Test at 2023-12-14 18:20:34.207
...
t = 2.69s Synthesize event
t = 2.70s Find the StatusBar at {{0.0, 0.0}, {375.0, 20.0}}
t = 2.72s Find the StatusBar at {{0.0, 0.0}, {375.0, 20.0}}
t = 2.74s Find the StatusBar at {{0.0, 0.0}, {375.0, 20.0}}
t = 3.03s Wait for com.apple.springboard to idle
t = 3.43s Waiting 1.0s for "0,PointerChange.add,device=0,buttons=0,signalKind=PointerSignalKind.none" TextField to exist
t = 4.43s Checking `Expect predicate `exists == 1` for object "0,PointerChange.add,device=0,buttons=0,signalKind=PointerSignalKind.none" TextField`
t = 4.43s Checking existence of `"0,PointerChange.add,device=0,buttons=0,signalKind=PointerSignalKind.none" TextField`
t = 4.45s Capturing element debug description
t = 4.45s Checking existence of `"0,PointerChange.add,device=0,buttons=0,signalKind=PointerSignalKind.none" TextField`
/Volumes/Work/s/w/ir/cache/builder/src/out/ios_debug_sim/scenario_app/Scenarios/ScenariosUITests/StatusBarTest.m:37: error: -[StatusBarTest testTapStatusBar] : ((exists) is true) failed
t = 4.48s Tear Down
```
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8761683198070320113/+/u/test:_Scenario_App_Integration_Tests__3_/stdout
Fixes https://github.com/flutter/flutter/issues/140192
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Fixes https://github.com/flutter/flutter/issues/138371
When a new route pops up the expectation is that the screen reader focuses on something in the new route. Since routes typically result in DOM nodes being replaced, the current effect is that the screen reader simply unfocuses from the page, causing the user to have to refocus on back on the page and look for elements to interact with, which is a poor user experience. The current workaround is to use `autofocus`, but that doesn't scale as it's easy to forget, and if the route in question is maintained by a different person you may not even have enough control over it to set `autofocus` on anything. For example, this is the case with Flutter's default date picker. All you have is `showDatePicker` and there's no way to control the focus.
With this change the route (managed by the `Dialog` primary role) will check if a widget requested explicit focus (perhaps using `autofocus`), and if not, looks for the first descendant that a screen reader can focus on, and requests focus on it. The auto-focused element does not have to be literally focusable. For example, plain `Text` nodes do not have input focus (i.e. they are not `isFocusable`) but screen readers can still focus on them. If such an element is found, the web engine requests that the browser move focus to it programmatically (`element.focus()`), which causes the screen reader to move the a11y focus to it as well, but it sets `tabindex=-1` so the element is not focusable via keyboard or mouse.
This is part of the work towards supporting OpenGLES and Vulkan for runtime stage shaders.
Removes some redundant work we had around SkSL. Now only bundles the shaders we actually ask for from the command line.
@bdero, we should figure out if this is the right approach for flutter_gpu.
With this change, the IPLR format goes from having a root table of shader related information to a root table of shader information per `sksl`, `metal`, `opengles`, and `vulkan` platforms.
This may end up allowing us to revert https://github.com/flutter/engine/pull/47278, but I'm not sure I understand all the implications of that at this point.
I have run some but not all tests locally.
This is one of a series of changes to reland https://github.com/flutter/engine/pull/47239.
This PR changes `Animator` so that if `Render` is not called after a `BeginFrame`, this call is ignored.
Note that this is slightly different from https://github.com/flutter/engine/pull/47239. Instead of saying that we should ultimately change this skip to an assertion, this PR aims to keep the skip as the final shape. This is because a while ago we (with @goderbauer and @loic-sharma) decided that `PlatformDispatcher` should contain as little logic as possible to allow testing, and instead serve as a minimal native function binding, which means that we should eventually move the code that validates calling convention to the engine.
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
We are embedding Flutter into MacOS app, and noticed that there is a
leak. `leaks` tool says there is a cycle reference:
```
12 (2.11K) ROOT CYCLE: <FlutterKeyboardManager 0x29ec55f40> [80]
8 (432 bytes) __strong _primaryResponders --> ROOT CYCLE: <NSMutableArray 0x29ec560a0> [64]
7 (368 bytes) ROOT CYCLE: <NSMutableArray (Storage) 0x29ec56140> [32]
4 (224 bytes) ROOT CYCLE: <FlutterEmbedderKeyResponder 0x29ec56310> [80]
1 (48 bytes) __strong _sendEvent --> ROOT CYCLE: <__NSMallocBlock__ 0x29ec56360> [48]
__strong [capture] --> CYCLE BACK TO <FlutterKeyboardManager 0x29ec55f40> [80]
1 (48 bytes) __strong _pendingResponses --> <NSMutableDictionary 0x29ec563c0> [48]
1 (48 bytes) __strong _pressingRecords --> <NSMutableDictionary 0x29ec56390> [48]
2 (112 bytes) <FlutterChannelKeyResponder 0x29ec56450> [48]
1 (64 bytes) __strong _channel --> <FlutterBasicMessageChannel 0x29ec564e0> [64]
2 (1.55K) __strong _layoutMap --> <NSMutableDictionary 0x29ec56630> [48]
1 (1.50K) <NSMutableDictionary (Storage) 0x123c34a00> [1536]
1 (64 bytes) __strong _pendingEvents --> <NSMutableArray 0x29ec565f0> [64]
```
This patch uses `weak` pointer to `self` instead of implicit `strong`.
## 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.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I signed the [CLA].
- [x] All existing and new tests are passing.
Updates automated release note configuration with the following:
* Corrects the label name for impeller changes.
* Adds fallback "Other Changes" section that includes unlabeled changes.
This reverts commit 87171e73397f7edfd4c145fbaebdd7208954debf.
Internal performance test shows that this PR negatively affects startup time. I'll reland this PR in parts.
b/307872797
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Today the default renderer on hosts is Skia, but if we ever change the default then we will be testing on Impeller+default(Impeller) rather than both Skia and Impeller. Change the flutter_tester launch arguments to explicitly disable Impeller when we want to test Skia so that we will always test on both platforms.
We're on a version of clang that crashes a lot on macOS. This PR rolls
clang forward to a new release from the Fuchsia toolchain team. If it
does not fix the crash, we can roll back with
https://github.com/flutter/engine/pull/49249. Both rolling forward and
back require the fixes to the `.mm` file in this PR.
Changes since last roll
```
e8cdc554c59 (tag: 3.3.0-242.0.dev, origin/dev) Version 3.3.0-242.0.dev
a5109dc82ba [build] Handle RBE in -fdebug-prefix-map.
2ff976e9e3a [infra] Specify Linux in RBE platform.
12c548d331b [macros] Add first language tests for introspection.
3eeba4a4e2a [cfe] Refactor FunctionNode.futureValueType into emitted value type
8d8c4c61250 [cfe] Handle extension types in *Concatenation nodes
f49c7864436 [cfe/analyzer] Report error on invalid abstract final class modifier combinations
338fd6501b6 [dart2wasm] Make _RecordType use WasmArray<>s instead of List<>s
355d7e02fcf (origin/base) Stop testing nnbd-weak and nnbd-legacy on analyzer.
27892de3497 Adding DTD and DTD_impl owners.
6a9216a46fc Remove Requirements=nnbd-weak from superinterfaces_out_of_order_error_test.dart.
d646c92abe6 Macro. Tests for StaticType.isSubtype()
5881d669f0a Update DevTools rev to c7aa1df42178b054901c36bb1b8ea25b5542be8c
63594497660 Remove dead code in prefer_constructors_over_static_methods.dart
739baa4bc10 Macro. Implement DefinitionPhaseIntrospector.inferType()
794d3adf93d [VM] - Minor cleanups
3e73f10de09 Disable fixes for unawaited_futures in cascades.
8348807c860 stop collecting `strictCasts` settings from options
38e2d34424e [ddc] Erase extension types in as expressions
8d24f7ebd41 [ddc] Erase extension types in string concats
b2cd914227b [ddc] Erase extension types in assertions
66a955b09f1 Fixed typo
48ac398f112 Fix `Directory.current` setter compatibility with `IOOverrides`
c84edaefe9e Check in //third_party/root_certificates.
63f5b1272b1 Discover actual dart-sdk/ and bin/ when running tools/test.py
81dc3f6f6e7 [tests/ffi]: Fix failing pointer arithmetic test.
83ba9fe0a8d [ddc] Enable new runtime types by default
95e049c7e28 Add a test case for #52233
3e2ac6721d5 [linter] Report deprecated_consistency only on constructor name
89381ea4dbe [linter] Simplify 'prefer_mixin' implementation
```
This PR also includes changes to license script to accommodate new
location for `root_certificates` sources.