1428 Commits

Author SHA1 Message Date
gaaclarke
0c6a230ad2 [Impeller] added missing golden test for DrawScaledTextWithPerspectiveSaveLayer (flutter/engine#51368)
related:
 - https://github.com/flutter/flutter/issues/130633
 - https://github.com/flutter/engine/pull/51343

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-13 17:49:49 +00:00
Jonah Williams
674874e613 [Impeller] attempt to get validation errors from CI unittests. (flutter/engine#51341)
Enables Vulkan validation layers for macOS and linux builds, enables macOS validation for macOS builds.

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

There may still be remaining issues with macOS validation, I need to verify I can reproduce https://github.com/flutter/flutter/issues/143324 . I plan to do that separately
2024-03-13 17:35:58 +00:00
Jonah Williams
3b105855ac [scenario app] make image matching fuzzier. (flutter/engine#51376)
Attempt to work around the minor 1px differences from
https://github.com/flutter/flutter/issues/145058
2024-03-13 09:50:50 -07:00
Gray Mackall
25865c11b1 Try making android scenario app not do animations (flutter/engine#51349)
Skips animations

Looks like this, for reference:
[no_animation_example.webm](https://github.com/flutter/engine/assets/34871572/0c8665a3-b546-4bbd-b7e1-00851c48e1ff)

(This is the animation from https://github.com/flutter/engine/pull/51329, so note that the first test looks weird because I lagged my emulator by alt tabbing).

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-12 17:03:18 +00:00
gaaclarke
06027becb6 [Impeller] implements blur styles for gradients (flutter/engine#51264)
fixes https://github.com/flutter/flutter/issues/144449

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-12 00:05:19 +00:00
Gray Mackall
9eedb6ab86 Make scenario app have translucent splash screen so it doesn't affect screenshot colors (flutter/engine#51329)
Makes the scenario app splash screen have a translucent color, so it doesn't end up overlaying on screenshots.

Before:
[device-2024-03-07-152047.webm](https://github.com/flutter/flutter/assets/34871572/a9b7a1f9-57ab-4eda-93e5-5ca70032cbef)

After:
[translucentsplash.webm](https://github.com/flutter/engine/assets/34871572/a6eb6407-add0-4004-83f9-4e0a5c1bb6f6)

This sort of fixes https://github.com/flutter/flutter/issues/144657? The issue is still odd to me, though, because I don't know why the test runner wouldn't be waiting properly for the splash screen.

Bonus, this is what it looks like if we [change the runner](a70a0abdec/testing/scenario_app/bin/run_android_tests.dart (L352)) to not use animations, with `--no-window-animation` (but don't include the splash screen change):
[no_animation_example.webm](https://github.com/flutter/engine/assets/34871572/0c8665a3-b546-4bbd-b7e1-00851c48e1ff)
You can see there is still a moment of color change at the end of tests (ignore the very first test I was alt tabbing and lagged out my emulator).

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-11 23:04:55 +00:00
Matan Lurey
15779b7847 Conditionally run golden_tests_harvester for run_impeller_golden_tests. (flutter/engine#51325)
I think this restores the behavior prior to
https://github.com/flutter/engine/pull/50844 without making the client
code faulty.

I'll file a follow-up issue, I don't think `golden_tests_harvester`
should accept running if `GOLDCTL` isn't set:
https://github.com/flutter/flutter/issues/144948.

/cc @godofredoc
2024-03-11 12:10:57 -07:00
Zachary Anderson
e99d6e5616 Remove flaky check from observatory/tracing_test.dart (flutter/engine#51320)
For https://github.com/flutter/flutter/issues/144394
2024-03-11 09:21:06 -07:00
gaaclarke
b220a37102 [Impeller] implement mask blur for textures (flutter/engine#51183)
fixes https://github.com/flutter/flutter/issues/144266

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide] and the [C++,
Objective-C, Java style guides].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I added new tests to check the change I am making or feature I am
adding, or the PR is [test-exempt]. See [testing the engine] for
instructions on writing and running engine tests.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I signed the [CLA].
- [x] All existing and new tests are passing.

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
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[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
2024-03-08 15:58:03 -08:00
Zachary Anderson
286169bb52 Don't rely on dart binary on PATH in run_test.py (flutter/engine#51302) 2024-03-08 23:49:32 +00:00
Dan Field
a4c787e072 Use io.flutter.Build.API_LEVELS rather than android.os.Build.VERSION_CODES (flutter/engine#51171)
Updates the linting script to ban the use of `VERSION_CODES`.

We currently have a mish-mash of using the integers, using `VERSION_CODES`, and even how we import the version codes. This makes it more confusing when doing things like #51070 - I think it is clearer to see `22` than `LOLLIPOP_MR1`.

I'd like to get LGTM (or at least no opinion) from all the requested reviewers here.
2024-03-08 19:04:20 +00:00
Jason Simmons
7da9c29b79 Update CI scripts to use either src/flutter/third_party/dart or src/third_party/dart (flutter/engine#51276)
See https://github.com/flutter/flutter/issues/143335
2024-03-08 17:00:17 +00:00
Brandon DeRosier
e4a8c84807 [Impeller] Add mask blur style support to the RRect blur fast path. (flutter/engine#51250)
This improves performance by avoiding the 2-pass Gaussian blur in more shadow drawing situations.

The new golden also serves as a good reference for how mask blurs are supposed to work alongside various other paint properties such as color filters, color opacity, image filters, and blending.

![Screenshot 2024-03-06 at 11 47 04 PM](https://github.com/flutter/engine/assets/919017/dee1b56c-d2e4-40bd-9f50-aeba0cfd69f2)

The top 5 shapes are various RRect cases and are rendering correctly via the new blur style implementation in this patch.
The two bottom rows (the triangles and arcs) are non-rrect paths, so they're falling back to rendering using the 2-pass Gaussian blur. Rendering errors are circled in red below:

![Screenshot 2024-03-06 at 11 47 04 PM](https://github.com/flutter/engine/assets/919017/5ac27d71-95e6-4e6e-99d8-7436476e1aee)

* Cases 1, 2, 7, and 9 all appear to rendering fine.
* Cases 3, 4, 5, and 6 all have mask blur styles set to `BlurStyle::kSolid`. After the first clipped overlay has been drawn, subsequent clipped overlays aren't drawing.
* Case 6 is also has the blend mode set to `BlendMode::kExclusion`.
* Cases 8 and 10 are rendering with `BlurStyle::kInner` and `BlurStyle::kOuter` respectfully, but with a blur ImageFilter also set on the paint state. The ImageFilter needs to be applied to the rasterized mask blurred content.
2024-03-08 01:36:09 +00:00
Chris Bracken
0575633c34 Move ANGLE to flutter/third_party (flutter/engine#51270)
This moves Flutter out of the buildroot's third_party directory and into
//flutter/third_party and updates all BUILD and gni files.

Issue: https://github.com/flutter/flutter/issues/144786
Part of: https://github.com/flutter/flutter/issues/67373

## Pre-launch Checklist

- [X] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [X] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [X] I read and followed the [Flutter Style Guide] and the [C++,
Objective-C, Java style guides].
- [X] I listed at least one issue that this PR fixes in the description
above.
- [X] I added new tests to check the change I am making or feature I am
adding, or the PR is [test-exempt]. See [testing the engine] for
instructions on writing and running engine tests.
- [X] I updated/added relevant documentation (doc comments with `///`).
- [X] The odds of this passing on its first CI run is 0%, because
there's no way the licence script isn't going to have a fit over it, at
which point I promise on my honour that I will dutifully fix all the
things it complains about and re-run, probably more than once.
- [X] This PR fulfils the minimum [Canadian
Content](https://www.youtube.com/watch?v=h9NMnPm5kXc&list=PLJ7QPuvv91JuoPWrLhqX0zDFUoLdynMEk&index=3)
regulations mandated by the CRTC.
- [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
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[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
2024-03-07 16:23:14 -08:00
Tong Mu
67603e5e32 Reland 5: Multiview pipeline (flutter/engine#51186)
This relands https://github.com/flutter/engine/pull/50931.

The crash that caused the 4th revert has been fixed by https://github.com/flutter/flutter/pull/144212.

[There has been discussion](https://github.com/flutter/engine/pull/51019) on why the benchmark in previous attempts show significant drop in build time. This PR addresses it using option a as described in [this comment](https://github.com/flutter/engine/pull/51186#issuecomment-1977820525).

This PR also addresses https://github.com/flutter/flutter/issues/144584 with option 1. A test is added.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-07 01:54:14 +00:00
Brandon DeRosier
80c055bfc9 [Flutter GPU] Move method tests to flutter_tester. (flutter/engine#51223)
Part of https://github.com/flutter/flutter/issues/144640.

I'll be moving the rest of the pipeline-dependent tests and packaging a shader bundle for flutter_tester once Flutter GPU works against Vulkan/swiftshader.
2024-03-06 20:33:01 +00:00
Matan Lurey
feef93058c Re-stamp skia_gold_client e2e tests. (flutter/engine#51220)
Testing if `skia_gold_client` and pre-submit/post-submit is playing nice by triggering an update.

Generated via:

```sh
dart ./testing/skia_gold_client/tool/generate.dart
```

Related: https://github.com/flutter/flutter/issues/144352.
2024-03-06 18:33:05 +00:00
Loïc Sharma
8f1baa30bb [et] Allow users to update dependencies (flutter/engine#51177)
Allow users to update dependencies. Examples:

* `et fetch` Fetch dependencies

In the future, `et build` will update dependencies if it detects that they have changed.

Also:
* Updates the status in the README
* Adds instructions on how to run tests
* Fixes `et run`'s description
* Makes the `--verbose` flag global
2024-03-06 17:00:23 +00:00
Matan Lurey
31e26a1d52 Revamp the scenario_app/../README.md to encourage self-sustenance (flutter/engine#51196)
Feedback welcome, though if it is non-blocking and ambiguous consider a follow-up PR instead 😸
2024-03-06 01:26:13 +00:00
gaaclarke
425aeca227 [Impeller] implement blur style solid (flutter/engine#50892)
fixes https://github.com/flutter/flutter/issues/134178

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide] and the [C++,
Objective-C, Java style guides].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I added new tests to check the change I am making or feature I am
adding, or the PR is [test-exempt]. See [testing the engine] for
instructions on writing and running engine tests.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I signed the [CLA].
- [x] All existing and new tests are passing.

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
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[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
2024-03-05 15:41:17 -08:00
Brandon DeRosier
0fc45b3c73 [Impeller] Fix convex triangulation winding bug for multi-contour paths. (flutter/engine#51198)
An extra triangle needs to be inserted after bridging the triangle strip to a new contour, otherwise the triangle winding ends up getting inverted for each consecutive contour.

Before:

<img width="685" alt="image" src="https://github.com/flutter/engine/assets/919017/cef666c1-c188-4c83-ae93-fca117b0bc7f">

After:

<img width="685" alt="image" src="https://github.com/flutter/engine/assets/919017/0cf5e994-5366-4e73-8f9c-4fec1128b303">
2024-03-05 21:21:03 +00:00
Greg Spencer
f98269d78c Skip configuration dependency if unit tests are disabled (flutter/engine#51179)
## Description

This makes the GTK dependency only active if unit tests are enabled, so that it won't create an undesired dependency on embedded platforms.

## Related Issues
 - Fixes https://github.com/flutter/flutter/issues/144421
2024-03-05 20:57:01 +00:00
LongCatIsLooong
8fd9bbee17 Reland "Remove migration flag and unused header files #50216" (flutter/engine#50259)
Forgot to update a pinned dependency in the previous attempt: https://github.com/flutter/tests/pull/340

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-05 02:17:05 +00:00
Matan Lurey
b9c4a4c17c Scenario App: Adds a run_{count}.{backend}. file prefix to every run (on CI) (flutter/engine#51102)
Adds a flag, `--prefix-logs-per-run`, that defaults to `true` on CI
envrionments.

If present, instead of writing the file `${LOGS_DIR}/logcat.txt`, we
write `${LOGS_DIR}/{prefix}.logcat.txt`. I don't really like this
solution, but alternatives are using zip files (requires downloading to
view) or waiting on generic log improvements.

Closes https://github.com/flutter/flutter/issues/144402.
2024-03-04 11:12:41 -08:00
Matan Lurey
43f24a8c1f Use Instrumentation.waitForIdleSync() after rotation requests. (flutter/engine#51169)
Fixes https://github.com/flutter/flutter/issues/144553.

Looking roughly at:

-
<https://stackoverflow.com/questions/42482522/test-recreating-android-activity-using-instrumentation-and-junit4>
-
<https://stackoverflow.com/questions/10982370/instrumentation-test-for-android-how-to-receive-new-activity-after-orientation>

... and given the fact it's only the rotation tests that seem especially
flaky, let's give it a shot?

/cc @reidbaker @johnmccutchan if you have other advice.
2024-03-04 11:05:51 -08:00
gaaclarke
b8060622bf [Impeller] implements blur styles inner and outer (flutter/engine#51018)
issue: https://github.com/flutter/flutter/issues/134178

This doesn't yet do textures since there is a bug in rendering mask blurs with textures.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-04 18:24:12 +00:00
Liam Appelbe
27ca389132 Experimental platform isolates API (flutter/engine#48551)
This is a prototype of the [PlatformIsolate
API](https://github.com/flutter/flutter/issues/136314).

**UPDATE (Jan 25):** The PR is ready for review. PTAL.

The `PlatformIsolate` creation flow is:

1. `PlatformIsolate.spawn` running on parent isolate
(platform_isolate.dart)
    a. Create `isolateReadyPort`
    b. `PlatformIsolateNativeApi::Spawn` (platform_isolate.cc)
    c. `DartIsolate::CreatePlatformIsolate` (dart_isolate.cc)
d. Isolate created. Entry point invocation task dispatched to platform
thread
    e. `PlatformIsolate.spawn` returns a `Future<Isolate>`
2. On the platform thread, `_platformIsolateMain` is invoked in the
platform isolate
    a. Create `entryPointPort`
b. Send `Isolate.current` metadata and `entryPointPort` back to the
parent isolate via `isolateReadyPort`
3. Back in the parent isolate, `isolateReadyPort.handler` is invoked
a. Send the user's `entryPoint` and `message` to the platform isolate
via `entryPointPort`
b. Use received isolate metadata to create a new `Isolate` representing
the platform isolate and complete the `Future<Isolate>`
4. In the platform isolate, `entryPointPort.handler` is invoked
    a. Run the user's `entryPoint(message)`

The engine shutdown flow is handled by `PlatformIsolateManager`, which
maintains a set of running platform isolates.
2024-03-04 16:47:41 +13:00
Matan Lurey
7b7d9a2f43 Add a basic e2e-test for skia_gold_client. (flutter/engine#51078)
Basically, I take blank images of red/blue/green squares, like this:

![solid_red_square](https://github.com/flutter/engine/assets/168174/b1de63e4-8c3c-43ff-9bcf-b067a7e9d920)

... and use Image Magick to annotate it with the current git hash:

```sh
$ drt ./testing/skia_gold_client/tool/generate.dart

Writing annotation "8069cb4ca1" on images in testing/skia_gold_client/tool/source_images and saving them in testing/skia_gold_client/tool/e2e_fixtures.
Writing to testing/skia_gold_client/tool/e2e_fixtures/solid_red_square.png
Writing to testing/skia_gold_client/tool/e2e_fixtures/solid_green_square.png
Writing to testing/skia_gold_client/tool/e2e_fixtures/solid_blue_square.png
Done: wrote 3 image.
```

![solid_red_square](https://github.com/flutter/engine/assets/168174/0ece31a8-9e64-44a2-ad06-78c04b02650c)

... then, I upload the digests very similar to how we do it in `scenario_app`.

---

The idea here is to have a way for me to know if Skia gold is working the way I/we expect, independent of a more complicated test suite with various race-y or flake-y conditions. We could also augment it with tests of "dimensions" properties.
2024-03-01 01:33:07 +00:00
John McCutchan
0be7a9c4f0 Add et run command (flutter/engine#51037)
The `run` command builds both the host and target engines and then invokes `flutter run` so that it runs the app using the custom engine builds.

It is expected that 'et run' be used inside the directory of a flutter application.

Command line flags passed after `--` will be forwarded to `flutter run`.

Some examples:

- `et run` Build the debug variant and runs the app in that mode.
- `et run -- --profile` Build the profile variant and runs the app in that mode.
- `et run -- --release` Build the release variant and runs the app in that mode.

Also:

- Start a local_engine.json builder definition (it is missing a lot)
- Tweak the test fixture.
- Add a new Matcher to litetest.
- Tweaked the build config linter to only care about duplicate build names within the same builder.
2024-03-01 01:09:04 +00:00
Dan Field
2e9e6107eb Reapply "Bump everything to Android 21" (#51056) (flutter/engine#51070)
This reverts commit 98485b3f82fec45a6a0ac932c3c20285a9a14e02.

Reverted in https://github.com/flutter/engine/pull/51056 because it
caused failures in the framework. No changes, but framework test has
been updated to use an actual robolectric implementation to avoid those
failures.

This should not land until
https://github.com/flutter/flutter/pull/144348 has landed in the
framework.

@gaaclarke @johnmccutchan fyi
2024-02-29 09:00:01 -08:00
Matan Lurey
b2b8311980 The adb logcat filtering will continue until morale improves. (flutter/engine#51069)
Closes https://github.com/flutter/flutter/issues/144346.
2024-02-28 19:10:17 -08:00
Matan Lurey
bc4d5caa20 Test the SurfaceTextureSurfaceProducer-branch in the Android scenario_app (flutter/engine#51061)
This PR does the following:
- Relands https://github.com/flutter/engine/pull/50993.
- Fixes a bug in `SurfaceTextureSurfaceProducer` where it would crash on
release (now tested, yay!)

Closes https://github.com/flutter/flutter/issues/143539.
Closes https://github.com/flutter/flutter/issues/143483.

/cc @gaaclarke @chinmaygarde, this PR should (after landed) test/verify
https://github.com/flutter/engine/pull/50730.
2024-02-28 14:17:21 -08:00
Jim Graham
98c96670b4 Make Skia object ostream operators work with unit tests (flutter/engine#51041)
Unit tests currently output basic hex dumps of skia objects even though we have ostream operators for many of the common ones. It looks like the operators were created in the wrong namespace (flutter/testing rather than the std namespace). Changing the namespace for the associated `assertions_skia` source files makes them compatible with unit tests that deal with these objects provided that the test files include that header and gn dependency, as verified with the `display_list_unittests` here.
2024-02-28 20:32:07 +00:00
Dan Field
98485b3f82 Revert "Bump everything to Android 21" (flutter/engine#51056)
Reverts flutter/engine#51032

Probably causing some of the failures in https://github.com/flutter/flutter/pull/144326

@johnmccutchan fyi
2024-02-28 19:15:04 +00:00
Zachary Anderson
65ada342b1 When run_tests.py is in --quiet mode, write verbose logs to a file (flutter/engine#51029)
This PR causes `run_test.py` to write `info` and higher logs to
`out/run_tests.log` even when `--quiet` is passed. If `--logs-dir` is
also passed, the logs file is copied to that location after all tests
are run.

These flags are added to one invocation on CI to check the correct
behavior.
2024-02-28 09:47:40 -08:00
Dan Field
6efee79357 Bump everything to Android 21 (flutter/engine#51032)
Followed the linter, got rid of a bunch of version check/guards we don't need anymore.
2024-02-28 15:56:40 +00:00
Matan Lurey
5c4ce0e168 Improve, test, and fix a bug related to adb logcat filtering. (flutter/engine#51012)
1. Write tests for the `AdbLogLine` extension/parsing, and run it on CI.
  Fixes https://github.com/flutter/flutter/issues/144164.

2. Improve the logging to include `androidemu`-related errors logs 
  Work towards https://github.com/flutter/flutter/issues/144164.

3. Clarified logic/fixed a bug related to handling `filterProcessId:
...`
2024-02-27 14:31:08 -08:00
Matan Lurey
75bfeb8fb0 Fail lazily when 1+ Skia gold comparions fail. (flutter/engine#51010)
(Speculative) fix for https://github.com/flutter/flutter/issues/144238.

@zanderso Could you review from a CLI angle? I realize this code is not great, but could I do something better here?
2024-02-27 19:08:18 +00:00
Dan Field
1ba4c0735b GLES for scenario_app tests using Impeller (flutter/engine#51000)
Follow up on #50977 - enables OpenGLES backend for that test harness.
2024-02-27 17:59:22 +00:00
Dan Field
3b99e7ab98 Actually use Impeller in scenario_app tests (flutter/engine#50977)
Right now, the scenario_app tests that claim to use Impeller are not actually using Impeller. This is for a few reasons:

- The arguments passed via instrumentation do not end up by default on the `Intent` for the `Activity` that is under test.
- The arguments passed via instrumentation were in the wrong order and not getting sent to instrumentation at all.

This patch updates existing tests to use a new `@Rule` that reads the arguments from the instrumentation's argument `Bundle` and injects them into the `Intent` that we actually pass to the `Activity` under test. It also updates the argument order in the script and adds a verification that Impeller prints that it is being used at least once.
2024-02-27 04:37:23 +00:00
Matan Lurey
539dc4eccc Respect SIGINT (Ctrl-C) for Android scenario_app. (flutter/engine#50989)
Closes https://github.com/flutter/flutter/issues/144076.

I had to make some other cleanup changes in order to avoid the program
hanging.
2024-02-26 19:17:44 -08:00
Matan Lurey
adc86fe60b Fix usage of --out-dir with a relative path. (flutter/engine#50992)
@dnfield:

> it looks like the new dart script doesn't necessarily work well with
relative directories for the out dir
2024-02-26 18:35:28 -08:00
auto-submit[bot]
63614f6be8 Reverts "Migrate Android scenario_app to the SurfaceProducer API (#50993)" (flutter/engine#50995)
Reverts flutter/engine#50993

Initiated by: matanlurey

Reason for reverting: The digests will come back negative, as this change shows bugs in the `ImageTexture` implementation.

Original PR Author: matanlurey

Reviewed By: {jonahwilliams, johnmccutchan}

This change reverts the following previous change:
Original Description:
Part of testing https://github.com/flutter/flutter/issues/139702.

Without this PR, the Impeller + Vulkan Scenario App will draw nothing/potentially crash, because there is no way to draw the (current) `SurfaceTexture`-based textures in Vulkan (and never will be).

This change does the following:
- Skia -> Nothing
- Impeller + OpenGLES -> On newer Android devices, uses `ImageReader` instead
- Impeller + Vulkan -> Always uses `ImageReader`

See also: https://api.flutter.dev/javadoc/io/flutter/view/TextureRegistry.SurfaceProducer.html.
2024-02-27 01:49:26 +00:00
Matan Lurey
5b9bb4bacf Migrate Android scenario_app to the SurfaceProducer API (flutter/engine#50993)
Part of testing https://github.com/flutter/flutter/issues/139702.

Without this PR, the Impeller + Vulkan Scenario App will draw nothing/potentially crash, because there is no way to draw the (current) `SurfaceTexture`-based textures in Vulkan (and never will be).

This change does the following:
- Skia -> Nothing
- Impeller + OpenGLES -> On newer Android devices, uses `ImageReader` instead
- Impeller + Vulkan -> Always uses `ImageReader`

See also: https://api.flutter.dev/javadoc/io/flutter/view/TextureRegistry.SurfaceProducer.html.
2024-02-27 01:39:23 +00:00
Tong Mu
c139338825 Revert "Reland 4: Multiview pipeline (#50931)" (flutter/engine#50985)
This reverts commit cb110ebc948c362cec5ac921cf8ef5e9ca530102.

Reason: Internal test failure blocking roll
OCL:610420483:BASE:610486571:1708978396098:f2c3c31

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-02-27 00:58:22 +00:00
Matan Lurey
71f9dec343 Refactor args parsing/environment constructor for scenario_app (flutter/engine#50980)
This moves the ever-growing amount of options and defaults into it's own
class(es).

The test runner itself has no tests (yet), but this shim will make
writing tests easier. I tried to make no other real changes to how the
runner functions in this PR.
2024-02-26 15:29:32 -08:00
Jonah Williams
9eca58ab36 [scenario] trigger firstFrameLatch on exception. (flutter/engine#50981)
If we hit this exception (which we seem to do a lot), then we weren't triggering the first frame latch.
2024-02-26 23:03:31 +00:00
Zachary Anderson
cae1c8dc3a Run engine unit tests on mac host_debug_unopt_arm64 (flutter/engine#50327)
Related https://github.com/flutter/flutter/issues/142868
2024-02-26 13:39:05 -08:00
Matan Lurey
dec92d85f2 Better filtering for Android scenario_app runner. (flutter/engine#50937)
_🍴 'd from https://github.com/flutter/engine/pull/50933, will rebase
when merged._

Closes https://github.com/flutter/flutter/issues/143458.

A picture is a 1000 words:

![Screenshot 2024-02-23 at 7 01
29 PM](https://github.com/flutter/engine/assets/168174/7254b3be-cc49-4bad-ae43-e61ac4a853ad)

This is still noisy, but at least all the output appears to be part of
the execution.

As you recall, the full logs are always available in the
FLUTTER_LOGS_DIR output.
2024-02-26 11:36:10 -08:00
Tong Mu
cb110ebc94 Reland 4: Multiview pipeline (flutter/engine#50931)
This relands https://github.com/flutter/engine/pull/49950.

Nothing is changed. The error turns out a flake (it passes once),
although this PR might have made the flake more flaky.

## 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 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
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[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
2024-02-23 20:52:53 -08:00