29204 Commits

Author SHA1 Message Date
Chris Bracken
3a116a3647 Improved description for ios_debug_sim_unopt_arm64 (flutter/engine#55498)
Make it explicit that it's an unopt engine for consistency with the
other unopt build descriptions.

Fixup to: https://github.com/flutter/engine/pull/55493
2024-09-28 11:42:08 -07:00
skia-flutter-autoroll
5f0829a87a Roll Fuchsia Linux SDK from hMFizUI--VpyjP3ht... to yX_hiCzoio2mYXAA8... (flutter/engine#55505)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine
Please CC bdero@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-09-28 03:02:22 +00:00
Harry Terkelsen
5c96bcbf1e Revert "Reland "[canvaskit] Further improve overlay optimization by splitting pictures"" (flutter/engine#55501)
Reverts flutter/engine#55464

The PR caused a large regression in a web benchmark.
2024-09-28 00:51:18 +00:00
Matan Lurey
2a0f911fef Migrate try/finally calls to addTearDown. (flutter/engine#55499)
I also removed other no-longer-enforced cruft. No behavioral changes.
2024-09-28 00:27:20 +00:00
Chris Bracken
faa6496380 iOS: Migrate FlutterAppDelegate to ARC (flutter/engine#55472)
Migrates the FlutterAppDelegate.mm translation unit to be compiled with the `-fobjc-arc` compiler flag.

No test changes since no this change includes no semantic changes, and thus covered by existing tests such as [`testReleasesWindowOnDealloc`](f6e580d09a/shell/platform/darwin/ios/framework/Source/FlutterAppDelegateTest.mm (L139-L153)).

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

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-09-27 22:44:53 +00:00
Jason Simmons
faa865b425 [Impeller] Apply some recent color filter fixes to BlendFilterContents::CreateForegroundAdvancedBlend (flutter/engine#55470)
Some recent changes affecting color filters (https://github.com/flutter/engine/pull/55411, https://github.com/flutter/engine/pull/55448) need to be done for both Porter-Duff and advanced blend modes
2024-09-27 21:42:49 +00:00
gaaclarke
9e2746c137 updated Color docstring to address equality (flutter/engine#55496)
issue: https://github.com/flutter/flutter/issues/155803

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-09-27 21:41:08 +00:00
Chris Bracken
1287ae153e Make arm64 iOS simulator local engine build unopt (flutter/engine#55493)
Most iOS embedder developers rely on two simulator builds:
* ios_debug_sim_unopt (for simulators on x64 hosts)
* ios_debug_sim_unopt_arm64 (for simulators on arm64 hosts)

We specify these two builds, for example, in our iOS unit test Xcode project `testing/ios/IosUnitTests/Tests/FlutterEngineConfig.xcconfig`.

Currently `local_engine.json` specifies two simulator builds:
* ios_debug_sim_unopt (for simulators on x64 hosts)
* ios_debug_sim_arm64 (for simulators on arm64 hosts)

While the x64 build specifies the `--unoptimized` flag, the arm64 build does not, which is problematic for those wanting to use both `et` and run the iOS unit tests.

This adds the `--unoptimized` flag for consistency with prevailing practice among iOS embedder developers.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-09-27 21:41:05 +00:00
Zuckjet
7fb25cdc23 [docs] Fix broken links in docs/ (flutter/engine#55350)
Fix broken links in docs/, specifically replaces ../ with https://github.com/flutter/flutter/blob/master/docs/

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-09-27 18:28:12 +00:00
skia-flutter-autoroll
e41b0f8c87 Roll Skia from e77818421e91 to 7efc11f2ea9e (6 revisions) (flutter/engine#55489)
https://skia.googlesource.com/skia.git/+log/e77818421e91..7efc11f2ea9e

2024-09-27 borenet@google.com [infra] Add jobs for Pixel9
2024-09-27 robertphillips@google.com [ganesh] Add GrGLCaps setting to control GL/ANGLE Protectedness handling
2024-09-27 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 64d149df26fd to 7bd80578336d (2 revisions)
2024-09-27 bungeman@google.com Suppress function UBSan on macOS
2024-09-27 drott@chromium.org [Fontations] Optimize generateMetrics() color glyph search
2024-09-27 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 966739ac8b4c to 0ec8a7f1b588 (8 revisions)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/skia-flutter-autoroll
Please CC bdero@google.com,brianosman@google.com,bungeman@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-09-27 17:31:57 +00:00
Jason Simmons
96d24ff033 Listen for uncaught exceptions during loading of a web test suite in Chrome (flutter/engine#55166)
Without this the test runner will hang if the compiled test is invalid and unable to execute.
2024-09-27 17:18:18 +00:00
auto-submit[bot]
fdbad460a5 Reverts "[Impeller] hash even less stuff per frame. (#55092)" (flutter/engine#55491)
Reverts: flutter/engine#55092
Initiated by: jonahwilliams
Reason for reverting: framework golden failures.
Original PR Author: jonahwilliams

Reviewed By: {chinmaygarde, jtmcdole}

This change reverts the following previous change:
Follow up to https://github.com/flutter/engine/pull/55060

Currently we have multiple stages of hashing while font rendering, which is relatively expensive for the actualy required workload. First, we hash the contents of all text frames to compute the unique set of glyphs per frame. Then we diff this hash set against the hashmap of glyphs within the atlas. Finally we hash and lookup the final rendered bounds for each glyph.

We can simplify this to 2. hash lookups for glyphs not yet in the atlas and 1. hash lookup for glyphs that are in the atlas. This is done by combing the step where we uniquely compute glyphs per frame with the diff against the current atlas. When this lookup is performed, we also store the glyph position (if found) in the text_frame itself - which allows text contents to skip the last hash, as long as the glyph has already been rendered.

### Before

![flutter_03](https://github.com/user-attachments/assets/be9c4459-f0c8-426c-b152-38861acb207f)

### After

![flutter_04](https://github.com/user-attachments/assets/1aa7cbd1-6af7-4020-8966-7e3baaef102b)

Using this handy dandy test app:

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {

  Widget build(context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Platform View'),
        ),
        body: SafeArea(child: Stack(children: [
          SizedBox(
            width: 380,
            height: 380,
            child: LinearProgressIndicator(),
          ),
          Stack(
            children: List<Widget>.generate(1000, (index) {
              // The problem already happens with a small amount of widgets.
              // Using an excessive amount of widgets is just to make the problem more evident.
              return Text("Lots of Texts represent a Widget with complex components.");
            }),
          ),

          Align(
            alignment: Alignment.bottomCenter,
            child:
            TextButton(
              child: Text("Button"),
              onPressed: () {
                print("Tap ${DateTime.now()}");
              },
            ),
          ),
        ],
        ),
        ),
      ),
    );
  }
}
```
2024-09-27 17:09:28 +00:00
Mouad Debbar
f6e580d09a [web] Update builder json generator to reflect recent changes (flutter/engine#55307)
Recent [changes](https://github.com/flutter/engine/pull/54584) affected our builder configs, but the script that generates those builder configs wasn't updated.
2024-09-27 16:05:17 +00:00
Jonah Williams
e9a089f2fe [Impeller] hash even less stuff per frame. (flutter/engine#55092)
Follow up to https://github.com/flutter/engine/pull/55060

Currently we have multiple stages of hashing while font rendering, which is relatively expensive for the actualy required workload. First, we hash the contents of all text frames to compute the unique set of glyphs per frame. Then we diff this hash set against the hashmap of glyphs within the atlas. Finally we hash and lookup the final rendered bounds for each glyph.

We can simplify this to 2. hash lookups for glyphs not yet in the atlas and 1. hash lookup for glyphs that are in the atlas. This is done by combing the step where we uniquely compute glyphs per frame with the diff against the current atlas. When this lookup is performed, we also store the glyph position (if found) in the text_frame itself - which allows text contents to skip the last hash, as long as the glyph has already been rendered.

### Before

![flutter_03](https://github.com/user-attachments/assets/be9c4459-f0c8-426c-b152-38861acb207f)

### After

![flutter_04](https://github.com/user-attachments/assets/1aa7cbd1-6af7-4020-8966-7e3baaef102b)

Using this handy dandy test app:

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {

  Widget build(context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Platform View'),
        ),
        body: SafeArea(child: Stack(children: [
          SizedBox(
            width: 380,
            height: 380,
            child: LinearProgressIndicator(),
          ),
          Stack(
            children: List<Widget>.generate(1000, (index) {
              // The problem already happens with a small amount of widgets.
              // Using an excessive amount of widgets is just to make the problem more evident.
              return Text("Lots of Texts represent a Widget with complex components.");
            }),
          ),

          Align(
            alignment: Alignment.bottomCenter,
            child:
            TextButton(
              child: Text("Button"),
              onPressed: () {
                print("Tap ${DateTime.now()}");
              },
            ),
          ),
        ],
        ),
        ),
      ),
    );
  }
}
```
2024-09-27 15:34:07 +00:00
skia-flutter-autoroll
e7514c6a22 Roll Skia from 9ebb7c3640a1 to e77818421e91 (4 revisions) (flutter/engine#55479)
https://skia.googlesource.com/skia.git/+log/9ebb7c3640a1..e77818421e91

2024-09-27 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from c13e7159cdd1 to 3ba9cd40c151 (4 revisions)
2024-09-27 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from 3eee2be83d3f to cef41cc71c85 (6 revisions)
2024-09-27 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 8d76160610aa to 64d149df26fd (12 revisions)
2024-09-26 bungeman@google.com Allow multiple equivalent "clang version"s

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/skia-flutter-autoroll
Please CC bdero@google.com,brianosman@google.com,bungeman@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-09-27 06:56:22 +00:00
Jonah Williams
741bf6c4df [ci] make opengles impeller scenario app non-bringup (flutter/engine#55474)
This is passing consistently now.
2024-09-27 03:24:34 +00:00
Jonah Williams
2062c05950 [Impeller] dont use blend shader for simple drawAtlas calls. (flutter/engine#55420)
When making a drawAtlas call with no colors, use the faster shader that does not apply blending.

Now that we're switched to experimental canvas, we can remove the copying of the display list data. The draw can directly refer to pointers from the display list structure, as the draw is processed during DL dispatching.
2024-09-27 01:27:18 +00:00
Valentin Hăloiu
18b9cd0233 Add format field to EGL surface backing store (flutter/engine#54499)
Trying to use the `GL_BGRA8_EXT` format for the EGL surface backing store on *desktop* OpenGL platforms would fail at: 82d8bc5844/shell/platform/embedder/embedder.cc (L869)

This seems to be a known issue and both the Linux and Windows embedders have some logic to pick a different format depending on the OpenGL context information:

bc8c82d157/shell/platform/windows/compositor_opengl.cc (L23-L34)

bc8c82d157/shell/platform/linux/fl_framebuffer.cc (L81-L104)

This pull-request gets rid of the hard-coded `GL_BGRA8_EXT` format and makes it configurable by adding a `format` field to the `FlutterOpenGLSurface` struct.

_Disclaimer_: This has only been tested on desktop Linux (Wayland) using the `GR_GL_RGBA8` format which seemed to work as expected.

This change is related to the recently introduced EGL surface backing store: https://github.com/flutter/flutter/issues/58363

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-09-27 00:23:13 +00:00
Jonah Williams
2b580e43db [Impeller] avoid reading font while parsing sktextblob. (flutter/engine#55442)
Use a faster approximation for finding out axis alignment that skips opening the font file, which is slow!

![image](https://github.com/user-attachments/assets/ae840597-b63b-4e46-b857-ac5f09e09ca8)
2024-09-26 23:21:17 +00:00
Harry Terkelsen
1e086b6311 Reland "[canvaskit] Further improve overlay optimization by splitting pictures" (flutter/engine#55464)
This enhances the overlay optimization by delaying combining pictures to get tighter bounds for the pictures that make up the scene, enabling more sophisticated optimization since we can determine if they intersect with platform views on a per-picture basis.

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

On a Macbook in Chrome in an example app with an infinite scrolling grid of platform views, this brings the ratio of dropped frames from 93% to 55% (roughly 4 fps to 30 fps).

This is a reland of https://github.com/flutter/engine/pull/54878 with a fix for scenes with pictures and shader masks that are eventually entirely clipped out.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-09-26 21:25:59 +00:00
Jonah Williams
b9d92a4d0c [Impeller] remove entity pass and re-combine canvas implementations. (flutter/engine#55019)
Shouldn't land until experimental canvas bakes a while

Major milestone along the route to making display list the impeller API. Removes the secondary compositor in entity pass. After this point, we can begin ripping out the DL->Aiks conversions and making entities more efficient.

Fixes https://github.com/flutter/flutter/issues/132417
Fixes https://github.com/flutter/flutter/issues/126386
Fixes https://github.com/flutter/flutter/issues/155114

Part of https://github.com/flutter/flutter/issues/142054
2024-09-26 21:20:23 +00:00
Matan Lurey
e778886f44 Remove and inline dependencies on build_root for a constant. (flutter/engine#55441)
Removes imports unused after https://github.com/flutter/engine/pull/55404, inlines a constant unused elsewhere.
2024-09-26 18:32:16 +00:00
auto-submit[bot]
248b86a64b Reverts "Reverts "Add SurfaceProducer#onSurfaceAvailable, deprecate onSurfaceCreated. (#55418)" (#55450)" (flutter/engine#55463)
Reverts: flutter/engine#55450
Initiated by: matanlurey
Reason for reverting: Fixed forward in https://github.com/flutter/packages/pull/7712.
Original PR Author: auto-submit[bot]

Reviewed By: {fluttergithubbot}

This change reverts the following previous change:
Reverts: flutter/engine#55418
Initiated by: bdero
Reason for reverting: [Engine->Framework roll breakage](https://github.com/flutter/flutter/issues/155727#issuecomment-2375489803)
Original PR Author: matanlurey

Reviewed By: {jonahwilliams}

This change reverts the following previous change:
Closes https://github.com/flutter/flutter/issues/155131.

Not only did I rename the method, but I also changed the contract slightly - now `onSurfaceAvailable` is _only_ invoked _after_ `onSurfaceDestroyed` has been called. The cost is a single `boolean`, and it honestly makes the API make a lot more sense than someone having to track this themselves.

/cc @johnmccutchan (OOO), and @flutter/android-reviewers.
2024-09-26 17:34:17 +00:00
Chris Bracken
d03ba742e2 cipd: add mobileprovision CIPD package (flutter/engine#55449)
Adds instructions for creating updated CIPD packages containing a new provisioning profile that goes with an updated signing certificate, for use on Chromium CI bots.

These are part of a broader set of steps required to renew our development signing certificate annually, as described in [cl/678826297](http://cl/678826297) (Google-internal).

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

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-09-26 17:21:06 +00:00
gaaclarke
015281d470 fixes color filter + advanced blends (flutter/engine#55448)
fixes https://github.com/flutter/flutter/issues/155691

I'm also renaming the test I just introduced, it was named wrong, talking about "image filter", not "color filter".

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-09-26 16:20:06 +00:00
skia-flutter-autoroll
81d35bf59e Roll Skia from 5c9f28d05afe to b2c5f640cb44 (1 revision) (flutter/engine#55461)
https://skia.googlesource.com/skia.git/+log/5c9f28d05afe..b2c5f640cb44

2024-09-26 kjlubick@google.com [canvaskit] Add OffscreenCanvas to some type definitions

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/skia-flutter-autoroll
Please CC bdero@google.com,brianosman@google.com,bungeman@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-09-26 15:10:21 +00:00
skia-flutter-autoroll
c39e836e21 Roll Fuchsia Linux SDK from T0BbBnkQd0GfMnGQc... to hMFizUI--VpyjP3ht... (flutter/engine#55458)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine
Please CC bdero@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-09-26 09:16:06 +00:00
skia-flutter-autoroll
eae2fd256b Roll Skia from e5ce4ecbcf7b to d804bdf62b5e (1 revision) (flutter/engine#55455)
https://skia.googlesource.com/skia.git/+log/e5ce4ecbcf7b..d804bdf62b5e

2024-09-26 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 67cb227058fa to c13e7159cdd1 (7 revisions)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/skia-flutter-autoroll
Please CC bdero@google.com,brianosman@google.com,bungeman@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-09-26 06:37:17 +00:00
auto-submit[bot]
2d9833b103 Reverts "Reland "[canvaskit] Further improve overlay optimization by splitting pictures" (#55402)" (flutter/engine#55456)
Reverts: flutter/engine#55402
Initiated by: chingjun
Reason for reverting: caused internal tests to fail.

See b/369740500 for more details.
Original PR Author: harryterkelsen

Reviewed By: {yjbanov}

This change reverts the following previous change:
This enhances the overlay optimization by delaying combining pictures to get tighter bounds for the pictures that make up the scene, enabling more sophisticated optimization since we can determine if they intersect with platform views on a per-picture basis.

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

On a Macbook in Chrome in an example app with an infinite scrolling grid of platform views, this brings the ratio of dropped frames from 93% to 55% (roughly 4 fps to 30 fps).

This is a reland of https://github.com/flutter/engine/pull/54878 with a fix for scenes with pictures that are eventually entirely clipped out.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-09-26 06:19:47 +00:00
Jonah Williams
33f2dcb7eb [iOS] remove clear color hack. (flutter/engine#54451)
Fixes https://github.com/flutter/flutter/issues/125640

This doesn't actually do anything, instead it forces opaque to false. If developers want opaque to be false, they can just set it directly.
2024-09-26 04:54:11 +00:00
auto-submit[bot]
b358fd4a83 Reverts "Roll Dart SDK from c2728b947e46 to 016368ee313d (1 revision) (#55444)" (flutter/engine#55454)
Reverts: flutter/engine#55444
Initiated by: bdero
Reason for reverting: [Roll breakage](https://github.com/flutter/flutter/issues/155727#issuecomment-2375558918)
Original PR Author: skia-flutter-autoroll

Reviewed By: {fluttergithubbot}

This change reverts the following previous change:

https://dart.googlesource.com/sdk.git/+log/c2728b947e46..016368ee313d

2024-09-25 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.6.0-280.0.dev

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-sdk-flutter-engine
Please CC bdero@google.com,dart-vm-team@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-09-26 01:44:25 +00:00
auto-submit[bot]
80ce9f8631 Reverts "Add SurfaceProducer#onSurfaceAvailable, deprecate onSurfaceCreated. (#55418)" (flutter/engine#55450)
Reverts: flutter/engine#55418
Initiated by: bdero
Reason for reverting: [Engine->Framework roll breakage](https://github.com/flutter/flutter/issues/155727#issuecomment-2375489803)
Original PR Author: matanlurey

Reviewed By: {jonahwilliams}

This change reverts the following previous change:
Closes https://github.com/flutter/flutter/issues/155131.

Not only did I rename the method, but I also changed the contract slightly - now `onSurfaceAvailable` is _only_ invoked _after_ `onSurfaceDestroyed` has been called. The cost is a single `boolean`, and it honestly makes the API make a lot more sense than someone having to track this themselves.

/cc @johnmccutchan (OOO), and @flutter/android-reviewers.
2024-09-26 00:45:46 +00:00
Harry Terkelsen
d91038befd Reland "[canvaskit] Further improve overlay optimization by splitting pictures" (flutter/engine#55402)
This enhances the overlay optimization by delaying combining pictures to get tighter bounds for the pictures that make up the scene, enabling more sophisticated optimization since we can determine if they intersect with platform views on a per-picture basis.

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

On a Macbook in Chrome in an example app with an infinite scrolling grid of platform views, this brings the ratio of dropped frames from 93% to 55% (roughly 4 fps to 30 fps).

This is a reland of https://github.com/flutter/engine/pull/54878 with a fix for scenes with pictures that are eventually entirely clipped out.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-09-25 23:47:18 +00:00
Matan Lurey
e89480f02d Move lint suppression from baseline.xml to @SuppressLint. (flutter/engine#55447)
I think you just had the lint identifier wrong?

Closes https://github.com/flutter/flutter/issues/155712.
2024-09-25 22:41:11 +00:00
Jonah Williams
152dfb2fcf [engine] set platform thread name to ui. (flutter/engine#55362)
When running with merged platform and ui threads, set the dart thread name of the main thread to io.futter.ui. Also change the thread mask settings to avoid creating an unused UI thread.
2024-09-25 22:06:37 +00:00
skia-flutter-autoroll
ca6c569006 Roll Dart SDK from c2728b947e46 to 016368ee313d (1 revision) (flutter/engine#55444)
https://dart.googlesource.com/sdk.git/+log/c2728b947e46..016368ee313d

2024-09-25 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.6.0-280.0.dev

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-sdk-flutter-engine
Please CC bdero@google.com,dart-vm-team@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-09-25 22:03:49 +00:00
Jonah Williams
5ad70b2bfc [Impeller] actually fix external texture for GLES. (flutter/engine#55414)
Goldens are working! and incorrect! use the other texture contents to hopefully fix them. Ratther the the transform, we actually expect to use the src and dst rect to position/transform the texture. Tiled Texture contents does not support a src rect, so switch it to the regular texture contents.
2024-09-25 21:31:18 +00:00
skia-flutter-autoroll
77c9aa4e59 Roll Skia from e623a37de332 to 9f3b32b7b772 (2 revisions) (flutter/engine#55443)
https://skia.googlesource.com/skia.git/+log/e623a37de332..9f3b32b7b772

2024-09-25 bungeman@google.com Remove some debugf from SkFontMgr_AndroidNDK
2024-09-25 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll Dawn from 876bb88cb063 to efd781b42ae5 (8 revisions)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/skia-flutter-autoroll
Please CC bdero@google.com,brianosman@google.com,bungeman@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-09-25 21:22:34 +00:00
jesswrd
21ddf3e6e3 Remove usages of WindowManager's getDefaultDisplay (flutter/engine#55002)
Removed deprecated usages of WindowManager's `getDefaultDisplay()` and
replaced them with DisplayManager's `getDisplay()`.

Note: Decided to keep a usage of `getDefaultDisplay()`, which can be
found in FlutterView.java because it is expected to be deleted as a part
of V1 embedding removal. No changes were made to that file.

path to FlutterView.java:
shell/platform/android/io/flutter/embedding/android/FlutterView.java

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

## 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-09-25 17:04:00 -04:00
gaaclarke
ad894bd2f0 Fixes blend + color filter (flutter/engine#55411)
fixes https://github.com/flutter/flutter/issues/155456

Thanks @jason-simmons for identifying the fix.

## 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-09-25 12:57:45 -07:00
Matan Lurey
f425edfbf7 Add a boolean that exposes rotation/crop metadata capability. (flutter/engine#55434)
Closes https://github.com/flutter/flutter/issues/144407.
Closes https://github.com/flutter/flutter/issues/155633.
2024-09-25 19:27:08 +00:00
Jonah Williams
1878326071 [scenario_app] delete get bitmap activity. (flutter/engine#55436)
Since we can't see the screenshot we can't really evaluate if this is failing for good/bad reasons. This also uses
 the whoe convertToImageREader / readback debugging API that I want to delete.
2024-09-25 19:14:29 +00:00
Brandon DeRosier
31ac0fc004 [Flutter GPU] Use vm.Vector4 for clear color instead of ui.Color. (flutter/engine#55416)
Resolves https://github.com/flutter/flutter/issues/155627.

Allow setting the clear directly as floats without conversion work. vector_math already has convenient `Colors.[color]` factories and such. Also, `ui.Color` has a color space now, which does not apply here.

Adds a simple golden to verify that clear colors work:
![flutter_gpu_test_clear_color](https://github.com/user-attachments/assets/ba7a4e74-aaf2-48d8-ac13-115a86daeb19)
2024-09-25 18:02:05 +00:00
skia-flutter-autoroll
5cb6d700bd Roll Dart SDK from dd73afd20be5 to c2728b947e46 (1 revision) (flutter/engine#55437)
https://dart.googlesource.com/sdk.git/+log/dd73afd20be5..c2728b947e46

2024-09-25 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.6.0-279.0.dev

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-sdk-flutter-engine
Please CC bdero@google.com,dart-vm-team@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-09-25 17:34:17 +00:00
gaaclarke
1076f5fd42 adds more tasks to the engine workspace (flutter/engine#55435)
- host_debug_unopt_arm64
- android_debug_unopt_arm64
- ios_debug_unopt_arm64 (missed in previous change)

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-09-25 17:18:57 +00:00
skia-flutter-autoroll
b34d91bc2e Roll Skia from 79e652aad7a9 to 9af762100cf1 (2 revisions) (flutter/engine#55433)
https://skia.googlesource.com/skia.git/+log/79e652aad7a9..9af762100cf1

2024-09-25 nicolettep@google.com [graphite] Modify key methods and comment docs to be able to accept a SamplerDesc container ptr
2024-09-25 fmalita@chromium.org [bazel] Use filegroup for common_flags_config

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/skia-flutter-autoroll
Please CC bdero@google.com,brianosman@google.com,bungeman@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-09-25 16:33:49 +00:00
Matan Lurey
2291e92e59 Add SurfaceProducer#onSurfaceAvailable, deprecate onSurfaceCreated. (flutter/engine#55418)
Closes https://github.com/flutter/flutter/issues/155131.

Not only did I rename the method, but I also changed the contract slightly - now `onSurfaceAvailable` is _only_ invoked _after_ `onSurfaceDestroyed` has been called. The cost is a single `boolean`, and it honestly makes the API make a lot more sense than someone having to track this themselves.

/cc @johnmccutchan (OOO), and @flutter/android-reviewers.
2024-09-25 16:24:06 +00:00
skia-flutter-autoroll
7a730682bd Roll Skia from 788233232d6a to 79e652aad7a9 (1 revision) (flutter/engine#55432)
https://skia.googlesource.com/skia.git/+log/788233232d6a..79e652aad7a9

2024-09-25 nicolettep@google.com [graphite] Centralize SamplerDesc length variables used by Dawn, Vulkan

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/skia-flutter-autoroll
Please CC bdero@google.com,brianosman@google.com,bungeman@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-09-25 15:05:11 +00:00
Camille Simon
9be07d79a8 Update setSystemChromeEnabledSystemUIMode docs to note targeting Android 15+ change (flutter/engine#54560)
Updates `setSystemChromeEnabledSystemUIMode` documentation to reflect that edge-to-edge mode is used by default if the Flutter app targets Android 15.

Part of https://github.com/flutter/flutter/issues/150367 and engine counterpart to https://github.com/flutter/flutter/pull/153466.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-09-25 11:30:21 +00:00
skia-flutter-autoroll
061f79a89a Roll Dart SDK from 006fdb58cba4 to dd73afd20be5 (1 revision) (flutter/engine#55430)
https://dart.googlesource.com/sdk.git/+log/006fdb58cba4..dd73afd20be5

2024-09-25 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.6.0-278.0.dev

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-sdk-flutter-engine
Please CC bdero@google.com,dart-vm-team@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-09-25 10:34:31 +00:00