5223 Commits

Author SHA1 Message Date
John McCutchan
b3945f7706 Add a PlatformViewRenderTarget abstraction (flutter/engine#43813)
- Introduce PlatformViewRenderTarget interface.
- Refactor VirtualDisplayController and PlatformViewWrapper to extract
SurfaceTexturePlatformViewRenderTarget into a separate class.

In a future CL I will add an ImageReaderPlatformViewRenderTarget which
will enable Platform Views on Impeller/Vulkan.

Tracking issue: https://github.com/flutter/flutter/issues/130892
2023-07-19 20:26:21 -07:00
Jim Graham
6f48af53e9 Reland "Add non-rendering operation culling to DisplayListBuilder" (#41463) (flutter/engine#43831)
Fixes: https://github.com/flutter/flutter/issues/129862

This reverts commit 6237207218438748937fd4878c54884f83e66df2.

The framework test that was blocking the previous reland has been [fixed](https://github.com/flutter/flutter/pull/130751) to not rely on non-visible (cullable) operations.
2023-07-19 22:26:01 +00:00
Kevin Lubick
c4494c9718 Update legacy call to SkImage::makeSubset (flutter/engine#43786)
In https://skia-review.googlesource.com/c/skia/+/671679 Skia updated the
calls to SkImage::makeSubset() to always need a `GrDirectContext*`. This
updates Flutter's one call that needed it.

## 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].
- [ ] 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.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [x] 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-07-19 08:26:05 -04:00
Greg Spencer
5fa39ff142 Check FlutterAppDelegate selector support before calling (flutter/engine#43425)
## Description

This adds checks for the app delegate to make sure that it supports the Flutter-specific selectors before calling them, so that a non `FlutterAppDelegate` can be used for the `NSApplicationDelegate` on `NSApp`.

## Related Issues
 - https://github.com/flutter/flutter/issues/124829
 - https://github.com/flutter/flutter/issues/127476

## Tests
 - Added a test to make sure things don't crash if the app delegate isn't a `FlutterAppDelegate`.
2023-07-18 17:31:43 +00:00
Jia Hao
64e17b1a44 Minor fixes for C++20 compatibility (flutter/engine#43674)
Fixes the following errors when building with a C++20 toolchain.

I don't really know C++ that well so any pointers would be appreciated. 

For the change to the lambda, we can't follow the recommendation to capture `*this` explicitly because that wouldn't compile under C++17. This PR changes the semantics slightly to capture `surface_` by reference, which might be still okay?

For b/289776142

```
error: implicit capture of 'this' with a capture default of '=' is deprecated [-Werror,-Wdeprecated-this-capture]
   93 |       if (surface_) {
      |           ^
note: add an explicit capture of 'this' to capture '*this' by reference
   91 |     raster_thread_merger_->SetMergeUnmergeCallback([=]() {
      |                                                     ^
      |                                                      , this
```

```
error: bitwise operation between different enumeration types ('CGImageAlphaInfo' and '(unnamed enum at third_party/apple_sdks/xcode_14_2/iphonesimulator/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h:53:9)') is deprecated [-Werror,-Wdeprecated-anon-enum-enum-conversion]
  159 |       static_cast<CGBitmapInfo>(kCGImageAlphaPremultipliedLast |
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
  160 |                                 kCGBitmapByteOrder32Big),  // CGBitmapInfo bitmapInfo
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~
```
2023-07-18 04:54:01 +00:00
Loïc Sharma
127e10cfcf [Windows] Remove accessibility bridge helpers from the engine (flutter/engine#43710)
The ownership of the accessibility bridge was moved from `FlutterWindowsEngine` to `FlutterWindowsView`. This change moves leftover accessibility bridge helpers/logic from the engine to the view.

Addresses: https://github.com/flutter/flutter/issues/124995
Follow-up to: https://github.com/flutter/engine/pull/41308

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-07-17 21:06:15 +00:00
Caroline Liu
adc9cec1df [fuchsia] flutter-embedder-test and touch-input-test use Flatland Test UI Stack (flutter/engine#43562)
This change also:
- removes reliance from both tests on `fuchsia.ui.scenic.Scenic`
protocols
- migrates `touch-input-test` to get display info from
`fuchsia.ui.display.singleton.Info` instead of
`fuchsia.ui.gfx.DisplayInfo`
- adds support for `fuchsia.ui.display.singleton.Info` in
`portable_ui_test` to support the above
- migrates `flutter-embedder-test` to capture screenshots using
`fuchsia.ui.composition.Screenshot` instead of
`fuchsia.ui.scenic.Screenshot`
  - updates screenshot tooling accordingly
- removes the embedding view hit test disabled case from `touch-input
test`, since disabling the hit region is not currently supported in
Flutter's integration with Flatland afaict ([this
logic](4f384979af/shell/platform/fuchsia/flutter/flatland_external_view_embedder.cc (L411-L434))
appears to set hit regions to the full view size by default, and
Flatland appears to drop the value
[here](4f384979af/shell/platform/fuchsia/flutter/flatland_external_view_embedder.cc (L578)))
- removes hit test configurability on `touch-input-test` and
`flutter-embedder-test` embedding views

Bug: fxbug.dev/125514
2023-07-17 13:16:13 -04:00
Jonah Williams
a7fd72b8ed [Impeller] fix some OpenGL Linux desktop issues. (flutter/engine#43727)
Fixes https://github.com/flutter/flutter/issues/130514

The context wasn't current so we couldn't get the GL version.

The extension lookup was throwing an invalid enum error, the desktop opengl docs say to use a different method.
2023-07-15 23:23:08 +00:00
Zachary Anderson
6237207218 Revert "Reland "add non-rendering operation culling to DisplayListBuilder" (#41463)" (flutter/engine#43721)
Reverts flutter/engine#43698

A framework tree test started failing on the engine roll with this PR: https://github.com/flutter/flutter/pull/130643

The test failure is in https://ci.chromium.org/ui/p/flutter/builders/prod/Linux_android%20hybrid_android_views_integration_test/8517/overview

```
[2023-07-14 19:33:21.980926] [STDOUT] stdout: [   +6 ms] I/PlatformViewsController( 9988): Using hybrid composition for platform view: 5
[2023-07-14 19:33:22.767236] [STDOUT] stdout: [ +786 ms] 00:19 +4 -1: Flutter surface with hybrid composition Uses FlutterImageView when Android view is on the screen [E]
[2023-07-14 19:33:22.767765] [STDOUT] stdout: [        ]   Expected: '|-FlutterView\n'
[2023-07-14 19:33:22.767815] [STDOUT] stdout: [        ]               '  |-FlutterSurfaceView\n'
[2023-07-14 19:33:22.767924] [STDOUT] stdout: [        ]               '  |-FlutterImageView\n'
[2023-07-14 19:33:22.768084] [STDOUT] stdout: [        ]               '  |-ViewGroup\n'
[2023-07-14 19:33:22.768162] [STDOUT] stdout: [        ]               '    |-ViewGroup\n'
[2023-07-14 19:33:22.768800] [STDOUT] stdout: [        ]               '  |-FlutterImageView\n'
[2023-07-14 19:33:22.768835] [STDOUT] stdout: [        ]               ''
[2023-07-14 19:33:22.768853] [STDOUT] stdout: [        ]     Actual: '|-FlutterView\n'
[2023-07-14 19:33:22.768882] [STDOUT] stdout: [        ]               '  |-FlutterSurfaceView\n'
[2023-07-14 19:33:22.768900] [STDOUT] stdout: [        ]               '  |-FlutterImageView\n'
[2023-07-14 19:33:22.768917] [STDOUT] stdout: [        ]               '  |-ViewGroup\n'
[2023-07-14 19:33:22.768956] [STDOUT] stdout: [        ]               '    |-ViewGroup\n'
[2023-07-14 19:33:22.769119] [STDOUT] stdout: [        ]               ''
[2023-07-14 19:33:22.769156] [STDOUT] stdout: [        ]      Which: is different. Both strings start the same, but the actual value is missing the following trailing characters:   |-Flutte ...
[2023-07-14 19:33:22.779280] [STDOUT] stdout: [  +10 ms]   package:matcher/src/expect/expect.dart 149:31     fail
[2023-07-14 19:33:22.779326] [STDOUT] stdout: [        ]   package:matcher/src/expect/expect.dart 144:3      _expect
[2023-07-14 19:33:22.780315] [STDOUT] stdout: [        ]   package:matcher/src/expect/expect.dart 56:3       expect
[2023-07-14 19:33:22.780345] [STDOUT] stdout: [        ]   test_driver/main_test.dart 124:7                  main.<fn>.<fn>
[2023-07-14 19:33:22.780356] [STDOUT] stdout: [        ]   ===== asynchronous gap ===========================
[2023-07-14 19:33:22.780365] [STDOUT] stdout: [        ]   package:test_api/src/backend/declarer.dart 215:9  Declarer.test.<fn>.<fn>
[2023-07-14 19:33:22.780376] [STDOUT] stdout: [        ]   ===== asynchronous gap ===========================
[2023-07-14 19:33:22.780385] [STDOUT] stdout: [        ]   package:test_api/src/backend/declarer.dart 213:7  Declarer.test.<fn>
[2023-07-14 19:33:22.780395] [STDOUT] stdout: [        ]   ===== asynchronous gap ===========================
[2023-07-14 19:33:22.780405] [STDOUT] stdout: [        ]   package:test_api/src/backend/invoker.dart 258:9   Invoker._waitForOutstandingCallbacks.<fn>
[2023-07-14 19:33:22.780415] [STDOUT] stdout: [        ] 00:19 +4 -1: Flutter surface with hybrid composition (tearDownAll)
[2023-07-14 19:33:22.907295] [STDOUT] stdout: [ +126 ms] 00:19 +4 -1: (tearDownAll)
[2023-07-14 19:33:22.947855] [STDOUT] stdout: [  +41 ms] 00:19 +4 -1: Some tests failed.
```

This change in that roll looks like it may be related.
2023-07-15 14:14:10 +00:00
Rulong Chen(陈汝龙)
b761cc404b Optimizing performance by avoiding multiple GC operations caused by multiple surface destruction notifications (flutter/engine#43587)
Fixes: https://github.com/flutter/flutter/issues/130379

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-07-15 08:44:04 +00:00
Jim Graham
405d8ce369 Reland "add non-rendering operation culling to DisplayListBuilder" (#41463) (flutter/engine#43698)
Fixes https://github.com/flutter/flutter/issues/129862

This reverts commit cd52c0ce82b37bc9d16bea26fbd1753174c49e42.

These changes were exposing an underlying bug in the DisplayListMatrixClipTracker that has now been fixed independently (https://github.com/flutter/engine/pull/43664). There are no changes to the commit being relanded here, it has been tested on the Wondrous app which demonstrated the regression before the NOP culling feature was reverted and it now works fine due to the fix of the underlying cause.
2023-07-14 22:34:50 +00:00
Jonah Williams
4698c6b307 [Impeller] Ensure that missing color attachment 0u does not cause crash in embedder API (flutter/engine#43705)
https://github.com/flutter/flutter/issues/130619
2023-07-14 22:17:56 +00:00
Kevin Lubick
bdc24b3d18 Remove calls to SkCanvas::flush() (flutter/engine#43684)
In https://skia-review.googlesource.com/c/skia/+/716476, Skia removed
calls to SkCanvas::flush(). This replaces those calls that Flutter was
making with what had been going on - calling GrDirectContext::flush() if
the canvas was backed by a Ganesh backend. Raster-backed canvases did
not need flushing.

## 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].
- [ ] 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.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [x] 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-07-14 16:34:22 -04:00
Jason Simmons
9196510ed8 More fixes for the new clang-tidy roll on iOS targets (flutter/engine#43688)
See https://github.com/flutter/engine/pull/43661
2023-07-14 17:44:52 +00:00
Martin Kustermann
0e369e0e4e Use utf8.encode() instead of longer const Utf8Encoder.convert() (flutter/engine#43675)
The change in [0] has propagated now everywhere, so we can use 
`utf8.encode()` instead of the longer `const Utf8Encoder.convert()`.

Also it cleans up code like

```
  Uint8List bytes;
  bytes.buffer.asByteData();
```

as that is not guaranteed to be correct, the correct version would be

```
  Uint8List bytes;
  bytes.buffer.asByteData(bytes.offsetInBytes, bytes.length);
```

a shorter hand for that is:

```
  Uint8List bytes;
  ByteData.sublistView(bytes);
```

[0] https://github.com/dart-lang/sdk/issues/52801
2023-07-14 13:44:54 +02:00
Jason Simmons
db4c5360bf Fix a clang-tidy warning about a potentially nil value in the editingState dictionary (flutter/engine#43660) 2023-07-13 23:09:26 +00:00
Jason Simmons
4f384979af Fix a Fuchsia formatter type mismatch flagged by the pending Clang roll (flutter/engine#43651) 2023-07-13 20:13:55 +00:00
Victoria Ashworth
1a078f8091 Add logs to debug VM Service Publication (flutter/engine#43616)
Adding logs to help debug why VM Service is being published when it shouldn't (https://github.com/flutter/flutter/issues/129987 and https://github.com/flutter/flutter/issues/129836).

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-07-13 17:55:48 +00:00
Jonah Williams
24c6a07906 [Impeller] Add support to embedder for Impeller on GL (via Angle on Windows). (flutter/engine#43388)
Actually works now, though there is some issue with the default fbo stencil so I've filled https://github.com/flutter/flutter/issues/130048

Other issues:
* ~~Rendering looks wrong~~
* ~~Resizing window hangs~~
* ~~Reactor isn't set up correctly and all blit passes are currently failing.~~
* ~~Needs to handle falling back to sample count of 1 like we do on Android~~.
2023-07-13 00:34:34 +00:00
Jim Graham
ce4c7d3ffd move rtree and canvas_spy sources to Fuchsia sub-directory (flutter/engine#43615)
These sources have long been obsolete for most of the engine, except for the Fuchsia sources. They do not need to be built for any other platform so this PR moves them into a Fuchsia platform-specific build directory so that they are only present in the Fuchsia binaries.
2023-07-12 22:22:39 +00:00
Jim Graham
870fc78163 header file cleanup focusing on removing unnecessary SkPicture includes (flutter/engine#43589)
Most of the #include directives for SkPicture are removed except where they are still functional. Many comments rewritten to no longer be SkPicture-centric.

- DL unit tests still use it for consistency testing
- rasterizer/engine still use it for screen shot support
- Fuchsia still uses it extensively
2023-07-12 08:17:06 +00:00
Gwen Mittertreiner
91de8eabaa [fuchsia][cml] Mark Tracing as Optional (flutter/engine#43567)
Tracing is an optional component that is only included in eng builds, so the usage should be marked optional.

Bug: fxbug.dev/112433
2023-07-11 20:24:06 +00:00
Dan Field
9062f9858c Delete unused display list/SkPicture code (flutter/engine#43560)
This code no longer does anything.
2023-07-11 17:15:47 +00:00
David Worsham
122b633929 [fuchsia] Remove FIDL dart references (flutter/engine#43550)
fidlgen_dart was still referenced in the build rules. It is being
removed from the fuchsia SDK, so remove it from the build rules here.
2023-07-12 02:48:12 +10:00
Jim Graham
b9835fa1b8 remove include of SkPicture files from non-Fuchsia sources (flutter/engine#43542)
Addresses most of https://github.com/flutter/flutter/issues/128060

Most of the uses of SkPicture and Recorder are removed from the engine sources. The few that remain are:

- DisplayList <-> Skia consistency testing code
- Legacy code only used from Fuchsia
- Dart CanvasKit uses which aren't actually using the local Skia sources or libraries

These are all comment and include file changes and so the testing is in the building.
2023-07-11 09:22:19 +00:00
Robert Ancell
1f3d51dca5 Use better method of ensuring that *_get_type() functions are exported (flutter/engine#43395)
As discovered in https://stackoverflow.com/a/63264068/1950237
2023-07-11 07:58:34 +12:00
luckysmg
4248f33948 [iOS][Keyboard] Reland wait vsync on UI thread and update viewport inset to avoid jitter (flutter/engine#43463)
*List which issues are fixed by this PR. You must list at least one issue.*
- https://github.com/flutter/flutter/issues/120555
- https://github.com/flutter/flutter/issues/130028

### New test for crash case: 
`testKeyboardAnimationWillNotCrashWhenEngineDestroyed`

### The diff with original PR:

Use `dispatch_async(dispatch_get_main_queue()` to switch to platform thread.
2023-07-10 16:25:05 +00:00
Robert Ancell
b864ee7e61 Fix leak when switching channels (flutter/engine#41827)
As noticed in https://github.com/flutter/flutter/issues/126209

## 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-07-10 21:54:21 +12:00
Dan Ballard
ac192f333c [linux] Allow overriding aot_library_path (flutter/engine#42555)
Support overriding `aot_library_path` in `FLDartProject` on Linux.

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

## 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.

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-07-10 16:11:53 +12:00
Tong Mu
489f9c3d01 Make updating window metrics multi-view (flutter/engine#43366)
This PR adds multi-view support to various methods that updates the window metrics by adding a `view_id` parameter.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-07-08 05:54:16 +00:00
Tong Mu
9cd4338940 Rename default views to implicit views (flutter/engine#43364)
This PR renames a number of internal variables from "default view ID" to
"implicit view ID", as we have pretty much settled on naming this
mechanism. Some docs are also fixed accordingly.

## Pre-launch Checklist

- [ ] 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.

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-07-07 20:44:37 -07:00
David Worsham
b400037017 [fuchsia] Fix tests; remove fuchsia dart SDK deps (flutter/engine#43461)
Dart is being removed from the Fuchsia SDK, so remove references to it
here.

Also remove references to workstation_eng and replace with terminal.
workstation_eng is no longer a thing.
2023-07-08 09:37:34 +10:00
John McCutchan
2f7b05c650 Eagerly remove the PlatformView from the view hierarchy on Android (flutter/engine#43423)
Eagerly remove the PlatformView from the view hierarchy on Android.

Fixes [#107297](https://github.com/flutter/flutter/issues/107297)

## 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-07-06 15:28:10 -07:00
Tong Mu
f4bd2708cf Remove dead code for recreating a11y node delegates (flutter/engine#43359)
This PR removes some dead code for recreating a11y node delegates. These
code was used to refresh a11y information when the macOS embedder live
swapped view controllers, but have become obsolete since
https://github.com/flutter/engine/pull/39145 removed the support for
such live swapping.

## Pre-launch Checklist

- [ ] 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.

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-07-06 13:10:02 -07:00
Loïc Sharma
27e0ef62d8 [macOS] Fix assertion typo (flutter/engine#43179) 2023-07-06 20:02:18 +00:00
LouiseHsu
9e79a79066 Add Look Up to iOS selection controls (flutter/engine#43308)
In native iOS, when Look Up is initiated on highlighted text, a view DDParsecCollectionViewController is presented with definitions of the the selected text if available, as well as Siri integrated suggestions. However, since the view controller is gated behind a private API, we will use [UIReferenceLibraryViewController](https://developer.apple.com/documentation/uikit/uireferencelibraryviewcontroller) instead, which is functionally identical and visually very similar.

| Native | UIReferenceLibraryViewController|
| ------------- | ------------- |
| <img src="https://github.com/flutter/engine/assets/36148254/763004f0-970f-4d8a-9a9a-133401ef0c1b" width="360" />| <img src="https://github.com/flutter/engine/assets/36148254/b20fe03f-6c9d-4a4a-98dc-8bcd840406db" width="360" />|

This PR is the engine portion of the changes that will allow this feature change.
This PR addresses https://github.com/flutter/flutter/issues/82907
More details are available in this [design doc](flutter.dev/go/add-missing-features-to-selection-controls)
2023-07-06 19:38:48 +00:00
Chris Yang
f265745bc2 Revert "[iOS][Keyboard] Wait vsync on UI thread and update viewport inset to avoid jitter." (flutter/engine#43422)
Reverts flutter/engine#42312

Original PR caused crash https://github.com/flutter/flutter/issues/130028

Will reopen https://github.com/flutter/flutter/issues/120555
2023-07-06 17:33:07 +00:00
Dan Field
f7ba78c7b0 Release log capture at end of test (flutter/engine#43429)
Fixes https://github.com/flutter/flutter/issues/130036

Also fixes a potential issue where the shell wasn't getting destroyed at the end of the test.

Since no log is actually printed ont he second go, the destructor of `LogMessage` never clears the static pointer, and the next test that tries to print a log tries to print to that pointer which is now garbage.
2023-07-06 15:05:01 +00:00
yaakovschectman
017941c97d Use Windows Display Language (flutter/engine#43341)
Get the Windows Display Language for locale selection instead of the
preferred languages.

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

## 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-07-06 07:49:50 -04:00
Loïc Sharma
8bc45a996f [Windows] Fix FlutterWindow::GetNativeViewAccessible crash (flutter/engine#43368)
Flutter shouldn't crash if a view's `HWND` receives a `WM_GETOBJECT` message before it is attached to the view.

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

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-07-05 17:27:03 +00:00
林洵锋
45ac2b64e6 [iOS] Fix FlutterViewController retain cycle (flutter/engine#43379)
Fixes [flutter/flutter#126560](https://github.com/flutter/flutter/issues/126560)
2023-07-05 17:00:18 +00:00
yaakovschectman
570578974c Fix inverted boolean in Windows document selection changed a11y event (flutter/engine#43281)
Fix a typo that inverted an intended condition, and amend a unit test to
check for this. This a11y event should target the focused node, but a
fallback for when the focus returns null was inverted.

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

## 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-06-30 12:10:37 -04:00
Brandon DeRosier
cd52c0ce82 Revert "Reland "add non-rendering operation culling to DisplayListBuilder" (#41463)" (flutter/engine#43358)
Reverts flutter/engine#42584. (Thanks to @jonahwilliams for bisecting)

With this change, layers are getting clipped incorrectly when rendering
platform views in Wondrous.
2023-06-30 04:22:21 -07:00
Tamir Duberstein
e4d08d4e8c Remove unused constants (flutter/engine#43344) 2023-06-29 21:42:05 +00:00
Emircan Uysaler
d69d614045 [fuchsia] Remove strict equality check for SkMatrix comparison for Fl… (flutter/engine#43309)
Flatland version of
010e710512

Bug: fxb/126648
2023-06-29 12:01:12 -04:00
Jonah Williams
ac3ce651f3 [Impeller] Give Impeller a dedicated raster priority level worker loop. (flutter/engine#43166)
We'd like to (or already are) using the concurrent message loop for high priority rendering tasks like PSO construction and render pass encoding. The default priority level for the engine managed concurrent message loop is 2, which is a significantly lower priority than the raster thread at -5. This is almost certainly causing priority inversion.

We must move back to dedicated runners so we can adjust thread priorities.
2023-06-27 18:08:49 +00:00
Tamir Duberstein
da738cb44d Avoid channel clone (flutter/engine#43181)
Use fdio_fd_transfer instead of fdio_fd_clone.
2023-06-26 12:04:46 -07:00
Robert Ancell
2e4569257b Allow event channels to reuse names (flutter/engine#41837)
https://github.com/flutter/flutter/issues/126209

## 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-06-26 14:05:34 +12:00
Brandon DeRosier
c85223dc95 [Impeller] Supply surface cull rect for Vulkan & GLES dispatchers (flutter/engine#43152)
Similar to Metal, have the DL cull entities early that lie entirely
outside the surface texture.
2023-06-24 15:46:14 -07:00
Tamir Duberstein
f7d1aada2e Add tmp storage capability to flutter runner (flutter/engine#43157)
Missed in fd56ab9e4475893d94e3a45ea5d5b3374bd74447.
2023-06-23 16:33:42 -07:00