1303 Commits

Author SHA1 Message Date
Dan Field
76fc29312f Make sure to finish the suite if all tests are skipped (flutter/engine#49339)
Fixes https://github.com/flutter/flutter/issues/140481

Before this fix, if all tests are skipped, the `onDone` callback never fires, which means the recieve port never closes, which means the process just hangs indefinitely (and the success message is never printed).
2024-01-02 18:34:04 +00:00
Jenn Magder
e7d1af70f1 Turn on scenario app screenshots (flutter/engine#49066)
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
2023-12-21 19:01:15 +00:00
Jim Graham
910a5fa5d8 Ensure sorted rects in ui.Canvas for legacy compatibility (flutter/engine#49309)
Fixes https://github.com/flutter/flutter/issues/140490
2023-12-21 08:34:23 +00:00
Dan Field
ae9289f5c1 [Impeller] Make IPLR files multi-platform (flutter/engine#49253)
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.
2023-12-21 06:17:26 +00:00
Victoria Ashworth
75cf8ed82c Fix testAppExtensionLaunching for Xcode 15/iOS 17 (flutter/engine#49242)
Fixes https://github.com/flutter/flutter/issues/140181.

Example of fix working on macOS 13 with Xcode 15 and iOS 17 simulator: https://ci.chromium.org/ui/p/flutter/builders/try/Mac%20Engine%20Drone/586366/overview

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-12-20 16:58:19 +00:00
Michael Goderbauer
dbfad3bfed Sync lints with flutter/flutter (flutter/engine#49192) 2023-12-20 01:12:30 +00:00
Bartek Pacia
61a61a8632 [Docs] Add more info about running tests on iOS (flutter/engine#48859)
I wish this info was there, that'd save me from looking inside the script.
2023-12-19 22:54:54 +00:00
Tong Mu
927fd200ed Revert "Reland 2: Multiview Pipeline (#47239)" (flutter/engine#49238)
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
2023-12-19 22:30:01 +00:00
Jim Graham
57c1db2af6 Make sure run_tests.py runs dart tests on Skia (flutter/engine#49260)
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.
2023-12-19 21:51:09 +00:00
Matej Knopp
33a6339c63 Add FlutterMetalLayer as optional alternative to CAMetalLayer (flutter/engine#48226)
This PR implements `FlutterMetalLayer`, a drop-in (as far as Flutter is
concerned) replacement for `CAMetalLayer`. The biggest difference is
that `FlutterMetalLayer` can present frames from background thread
within a `CATransaction`.

`FlutterMetalLayer` is disabled by default. To opt-in, add the following
item to `Info.plist`:

```xml
        <key>FLTUseFlutterMetalLayer</key>
	<true/>
```

The performance seems quite good, consistent 120hz on iPhone 13 Pro.

Benefits
- presenting with transaction from background thread, which, down the
line, would allow for platform views without thread merging.
- fine control over how the surface is displayed - we can display single
surface on multiple `CALayers`, each showing different part, allowing
for performant implementation of unobstructed platform views.
 
Drawbacks
- this not being a metal layer makes working with metal instrument tools
more awkward
2023-12-16 21:53:32 +01:00
Matan Lurey
3aae0411b7 Automatically fix header guards in the rest of the flutter/engine repo. (flutter/engine#49059) 2023-12-15 04:11:06 +00:00
Matan Lurey
2ecbd2ff7d Rename font-subset to font_subset. (flutter/engine#49051)
For consistency, I don't think we have any other tools with `-`'s.

I'll be honest - this seemed easier than teaching the header guard tool
how to handle `-`'s in directory names, but if you feel strongly about
it I can revert.
2023-12-14 15:16:09 -08:00
LongCatIsLooong
63dabdd2e0 Add a constructor for GlyphInfo. (flutter/engine#48971)
Needed for https://github.com/flutter/flutter/pull/139717

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-12-13 18:01:47 +00:00
Matan Lurey
09ba20cb6a Move third_party/swiftshader, roll buildroot DEPS. (flutter/engine#48946)
Progress towards https://github.com/flutter/flutter/issues/67373, synced with 0141e94b34.
2023-12-12 22:23:02 +00:00
Bartek Pacia
d3b6e4044d SemanticsUpdateBuilder migration: introduce identifier (flutter/engine#48882)
This PR adds `String? identifier` to `SemanticsUpdateBuilder` (currently it's only available in the temproary `SemanticsUpdateBuilderNew` API.

This is mainly targeted at https://github.com/flutter/flutter/issues/17988

Steps:
part 1: [engine] add `SemanticsUpdateBuilderNew` https://github.com/flutter/engine/pull/47961
part 2: [flutter] use `SemanticsUpdateBuilderNew`  https://github.com/flutter/flutter/pull/138331
**part 3: [engine] update `SemanticsUpdateBuilder` to be the same as `SemanticsUpdateBuilderNew`** <-- we are here
part 4: [flutter] use (now updated) `SemanticsUpdateBuilder` again.
part 5: [engine] remove `SemanticsBuilderNew`
2023-12-11 22:35:07 +00:00
Zachary Anderson
63e00ce106 Fix _availability_version_check for iOS 11 and 12 (flutter/engine#48624)
This PR ports more of the implementation of availability checking from
clang-rt into the Engine. In particular, when the call to look up the
symbol `_availability_version_check` fails, this PR falls back on
reading the platform version information out of a plist file at a
well-known location, as is done
[here](2fd66e6eb6/compiler-rt/lib/builtins/os_version_check.c (L163)).

This change fixes a mistake in
https://github.com/flutter/engine/pull/44711, which didn't account for
`_availability_version_check` not being available on iOS 11 and 12.

Fixes https://github.com/flutter/flutter/issues/138711
2023-12-11 11:51:55 -08:00
Victoria Ashworth
2d2423b0f2 Skip unexpected events in MultiPlatformViewBackgroundForegroundScenario (flutter/engine#48456)
Fixes https://github.com/flutter/flutter/issues/138193.

Was first attempted to fix in https://github.com/flutter/engine/pull/48096, but that was not reliable since it's all asynchronous. 

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-11-28 19:53:09 +00:00
Jonah Williams
91b78cc361 [Impeller] Add benchmarks that measure the time it takes to record canvas operations. (flutter/engine#48374)
This benchmark includes things like allocating geometry/contents, path conversions, et cetera. It doesn't include dispatching or GPU work, but should make it easier to see improvements/regressions in the efficiency of this code.
2023-11-28 03:06:53 +00:00
Michael Goderbauer
136f4a03c4 Dynamic view sizing [dart:ui] (flutter/engine#48090)
Towards https://github.com/flutter/flutter/issues/134501.

This PR makes the following changes to the public dart:ui API:

* It adds the `FlutterView.pysicalConstraints` property that describes max and min width and height for a view. The framework is allowed to size the `FlutterView` to any `Size` that meets these constraints.
* It adds an optional `size` argument to `FlutterView.render`. The framework provides the chosen `Size` that meets the aforementioned constraints to the `render` method. If the `FlutterView.pysicalConstraints` are tight (minHeight == maxHeight and minWidth == maxWidth) the argument is optional to remain backwards compatible. In all other cases, a `Size` must be provided.
* It adds a `ViewConstraints` class, which is basically the `dart:ui` version of `BoxConstraints` (This is similar to how we have `ViewPadding` in dart:ui to mirror `EdgeInsets` from the framework). It describes the constraints of a `FlutterView`, i.e. it powers the `FlutterView.pysicalConstraints` property.

This change does not wire anything up to the embedders. For now, `FlutterView.pysicalConstraints` just returns tight constraints for the embedder-provided size of the view (`FlutterView.physicalSize`) and the size provided to `FlutterView.render` is ignored (after it is checked that it meets the constrains). 

This PR enables the framework to implement the new dynamic view sizing and embedders to separately expose the new functionality to their clients.

Presubmits will fail until https://github.com/flutter/flutter/pull/138565 is submitted to the framework.

**DO NOT SUBMIT until https://github.com/flutter/flutter/pull/138648 is ready.**
2023-11-27 22:33:59 +00:00
LongCatIsLooong
59a5579465 Expose a few more glyph apis from ui.Paragraph (flutter/engine#47698)
Add 2 methods for querying glyph-related metrics

```dart
  GlyphInfo? getClosestGlyphInfoForOffset(Offset offset); 
  GlyphInfo? getGlyphInfoAt(int codeUnitOffset);
```

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-11-22 18:04:13 +00:00
Matan Lurey
7cc1f2f98c [Impeller] Write a text-decoration test at the dart:ui layer (flutter/engine#48101)
Closes https://github.com/flutter/flutter/issues/138501.

---

It would be nice to turn this into a test-fixture, and create a better local environment.

Here is how to run it locally:

```bash
# The test expects you to be PWD in the `src` directory or it crashes.
cd $ENGINE_SRC

out/host_debug_unopt_arm64/flutter_tester \
  --force-multithreading \
  --disable-observatory \
  --use-test-fonts \
  --icu-data-file-path=out/host_debug_unopt_arm64/icudtl.dat \
  --flutter-assets-dir=out/host_debug_unopt_arm64/gen/flutter/lib/ui/assets \
  --disable-asset-fonts \
  --enable-impeller \
  out/host_debug_unopt_arm64/gen/canvas_test.dart.dill

# "See" the output goldens.
open out/host_debug_unopt_arm64/gen/skia_gold_canvas_test.dart
```

![image](https://github.com/flutter/engine/assets/168174/3deeab8d-409d-4b2e-8bdf-1cae272636f8)
2023-11-20 21:07:05 +00:00
Zachary Anderson
aa3f8e61c1 Moves expat, ocmock, libjpeg-turbo, libwebp, and wuffs to //flutter/third_party (flutter/engine#48193)
As part of eliminating the Flutter buildroot
(https://github.com/flutter/flutter/issues/67373), we are moving all
third-party dependencies from //third_party to //flutter/third_party.

Once all third-party dependencies have been migrated, tooling and config
will be moved and the buildroot will be eliminated altogether.

No tests changed because there is no semantic change to this PR. This is
simply relocating a dependency.

This PR moves expat, ocmock, libjpeg-turbo, libwebp, and wuffs to
//flutter/third_party.

It also deletes //third_party/fontconfig, which was unused.
2023-11-19 22:53:29 -08:00
Matan Lurey
ddce052e36 Make testing/... and vulkan/... compatible with .clang-tidy. (flutter/engine#48161) 2023-11-17 15:16:31 -08:00
Victoria Ashworth
cbd9e7a1fa Reenable UnobstructedPlatformViewTests testMultiplePlatformViewsWithOverlays (flutter/engine#48139)
Renable test now that https://github.com/flutter/flutter/issues/138193 is fixed.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-11-17 16:08:02 +00:00
Dan Field
89ff1d0d8b Only run systrace test on API 29+, avoid building scenario app for 28 (flutter/engine#48163)
The emulator tests I added yesterday are failing because the systrace python test script uses features introduced in API 29, which causes the `perfetto` invocation to fail.

It's not essential that we run this test on lower API levels, so instead I'm making the script bail out in this case.

Other than that, the shard seems to be consistently passing, so I'm removing bringup.
2023-11-17 02:20:51 +00:00
Victoria Ashworth
1cb5474a11 Fix race condition in Unobstructed Platform View Scenario tests (flutter/engine#48096)
Fixes race situation where `_onPlatformMessage` is triggered before the first frame, essentially skipping the first frame.

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

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-11-16 19:02:57 +00:00
Matan Lurey
933bd94016 Make flow/... compatible with .clang_tidy. (flutter/engine#47995)
Work towards https://github.com/flutter/flutter/issues/134969.

All changes were made automatically (i.e. with `--fix`).
2023-11-16 08:41:10 -08:00
Jason Simmons
a9c9177d35 In the scenario game loop test, cancel the results writer task if the activity has been destroyed (flutter/engine#48051)
This test is run on Firebase Test Lab, and crashes have been reported on CI if this task executes when the activity is in a destroyed state.

See https://github.com/flutter/flutter/issues/138451
2023-11-15 17:10:49 +00:00
Zachary Anderson
ef11fee4ed Move Skia to //flutter/third_party/skia (flutter/engine#47913)
As part of eliminating the Flutter buildroot
(https://github.com/flutter/flutter/issues/67373), we are moving all
third-party dependencies from //third_party to //flutter/third_party.

Once all third-party dependencies have been migrated, tooling and config
will be moved and the buildroot will be eliminated altogether.

To land this PR, we'll need to:
1. Stop the Skia -> Engine autoroller
1. Update the license goldens in this PR.
1. Update
https://skia.googlesource.com/skia-autoroll-internal-config/+/refs/heads/main/skia-infra-public/skia-flutter.cfg#55
1. Land this PR.
1. Re-start the Skia -> Engine autoroller
2023-11-13 20:04:35 -08:00
Victoria Ashworth
c2e95e79be Temporarily disable test UnobstructedPlatformViewTests testMultiplePlatformViewsWithOverlays (flutter/engine#47883)
`UnobstructedPlatformViewTests testMultiplePlatformViewsWithOverlays` seems to fail pretty flakily on macOS 13.6.1. Temporarily disabling until we can find a solution (https://github.com/flutter/flutter/issues/138193).

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-11-10 13:00:01 +00:00
Gray Mackall
1dc6423dac [Re-land] Upgrade Android SDK to 34 "UpsideDownCake" (flutter/engine#47839)
The difference between this PR and the original is the change to the `AndroidManifest.xml`. For context, right before the original PR landed, [a change to upgrade the target sdk](https://github.com/flutter/engine/pull/47683) in the manifest from 31 to 33 landed. It also removed the lint complaining about using an old target sdk version from the baseline lint file. So this change upgrading the sdk, but not the target sdk in the manifest, triggered the lint again.

For the rest of the PR, [see the description of the original PR](https://github.com/flutter/engine/pull/47609).

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-11-09 18:02:18 +00:00
Greg Spencer
68166947cc Move window state update to window realize callback (flutter/engine#47713)
## Description

This moves the state update to only happen on realizing the window instead of at initialization time, based on [the comment from](https://github.com/flutter/flutter/issues/137262#issuecomment-1792020246) @robert-ancell .

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

## Tests
 - I tried to add tests, but it doesn't seem possible to create a view without an actual display connected (and making a mock of it defeats the purpose of the test). I'm happy to be proven wrong, though.
2023-11-08 23:56:01 +00:00
auto-submit[bot]
f5605fa8aa Reverts "Upgrade Android SDK to 34 "UpsideDownCake"" (flutter/engine#47834)
Reverts flutter/engine#47609
Initiated by: zanderso
This change reverts the following previous change:
Original Description:
~**This should not land until https://github.com/flutter/buildroot/pull/790 (re)lands, and I swap the buildroot url back to the latest commit.**~ ~Reland of PR to update buildroot at https://github.com/flutter/buildroot/pull/792. ~ <- landed, and changed the buildroot commit to the latest in DEPS

Upgrades to android api 34

Also:
1. Upgrades to java 17 in DEPS/ci, because the linter now requires it.
2. Stops running some roboelectric tests on android apis 16-18, because Roboelectric indicated those versions were unsupported and we don't support them either.
3. Applies the four trivial new suggestions from the newer linter.
4. Updates the baseline lint to include the new non-trivial lint ([fixed in a different PR](https://github.com/flutter/engine/pull/47817/files)).
5. Changes some instances where we were hardcoding android apis as numbers (e.g. `sdk = 16') to use version codes (see the [comment below](https://github.com/flutter/engine/pull/47609#issuecomment-1800308658)).

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-11-08 22:57:25 +00:00
Gray Mackall
542d29dedd Upgrade Android SDK to 34 "UpsideDownCake" (flutter/engine#47609)
~**This should not land until https://github.com/flutter/buildroot/pull/790 (re)lands, and I swap the buildroot url back to the latest commit.**~ ~Reland of PR to update buildroot at https://github.com/flutter/buildroot/pull/792. ~ <- landed, and changed the buildroot commit to the latest in DEPS

Upgrades to android api 34

Also:
1. Upgrades to java 17 in DEPS/ci, because the linter now requires it.
2. Stops running some roboelectric tests on android apis 16-18, because Roboelectric indicated those versions were unsupported and we don't support them either.
3. Applies the four trivial new suggestions from the newer linter.
4. Updates the baseline lint to include the new non-trivial lint ([fixed in a different PR](https://github.com/flutter/engine/pull/47817/files)).
5. Changes some instances where we were hardcoding android apis as numbers (e.g. `sdk = 16') to use version codes (see the [comment below](https://github.com/flutter/engine/pull/47609#issuecomment-1800308658)).

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-11-08 22:15:17 +00:00
Jonah Williams
5dd5cd253a [Impeller] null check drawable. (flutter/engine#47488)
Speculative fix for the first crash noted in https://github.com/flutter/flutter/issues/136628#issue-1944779964

nextDrawble can return null if the method times out.

Fixes https://github.com/flutter/flutter/issues/136525
2023-11-08 16:35:03 +00:00
Chris Bracken
229331bcff [testing] Extract StreamCapture test utility (flutter/engine#47774)
Factors out an RAII-based class that can be used to capture std::cout, std::cerr, or technically any other std::ostream, though that's unlikely to be useful.

This makes the logic reusable but more importantly, ensures the capture is cleaned up at the end of the test.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-11-08 01:18:16 +00:00
Chris Yang
5c12a78db9 [ios] making objective-C smart pointers support ARC (flutter/engine#47612)
Moving the implementation from https://codereview.chromium.org/1855483004 into the code base, including:

- scoped_nsobject, scoped_nsprotocol, scoped_block will support both mrc and arc
- Added parent class scoped_typeref for shared code between scoped_block and scoped_nsobject
- moving OwnershipPolicy to its own file

The implementation of the smart pointers are almost identical to https://codereview.chromium.org/1855483004 besides some syntax preference differences between chromium and flutter.

This PR also migrated [VsyncWaiterIosTest.mm](https://github.com/flutter/engine/pull/47612/files#diff-c98ce1a2aca65c29bbc444523b66921a53ecce5ff39a420b4eda7dbfe8ca1cc7) to ARC with scoped_nsobject

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

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-11-07 19:25:45 +00:00
Zachary Anderson
e24e3b5746 Don't use Skia BUILD.gn files (flutter/engine#47677)
The new `BUILD.gn` files in the Engine tree can't go under
`build/secondary` because Skia still has its own, and they'd be selected
first. So, this PR puts the new `BUILD.gn` files under `flutter/skia`.
2023-11-07 11:12:29 -08:00
Zachary Anderson
2431498922 Move some Dart packages to //flutter/third_party/pkg (flutter/engine#47654)
As part of eliminating the Flutter buildroot
(https://github.com/flutter/flutter/issues/67373), we are moving all
third-party dependencies from //third_party to //flutter/third_party.

Once all third-party dependencies have been migrated, tooling and config
will be moved and the buildroot will be eliminated altogether.

No tests changed because there is no semantic change to this PR. This is
simply relocating a dependency.
2023-11-06 06:59:27 -08:00
LongCatIsLooong
ef6aba043c Reland "Expose more methods on ui.Paragraph: lines" (#47584) (flutter/engine#47623)
The diff is in [this commit](305d930fe1).

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-11-02 23:16:16 +00:00
Dan Field
23b2847379 [Impeller] Skia gold for flutter_tester dart tests. (flutter/engine#47066)
This removes skips for the golden tests in `//testing/dart/canvas_test.dart` and instead passes them up to Skia gold.

Adds a utility class for dealing with Skia gold from these tests, as well as the existing fuzzy identical image comparison for tests that just want to do in memory comparison of images generated from the same test.

Removes the old golden files that were in tree.

Part of https://github.com/flutter/flutter/issues/53784
2023-11-02 17:48:28 +00:00
Victoria Ashworth
88bfe1a6da Fix race condition in Platform View Scenario tests (flutter/engine#47575)
Fixes race condition in Platform View Scenario tests, see https://github.com/flutter/flutter/issues/126627 for description of issue.

Fixes https://github.com/flutter/flutter/issues/137547 and https://github.com/flutter/flutter/issues/126627.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-11-02 15:16:46 +00:00
auto-submit[bot]
03c46c6b49 Reverts "Expose more methods on ui.Paragraph: lines" (flutter/engine#47584)
Reverts flutter/engine#46125
Initiated by: LongCatIsLooong
This change reverts the following previous change:
Original Description:

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-11-02 01:12:20 +00:00
LongCatIsLooong
b263241336 Expose more methods on ui.Paragraph: lines (flutter/engine#46125)
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-11-02 00:39:36 +00:00
Jason Simmons
cce2f9ced2 Consolidate all the copies of the OpenFixtureAsSkData testing helper function (flutter/engine#47491) 2023-11-01 17:03:05 +00:00
Matan Lurey
63d44d17dc Surgically remove .*dither.* from the Engine (flutter/engine#46750)
Closes https://github.com/flutter/flutter/issues/112498.

We no longer support any user-visible configuration around dithering. It is unconditionally applied for gradients (in both the Skia and Impeller backends), and never applied elsewhere. After this change, I'll update https://docs.flutter.dev/release/breaking-changes/paint-enableDithering accordingly.

---

~~Requires https://github.com/flutter/engine/pull/46746 to land successfully~~ Done.

Alright, this appears ready to review!
2023-10-31 22:28:00 +00:00
Zachary Anderson
b7d61edc74 Move gtest-parallel to flutter/third_party (flutter/engine#47393)
As part of eliminating the Flutter buildroot (https://github.com/flutter/flutter/issues/67373), we are moving all third-party dependencies from //third_party to //flutter/third_party.

Once all third-party dependencies have been migrated, tooling and config will be moved and the buildroot will be eliminated altogether.

No tests changed because there is no semantic change to this PR. This is simply relocating a dependency.
2023-10-27 20:47:37 +00:00
Chris Bracken
987dac0ae1 [macOS] Reuse NSWindow instance across unit tests (flutter/engine#47350)
Adds a gtest test fixture mixin and convenience class that instantiates an NSAutoreleasePool at the beginning of each test and flushes it at the end; this allows Objective-C tests using ARC to free  allocations at the end of each test.

Adds a subclass for the macOS accessibility bridge tests that instantiates and re-uses an NSWindow* across any tests that use it. This is because instantiating, closing, and immediately collecting an NSWindow results in a crash.

Prior to this patch, tests started failing (on my machine) around the 855th iteration, and issued the following warning on the 101st iteration:

```
2023-10-26 13:02:45.390829-0700 flutter_desktop_darwin_unittests[40837:1509026] [Window] WARNING: NSWindow has detected an excessive live window count of 101. Window 0x1423 of class 'NSWindow' created after passing the threshold of 100. This window is not necessarily the cause, and this warning will only be shown once per window class. (
  0   AppKit                              0x0000000192820d28 -[NSWindow _setWindowNumber:] + 684
  1   AppKit                              0x00000001933050e4 _NXCreateWindow + 284
  2   AppKit                              0x0000000192901ae0 -[NSWindow _commonAwake] + 672
  3   AppKit                              0x000000019281ff00 -[NSWindow _commonInitFrame:styleMask:backing:defer:] + 972
  4   AppKit                              0x000000019281f798 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 796
  5   AppKit                              0x000000019281f470 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 48
  6   flutter_desktop_darwin_unittests    0x0000000100001e3c _ZN7flutter7testing89AccessibilityBridgeMacTest_SendsAccessibilityCreateNotificationToWindowOfFlutterView_Test8TestBodyEv + 328
```

See: http://www.openradar.me/FB13291861

Issue: https://github.com/flutter/flutter/issues/104789
Issue: https://github.com/flutter/flutter/issues/127441
Issue: https://github.com/flutter/flutter/issues/124840

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-10-26 21:17:01 +00:00
Zachary Anderson
14a7db93d1 Cleanup Dart package dependencies a bit (flutter/engine#47306)
Removes package:quiver, and an older second copy of package:file
2023-10-25 13:09:30 -07:00
Tong Mu
87171e7339 Reland 2: Multiview Pipeline (flutter/engine#47239)
The last attempt https://github.com/flutter/engine/pull/47234 was reverted because there was another test merged in the meantime that violates the rule added in this PR.

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