5322 Commits

Author SHA1 Message Date
John McCutchan
fe45ba18f0 Restore old SurfaceTextureExternal drawing code (flutter/engine#44979)
The simpler version I committed last week doesn't work correctly when
the texture has been transformed. This CL restores the old painting code
that properly handles this case.

Fixes internal b/296916021
2023-08-22 15:57:59 -07:00
Jason Simmons
e6ed925c59 Initialize the texture destruction callback in the Metal embedder test harness (flutter/engine#44973) 2023-08-22 22:18:26 +00:00
Jim Graham
5fa5cb698e Revert "Split DisplayListBuilder into DlCanvas optimizer and DlOp recorder classes" (flutter/engine#44968)
Reverts flutter/engine#44718

A rendering issue was discovered in internal testing (b/296975714)
2023-08-22 19:14:48 +00:00
Reid Baker
9318d3d641 i82973 scroll mouse wheel support (flutter/engine#44724)
Fixes https://github.com/flutter/flutter/issues/82973

Mouse scroll wheel support for android. 

I chose to not cache the vertical and horizontal scale factors that come from view configuration. The primary reason is that in the current code path context is only used when the user scrolls which was the unimplemented feature. This smaller blast radius I decided was worth the additional calls. A secondary reason is that when the scale factors are changed is not a well documented path nor is there a lifecycle callback to listen to. Scroll factor is cached on api 25 and below because that more closely mirrors the behavior I see in pre 25 versions of android scroll view. 

Note flutter takes longer to "see" a mouse that then scrolls than android

Fixes #flutter/flutter/82973

Todo list prior to merge

## Links 
* Some pre api 26 scroll factor code 
    - https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/core/java/android/view/View.java?q=function:getVerticalScrollFactor%20filepath:android%2Fview%2FView.java&ss=android%2Fplatform%2Fsuperproject%2Fmain 
    - https://cs.android.com/android/_/android/platform/frameworks/base/+/main:core/java/android/widget/ScrollView.java;l=930;drc=2fe301db7555bccf53e465436d4cb7442c803df3;bpv=0;bpt=0
* Post api 26 scroll factor code 
    - https://cs.android.com/android/_/android/platform/frameworks/base/+/main:core/java/android/widget/ScrollView.java;l=361;drc=406e0f655387f27dda874c2b975fb0ddbd61aa13;bpv=0;bpt=0 
    - https://developer.android.com/reference/android/view/ViewConfiguration#getScaledVerticalScrollFactor()
2023-08-22 18:23:50 +00:00
Brian Osman
1373f86c5a Add missing GrVkTypes include (flutter/engine#44957)
IWYU fix for an incoming Skia change. This header is needed for GrVkImageInfo.
2023-08-22 16:32:02 +00:00
Bruno Leroux
b7388399c8 [Linux] Expose channel buffers 'resize' and 'overflow' control commands (flutter/engine#44636)
## Description

This PR adds two helper functions to invoke the 'resize' and 'overflow' commands exposed by the control channel.
See:

c00c022036/lib/ui/channel_buffers.dart (L302-L309)

## Related Issue

Linux implementation for https://github.com/flutter/flutter/issues/132386

## Tests

Adds two tests.
2023-08-22 06:52:56 +00:00
Brandon DeRosier
cdab07b84a [Impeller] Supply a text backend to the AiksContext at runtime. (flutter/engine#44884)
Resolves https://github.com/flutter/flutter/issues/130947.

- Allow for setting the text renderer (`TextRenderContext`) when the
`AiksContext` is built. Previously, the text renderer was selected at
build time through linking a `TextRenderContext::Create` symbol.
- Support using Impeller without a text backend. Throw a clear error
when trying to render text if no text backend is present.
- Don't track the Impeller context in `TextRenderContext`. Just let the
renderer supply its context when generating atlases.
- Allow for overriding the `TextRenderContext` for individual Aiks
playground tests/goldens.
2023-08-21 21:55:28 -07:00
LongCatIsLooong
649a1e181c Reland "Implementing TextScaler for nonlinear text scaling (#42062)" (flutter/engine#44907)
The original PR crashes because of a JNI signature mismatch (`(FJ)F` -> `(FI)F`). Update the signature in a415da5619

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-21 23:16:10 +00:00
Jim Graham
5774ccf84f Split DisplayListBuilder into DlCanvas optimizer and DlOp recorder classes (flutter/engine#44718)
DisplayListBuilder grew over time from a class that implemented a developer-unfriendly stateful API into one that implemented both the developer-friendly DlCanvas API as well as its original stateful API. Over time, the stateful API was buried under a "testing only" facade.

In the meantime, the optimization features that it applies to the DlCanvas calls before it records the operations in a DlOp store are useful without the recording process and so I've been wanting to break those into 2 parts for a while with the goal of removing all stateful APIs from DisplayListBuilder (see https://github.com/flutter/flutter/issues/108303).

This PR takes a major step along that direction by splitting DisplayListBuilder into essentially a convenience class that marries 2 new classes together to achieve its old functionality:
- `DlCanvasToReceiver` - a class that implements DlCanvas, optimizes common situations, and then sends commands to any object that implements `DlOpReceiver`
- `DlOpRecorder` - an implementation of DlOpReceiver that records the operations in a buffer from which to create a `DisplayList` object
- `DisplayListBuilder` now inherits from DlCanvasToReceiver to get the optimizations and provides it with an instance of `DlOpRecorder` as the receiver that it will send its results to
- Similarly, a `DlCanvasToReceiver` instance could be directed to an `impeller:DlDispatcher` to achieve a more straight-through path from the DlCanvas interface to impeller Pictures.
2023-08-21 07:17:19 +00:00
Jonah Williams
6f3b341232 Revert "Implementing TextScaler for nonlinear text scaling" (flutter/engine#44882)
Reverts flutter/engine#42062

Failing due to:

>>>>>>>> 08-18 15:59:41.350 3439 3484 E flutter :
[ERROR:flutter/shell/platform/android/platform_view_android_jni_impl.cc(902)]
Could not locate FlutterJNI#getScaledFontSize method
>>>>>>>> 08-18 15:59:41.350 3439 3484 F flutter :
[FATAL:flutter/shell/platform/android/library_loader.cc(26)] Check
failed: result.
2023-08-20 14:10:13 -07:00
Loïc Sharma
80c1ee246e [Embedder API] Add semantic string attributes (flutter/engine#44616)
Flutter's `SemanticNode`s use [`StringAttribute`](https://api.flutter.dev/flutter/dart-ui/StringAttribute-class.html)s to provide additional information on text values for assistive technologies. This exposes the string attributes on the embedder API so that embedders can apply string attributes to their semantics trees.

Addresses https://github.com/flutter/flutter/issues/119970
Part of https://github.com/flutter/flutter/issues/98948

Previous pull request: https://github.com/flutter/engine/pull/44553

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-18 22:49:58 +00:00
LongCatIsLooong
7d07749fdd Implementing TextScaler for nonlinear text scaling (flutter/engine#42062)
`platformTextScaler` doesn't need to be per window, assuming the SP -> DiP mapping is always the same on the same device (unless the user changes the preference), and does not depend on the display device's pixel density (it's confirmed).

Design doc: https://docs.google.com/document/d/1-DlElw3zWRDlqoc9z4YfkU9PbBwRTnc7NhLM97ljGwk/edit#

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-18 22:22:16 +00:00
Bruno Leroux
4f50825d26 [Android] Expose channel buffer resize and overflow calls (flutter/engine#44434)
## Description

This PR updates the Android engine in order to provide a more efficient implementation for `BasicMessageChannel.resizeChannelBuffer` (helper to call the `resize` control command).
It also adds a new helper called`BasicMessageChannel.allowChannelBufferOverflow` to call the `overflow` control command.

## Related Issue

Fixes https://github.com/flutter/flutter/issues/132048
Android implementation for https://github.com/flutter/flutter/issues/132386

## Tests

Adds 2 tests.
2023-08-18 06:16:22 +00:00
Jason Simmons
1c573b5165 Fix FlutterInjectorTest assumptions about how the executor service assigns tasks to threads (flutter/engine#44775) 2023-08-17 20:37:59 +00:00
John McCutchan
5c518f77f3 Reenable HardwareBuffer backed Android Platform Views on SDK >= 29 (flutter/engine#44790)
- Fix a bug in the SDK < 33 ImageReader construction code path.
- Fix a bug that resulted in references to Images produced by a closed
ImageReader.
- Fix an order of operations bug in ImageReaderPlatformViewRenderTarget
release/finalizer code path.
- Enable HardwareBuffer backed Android Platform Views on SDK >= 29

Manually tested on device rotating and shutting down the app.
2023-08-17 13:15:25 -07:00
Tong Mu
177a6128c1 Basic view management for engine classes (flutter/engine#42991)
_This PR is part of the multiview engine project. For a complete roadmap, see [this doc](https://docs.google.com/document/d/10APhzRDR7XqjWdbYWpFfKur7DPiz_HvSKNcLvcyA9vg/edit?resourcekey=0-DfGcg4-XWRMMZF__C1nmcA)._

------

This PR adds view management to all engine classes that need it. View management here basically means `AddView` and `RemoveView` methods, and most importantly, how to handle the implicit view.

The implicit view is a special view that's handled differently than all the other "regular views", since it keeps the behavior of the current single view of Flutter. Detailed introduction can be found in `Settings.implicit_view_enabled`.

The following two graphs show the difference between initializing with/without the implicit view and creating regular views.

<img width="879" alt="image" src="https://github.com/flutter/engine/assets/1596656/31244685-d9d3-4c9a-9a9e-6e8540a5711e">

<img width="864" alt="image" src="https://github.com/flutter/engine/assets/1596656/e2dd4b8c-57e3-428d-8547-834fb270052b">

<img width="860" alt="image" src="https://github.com/flutter/engine/assets/1596656/58dae687-8c17-434e-ae24-a48c2d8fa5fa">

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-17 20:06:25 +00:00
LouiseHsu
089957e3e0 Add share to selection controls (flutter/engine#44554)
In native iOS, users are able to select text and initiate a share menu, which provides several standard services, such as copy, sharing to social media, direct ability to send to various contacts through messaging apps, etc. 

https://github.com/flutter/engine/assets/36148254/d0af7034-31fd-412e-8636-a06bbff54765

This PR is the engine portion of the changes that will allow Share to be implemented
This PR addresses https://github.com/flutter/flutter/issues/107578
More details are available in this [design doc](https://github.com/flutter/engine/pull/flutter.dev/go/add-missing-features-to-selection-controls)
2023-08-17 17:34:11 +00:00
hellohuanlin
380e7d7402 [ios][ios17]fix auto correction highlight on top left corner (flutter/engine#44779)
Fix native auto-correction highlight region on top left corner. 

This PR uses the system auto-correction highlight on iOS 17, which was disabled by https://github.com/flutter/engine/pull/44354

<img width="479" alt="Screenshot 2023-08-16 at 1 19 39 PM" src="https://github.com/flutter/engine/assets/41930132/a5a1dda7-ba21-462e-a65c-1afeecf7559f">

*List which issues are fixed by this PR. You must list at least one issue.*

Fixes https://github.com/flutter/flutter/issues/131622
Fixes https://github.com/flutter/flutter/issues/131695
Fixes https://github.com/flutter/flutter/issues/130818

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-17 16:48:06 +00:00
yaakovschectman
deaf5f2b5b [Windows] Delay enabling app lifecycle states until requested (flutter/engine#44238)
Await a platform message before sending lifecycle state updates so we
are not sending messages that do not get consumed by the framework.
In the _near_ future we hope to extend the embedder API to allow
registering callbacks called upon the framework registering a listener
to a channel, which would obviate this problem.

https://github.com/flutter/flutter/issues/131616

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

## 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 Hixie said 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 `///`).
- [ ] I signed the [CLA].
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2023-08-17 12:30:28 -04:00
Jason Simmons
156b05274e Revert "Conditionally enable HardwareBuffer backed platform views (#44744)" (flutter/engine#44785)
This reverts commit 4620733d5c4b100fae10861eaae6d6e97003c282.

The https://github.com/flutter/flutter/tree/master/dev/integration_tests/abstract_method_smoke_test test was not rendering the platform view with that change.
2023-08-16 23:09:08 +00:00
Dan Field
3020e19c19 [Impeller] Update docstring on layer.presentsWithTransaction (flutter/engine#44782)
This got missed when setting this to always be `YES`.
2023-08-16 22:01:30 +00:00
John McCutchan
1278a933a7 Switch some ERROR logs to WARNING logs (flutter/engine#44784) 2023-08-16 15:00:25 -07:00
LouiseHsu
8f2b35bbfc Fix search web test (flutter/engine#44704)
Fixed an issue with the test `testSearchWebInvoked` not mocking out openURL and crashing subsequent tests
2023-08-16 19:48:47 +00:00
John McCutchan
4620733d5c Conditionally enable HardwareBuffer backed platform views (flutter/engine#44744)
On Android >= 29 we can use a more efficient platform view render target
2023-08-16 10:30:32 -07:00
Rulong Chen(陈汝龙)
75ac0d3957 Enabling the host application to control the timing of attaching the |FlutterView| to the engine (flutter/engine#43595)
In the add-to-app scenario where multiple FlutterViews share the same FlutterEngine, the host application desires to determine the timing of attaching the FlutterView to the engine, for example, during the `onResume` instead of the `onCreateView`.

As an example, consider the following scenario: A native page contains multiple tabs, and each tab is a FlutterFragment. During initialization, FlutterFragments of different tabs are created almost simultaneously, but only the one that needs to be displayed currently requires attachment to the engine, while the others need to be attached only when they receive the |onResume| callback.

Partial fix: https://github.com/flutter/flutter/issues/130235

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-16 02:34:04 +00:00
John McCutchan
7bf371d161 Fix clang_tidy lints (flutter/engine#44740) 2023-08-15 16:40:32 -07:00
John McCutchan
50190fcaa6 Add support for SurfaceTexture based external textures on Android under Impeller/GLES. (flutter/engine#44734)
- Refactor AndroidExternalTextureGL into SurfaceTextureExternalTexture
base class with two specialized implementations:
- Add SurfaceTextureExternalTextureGL for legacy GL rendering.
- Add SurfaceTextureExternalTextureImpellerGL for Impeller GLES
rendering.

NOTE: There is still no support for SurfaceTextures under Vulkan
rendering.
2023-08-15 14:25:03 -07:00
Jia Hao
1f58484e28 Namespace imports with flutter (flutter/engine#44709)
For Google3, this makes it easier since we only need to make one source transform (from `#include "flutter` -> `#include "third_party` instead of requiring a source transform for every root directory in this repo.

*List which issues are fixed by this PR. You must list at least one issue.*

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-15 06:03:54 +00:00
Brian Osman
829b42e044 Stop using deprecated GrBackendRenderTarget constructor (flutter/engine#44694)
Sample count is part of GrVkImageInfo (and was already being set in both places).
2023-08-15 03:47:09 +00:00
Caroline Liu
c49236d4c0 [fuchsia] Delete obsolete GFX-specific source files (flutter/engine#44594)
This change removes 
- GFX source files removed from the BUILD in #44401 
- Extraneous unused Scenic includes in the same directory
(`//shell/platform/fuchsia/flutter/`)
- All remaining uses of the Scenic library from the Fuchsia SDK
- All remaining uses of fuchsia.ui.scenic.*
2023-08-15 09:47:32 +10:00
stuartmorgan
1df606ab9d Add application:openURLs: forwarding on macOS (flutter/engine#44689)
Wires `application:openURLs:` into the exisiting delegation system, allowing plugins to handle URL callbacks (as on iOS).

Since there is no notification-based version of this delegate method, this adds it directly to the app delegate, restructring the helper class slightly to allow internal sharing of the delegate list.

Fixes https://github.com/flutter/flutter/issues/41471

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-14 19:38:03 +00:00
Casey Hillers
c3c5b4f7ac Update embedder_semantics_update.h imports to include flutter namespace (flutter/engine#44670)
Without the flutter namespace, it breaks Google's build of the engine.
2023-08-14 19:06:54 +00:00
Yegor Pomortsev
62b3a0cfa7 Remove dependencies on fuchsia.sys.* FIDL protocols (flutter/engine#44614)
The fuchsia.sys FIDL library, used to implement v1 components, is
deprecated in the Fuchsia platform and is being removed.

Flutter now implements Components v2 but still imports the old library.

Bug: https://fxbug.dev/109013
2023-08-12 10:41:38 +10:00
John McCutchan
41331e0315 Rename impeller::TextureIntent to impeller::TextureCoordinateSystem (flutter/engine#44628) 2023-08-11 13:28:03 -07:00
stuartmorgan
0f08a911aa Allow macOS plugins to register as app delegates (flutter/engine#44587)
Adds `addApplicationDelegate:` to the macOS plugin registrar, following the corresponding iOS method, and wires it up to the existing app delegation forwarding that was recently added for use at the application level. (The actual delegate is non-trivially different between iOS and macOS, but that's not resolveable without a complex migration on the iOS side, so the APIs currently diverge after the level of the `addApplicationDelegate:` method itself.)

This doesn't add any new methods to the delegation; those will be added in a follow-up PR.

Also fixes a retain cycle in the termination handler that prevented the new test from working.

Most of https://github.com/flutter/flutter/issues/41471

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-11 19:57:06 +00:00
Loïc Sharma
649b38752e [Embedder] Refactor how semantic updates are mapped (flutter/engine#44553)
This refactors how engine semantic updates are mapped to embedder semantic updates. There are no behavioral changes.

Part of https://github.com/flutter/flutter/issues/119970, https://github.com/flutter/flutter/issues/98948

Next PR: https://github.com/flutter/engine/pull/44616

## Background
For https://github.com/flutter/flutter/issues/119970, we will need to update the embedder API to add string attributes to semantic nodes' text values. There are multiple kinds of string attributes, and each text value can have multiple string attributes. This requires gnarly mapping code that's best kept out of `embedder.cc`.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-11 16:22:10 +00:00
John McCutchan
bcd2be5d8a Add support for HardwareBuffer backed Android Platform Views under Impeller/GLES (flutter/engine#44617)
- Implement Impeller/GLES code paths.
- A couple of fixes for EXTERNAL_OES textures via bdero@
2023-08-11 00:41:53 -07:00
Chris Bracken
234063b3ae [shell] Add references to VsyncWaiter docs (flutter/engine#44607)
Point users in the direction of VsyncWaiterAndroid, VsyncWaiterEmbedder.

No new tests since this patch introduces no semantic changes.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-10 22:00:07 +00:00
LoveJello
c309b2295b Fix unexpected pointer change issue and Add test case (flutter/engine#43949)
Fix issue 129765 and Add test case, see  issue
Fixes https://github.com/flutter/flutter/issues/129765

- [✓] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
- [✓] I read the [Tree Hygiene] wiki page, which explains my responsibilities.
- [✓] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides].
- [✓] I listed at least one issue that this PR fixes in the description above.
- [✓] I added new tests to check the change I am making or feature I am adding, or Hixie said 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 `///`).
- [✓] I signed the [CLA].
- [ ✓] All existing and new tests are passing.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-10 20:04:46 +00:00
chunhtai
e7cb4195f2 Reland "Android a11y bridge sets importantness" (flutter/engine#44589)
The previous pr was reverted due to test failures. The failure was due to API not supported in order android version. The fix is in the second commit.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-10 20:02:12 +00:00
John McCutchan
c3606872fb Support for Android Platform Views under Impeller/Vulkan (flutter/engine#44571)
- Introduce AndroidHardwareBufferTextureSourceVK.
- Enable the necessary Vulkan extensions to support
AndroidHardwareBufferTextureSourceVK.
- Refactor HardwareBufferExternalTextureGL into a base class and a GL
and VK specializations.
- Switch ImageReaderPlatformView to use the PRIVATE image format
(enables DRM'd content to be captured in the texture).
- Add a AHardwareBuffer_describe to NDKHelpers.
- Misc cleanups.
2023-08-10 12:54:47 -07:00
yaakovschectman
c2cc8508b6 Reintroduce Windows lifecycle with guard for posthumous OnWindowStateEvent (flutter/engine#44344)
Previously, destruction of `Window` called `DestroyWindow`, which may
send `WM_KILLFOCUS` to the to-be-destroyed window. Because `Window`'s
destructor is called after `FlutterWindow`'s, the `FlutterWindow` vtable
was already destroyed at this point, and the subsequent call to the
virtual method `OnWindowStateEvent` would cause a crash. This PR
reintroduces the reverted changes for Windows lifecycle with a check
before calling the virtual method that the `FlutterWindow` object has
not yet been destructed.

https://github.com/flutter/flutter/issues/131872

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

## 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 Hixie said 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 `///`).
- [ ] I signed the [CLA].
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat

---------

Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
2023-08-10 15:37:04 -04:00
Matt2D
68dccebb48 Flutter iOS Interactive Keyboard: Fixing Behavior Issue (flutter/engine#44586)
This PR addresses an issue with the behavior of the keyboard. Originally the behavior of the keyboard was to see if the pointer was above or below the middle of the keyboards full size and then animate appropriately. However we found that the behavior is instead based on velocity. This PR adjust the code to match this behavior.

Design Document:
https://docs.google.com/document/d/1-T7_0mSkXzPaWxveeypIzzzAdyo-EEuP5V84161foL4/edit?pli=1

Issues Address:
https://github.com/flutter/flutter/issues/57609

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-10 19:02:08 +00:00
Zachary Anderson
2ecdda61fa Revert "Android a11y bridge sets importantness" (flutter/engine#44569)
Reverts flutter/engine#44452

Failing the roll to the framework on FTL tests:
https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20firebase_android_embedding_v2_smoke_test/58307/overview
2023-08-09 19:51:22 -07:00
Matt2D
9fb889d3a8 Flutter iOS Interactive Keyboard: Fixing Animation Issue (flutter/engine#44514)
This PR addresses an issue with the animation of the keyboard. In iOS 16.0 a delay was included in UIView becomeFirstResponder where the areAnimationsEnabled boolean is no longer immediately read. In response to this issue a delay is added that allows for the animation to be properly disabled. 

Design Document:
https://docs.google.com/document/d/1-T7_0mSkXzPaWxveeypIzzzAdyo-EEuP5V84161foL4/edit?pli=1

Issues Address:
https://github.com/flutter/flutter/issues/57609

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-09 21:22:05 +00:00
chunhtai
1cffdd164a Android a11y bridge sets importantness (flutter/engine#44452)
Accessibility scanner uses isImportantForAccessibility to decide whether to scan the node. If not set, the isImportantForAccessibility is default to false, thus skips all node except for the rootview which defaults to true.

fixes https://github.com/flutter/flutter/issues/39531

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-09 16:58:01 +00:00
ftsui
f0d7c4c4c2 Request GLES version 2 interface. (flutter/engine#44504)
- SKIA requires at least GLES version 2.0

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-09 16:38:28 +00:00
Caroline Liu
4e424a605d Remove GFX and Scenic dependencies from Fuchsia integration tests (flutter/engine#44498)
This change removes GFX and Scenic dependencies from Fuchsia integration
tests. Mainly, it:
- swaps out `fuchsia.ui.scenic.Scenic/GetDisplayInfo` for
`fuchsia.ui.display.singleton.Info/GetMetrics`
- removes the no longer necessary `fuchsia.ui.scenic.Scenic` connections
and component manifest declarations from tests
- removes any extraneous build deps tests have on `fuchsia.ui.gfx`,
`fuchsia.ui.policy`, and `scenic_cpp`

Related bug: fxbug.dev/64206

## 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 Hixie said 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.
2023-08-09 08:54:09 -04:00
Bruno Leroux
8ee77cb321 [Windows] Return keyboard pressed state (flutter/engine#43998)
## Description

This PR updates the Windows engine in order to answer to keyboard pressed state queries from the framework (as implemented in https://github.com/flutter/flutter/pull/122885).

## Related Issue

Windows engine implementation for https://github.com/flutter/flutter/issues/87391.

Similar to:
- Linux: https://github.com/flutter/engine/pull/42346
- Android: https://github.com/flutter/engine/pull/42758
- macOS: https://github.com/flutter/engine/pull/42878

## Tests

Adds 2 tests.
2023-08-09 06:31:05 +00:00
Chris Bracken
551fe982eb [macOS] Improve engine retain cycle testing (flutter/engine#44509)
Adds testing that verifies that the engine is not retained via the FlutterTextureRegistry that is returned from the FlutterTextureRegistrar returned by the engine.

This also simplifies the existing test for a retain cycle via the FlutterBinaryMessenger by avoiding manually casting the binary messenger to a FlutterBinaryMessengerRelay, or knowing any of its implementation details.

Issue: https://github.com/flutter/flutter/issues/116445

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-08 22:18:46 +00:00