25624 Commits

Author SHA1 Message Date
skia-flutter-autoroll
9d16c7df3f Roll Fuchsia Linux SDK from GBTh3gOOgmndwT70X... to 5aijurFz23iIuRaMQ... (flutter/engine#50126)
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 jacksongardner@google.com,rmistry@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-01-28 05:15:28 +00:00
Brandon DeRosier
0a056a5f63 [Impeller] Fix alpha management issues for advanced blends. (flutter/engine#50070)
Resolves https://github.com/flutter/flutter/issues/140970.

The issue is easy to miss in the goldens if you don't know what to look for, but it was always present in one way or another. In the "before" image below, we end up removing some of the backdrop alpha as a result of the blend, which should never happen with an advanced blend:

<img width="171" alt="image" src="https://github.com/flutter/engine/assets/919017/b0ac7c00-fba7-4c86-82c9-94b99ea400e3">

This was happening because we were lerping towards the original source alpha from the destination alpha. So in the sad smiley case, the RGB getting written to the framebuffer was exactly correct, but the alpha would end up being less than 1, which the window manager then blends against the black-initialized framebuffer.

Blending with the black background just so happened to perfectly match the appearance of the color being double-premultiplied, which is why increasing the source color's vibrancy by unpremultiplying also looks correct. But again, that only works iff the pass texture winds up being drawn to a black background, which is a rare case for offscreen passes.

Skia (Flutter documentation):
![image](https://github.com/flutter/engine/assets/919017/aeb2a7cf-50a4-460d-9247-054a86833018)

Impeller before:
<img width="398" alt="image" src="https://github.com/flutter/engine/assets/919017/fda958c5-1bd6-4272-a2b4-f8e25c42cb2f">

Impeller after:
<img width="398" alt="image" src="https://github.com/flutter/engine/assets/919017/a4ca51f8-c287-4e27-9979-44b1c91302b2">
2024-01-28 03:59:21 +00:00
Loïc Sharma
7918e2046c Revert "[Windows] Introduce egl::Surface and egl::WindowSurface" (flutter/engine#50104)
Reverts flutter/engine#49983
2024-01-27 19:15:04 +00:00
skia-flutter-autoroll
26eed181ac Roll Dart SDK from d0b48a008559 to 422d048880a8 (1 revision) (flutter/engine#50121)
https://dart.googlesource.com/sdk.git/+log/d0b48a008559..422d048880a8

2024-01-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.4.0-83.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 dart-vm-team@google.com,jacksongardner@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-01-27 13:47:26 +00:00
skia-flutter-autoroll
b2474c1319 Manual roll Dart SDK from 7ae508ee09a3 to 141ab6c14cd1 (1 revision) (flutter/engine#50115)
Manual roll requested by aam@google.com

https://dart.googlesource.com/sdk.git/+log/7ae508ee09a3..141ab6c14cd1

2024-01-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.4.0-81.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 aam@google.com,dart-vm-team@google.com,jacksongardner@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-01-27 06:07:08 +00:00
Jim Graham
0b9de40ced Cache Impeller paths in the DisplayList to amortize conversion (flutter/engine#50076)
DisplayList by default contains Skia paths stored as `SkPath` objects. Impeller must convert these to its internal `impeller::Path` format on every dispatch of the DisplayList on every frame.

This change allows Impeller to store a cached copy of its version of the path into the DisplayList and reuse that instance if it ever encounters the same DisplayList again (likely to happen as most paths come from the Framework which does a lot of work to re-use ui.Picture objects - i.e. DisplayLists).

In order to facilitate this change, `impeller::Path` was modified to have fast-copy-constructors that share the data and the PathBuilder will copy the mutable data into an immutable version in `TakePath()`.
2024-01-27 05:06:18 +00:00
auto-submit[bot]
75c60cf9f1 Reverts "[Android] Cache GPU resources using HardwareBuffer's id as key" (flutter/engine#50114)
Reverts flutter/engine#50028
Initiated by: jonahwilliams
This change reverts the following previous change:
Original Description:
Once a hardware buffer has been imported (a VkImage created for it), we don't ever need to re-create a VkImage, even when the contents change. The same hardware buffer can be identified by ID. Part of https://github.com/flutter/flutter/issues/142153

Otherwise we spend a lot of time re-creating VkImages:

![image](https://github.com/flutter/flutter/assets/8975114/700bc0e2-ab00-417e-89c5-04abe7e1db96)

Draft is here, but is currently leaky: https://github.com/flutter/engine/pull/50028
We only need something like a LRU with the max image size (seems to be 3 for me).  This does log locally that I'm not calling close correctly:

```
E/flutter ( 5580): [ERROR:flutter/shell/platform/android/image_external_texture_vk.cc(51)] Size: 3
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
```

FYI @johnmccutchan
2024-01-27 04:52:25 +00:00
skia-flutter-autoroll
1eaa303edb Roll Dart SDK from 58665e3dee42 to 7ae508ee09a3 (1 revision) (flutter/engine#50112)
https://dart.googlesource.com/sdk.git/+log/58665e3dee42..7ae508ee09a3

2024-01-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.4.0-80.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 dart-vm-team@google.com,jacksongardner@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-01-27 04:08:18 +00:00
skia-flutter-autoroll
0eb19b1849 Roll Fuchsia Linux SDK from WHlwlOwznFknNm5IS... to GBTh3gOOgmndwT70X... (flutter/engine#50111)
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 jacksongardner@google.com,rmistry@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-01-27 03:40:22 +00:00
skia-flutter-autoroll
de6e20bcee Roll Skia from 6279c88b9e29 to b9b80230c87b (4 revisions) (flutter/engine#50110)
https://skia.googlesource.com/skia.git/+log/6279c88b9e29..b9b80230c87b

2024-01-27 mkember@google.com [Fuchsia] Remove old FIDL tables.c file from build
2024-01-26 skia-autoroll@skia-public.iam.gserviceaccount.com Roll skottie-base from f4b64e5c220e to 5b5661dc98c7
2024-01-26 nscobie@google.com Reland "[Vulkan] Add optional callback invoked on VK_ERROR_DEVICE_LOST"
2024-01-26 brianosman@google.com Remove the supersampling AA scan-converter entirely

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 brianosman@google.com,jacksongardner@google.com,lovisolo@google.com,rmistry@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-01-27 02:26:20 +00:00
Jonah Williams
dd99936e4f [Impeller] add missing barrier to compute tessellator. (flutter/engine#50108)
Fixes the flake on ToT


https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8757792078669575121/+/u/test:_Host_Tests_for_host_debug_unopt/stdout
2024-01-26 18:20:04 -08:00
Jonah Williams
73cf0269b1 [Android] Cache GPU resources using HardwareBuffer's id as key (flutter/engine#50028)
Once a hardware buffer has been imported (a VkImage created for it), we don't ever need to re-create a VkImage, even when the contents change. The same hardware buffer can be identified by ID. Part of https://github.com/flutter/flutter/issues/142153

Otherwise we spend a lot of time re-creating VkImages:

![image](https://github.com/flutter/flutter/assets/8975114/700bc0e2-ab00-417e-89c5-04abe7e1db96)

Draft is here, but is currently leaky: https://github.com/flutter/engine/pull/50028
We only need something like a LRU with the max image size (seems to be 3 for me).  This does log locally that I'm not calling close correctly:

```
E/flutter ( 5580): [ERROR:flutter/shell/platform/android/image_external_texture_vk.cc(51)] Size: 3
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
W/System  ( 5580): A resource failed to call HardwareBuffer.close. 
```

FYI @johnmccutchan
2024-01-27 01:50:17 +00:00
keyonghan
938e770333 Move Mac builder_cache to prod (flutter/engine#50044)
Last step of https://github.com/flutter/flutter/issues/141688
2024-01-27 01:26:17 +00:00
Matan Lurey
a50711f4f4 Enable header_guard_check (and --fix) in ci/format (flutter/engine#50102)
Closes https://github.com/flutter/flutter/issues/133415.

This includes a performance optimization for the runner itself, where
`--include=...`s are used as a base to check, versus checking _every_
file and seeing if it exists in a list. This works better with what is
expected in `ci/bin/format.dart` without any contract change.

Also added a few more functional tests of the system.
2024-01-26 16:32:14 -08:00
Dan Field
7d955bfd7c Followups to screenshot patch (flutter/engine#50096)
@gaaclarke
2024-01-26 23:43:05 +00:00
Matan Lurey
ffbe9d4939 Delete ci/docker, assuming it is not used. (flutter/engine#50103)
I tried grepping for `docker` and couldn't find anything relevant:

![Screenshot 2024-01-26 at 2 52 59 PM](https://github.com/flutter/engine/assets/168174/be75b61f-3c27-4475-8481-e096dff4197a)

(Maybe this is "secretly" used by another repo, but there is no way for me to tell that)
2024-01-26 23:36:04 +00:00
Alexander Aprelev
a280f771c4 Roll dart to 3.4.0-79.0.dev (flutter/engine#50100)
Changes since last roll
```
58665e3dee4 Version 3.4.0-79.0.dev
6b0b4d425b0 Macro. Keep FileState for macro file, refresh if its content changes.
f4c3572c18a [deps] Rev `native` packages.
f4dae883559 [co19] Roll co19 to af2ac968c0ca28b7dd94325b00a3acf569f6e858
e2aac0b8e86 [web docs] add package:web to the main sdk docs - api.dart.dev
3d4a39e9c24 Revert "Revert two CLs that remove WithoutNullSafetyMixin usages."
20a27fee111 Fix for data driven rename when class is used in as expression
ecb5fc2228a [dart2wasm] Improve dispatch table packing from 49% to 99%
cdad90dfb81 [frontend_server] frontend_server_flutter_suite
```
Requires manual roll due to ffi package move as part of `f4c3572c18a`.
2024-01-26 22:45:47 +00:00
skia-flutter-autoroll
2d4b99c197 Roll Skia from c32aa37effcc to 6279c88b9e29 (1 revision) (flutter/engine#50098)
https://skia.googlesource.com/skia.git/+log/c32aa37effcc..6279c88b9e29

2024-01-26 johnstiles@google.com Implement Transform::FindAndDeclareBuiltinStructs.

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 brianosman@google.com,jacksongardner@google.com,lovisolo@google.com,rmistry@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-01-26 21:56:23 +00:00
Jonah Williams
11484e2da1 [Impeller] add compute pass API for memory barriers, re-enable for Vulkan. (flutter/engine#49946)
Adds two new APIs that insert memory barriers for compute -> compute dependencies.

```c++
  // |ComputePass|
  void AddBufferMemoryBarrier() override;

  // |ComputePass|
  void AddTextureMemoryBarrier() override;
```

Also makes the ComputePassVK automatically insert a compute -> vertex dependency when encoding.  This change is sufficient to let the GPU compute implementation of draw points work on Pixel and Samsung Android devices.

For more explaination on these specific barriers, see the documentation added in this PR.

Fixes https://github.com/flutter/engine/pull/49946
2024-01-26 21:20:54 +00:00
Matan Lurey
74d78673d9 Introduce a prototype of a "header guard enforcement" tool (flutter/engine#48903)
Closes https://github.com/flutter/flutter/issues/133415.

---

This is a prototype I threw together in about 1-2 hours. It enforces and
automatically fixes header guards that don't match the [the Google C++
style
guide](https://google.github.io/styleguide/cppguide.html#The__define_Guard).
For example, here is (trimmed) output at HEAD:

```txt
line 5, column 1 of impeller/aiks/picture.h: Unexpected #pragma once
  ╷
5 │ #pragma once
  │ ^^^^^^^^^^^^
  ╵
line 5, column 1 of flow/stopwatch.h: Expected #ifndef FLUTTER_FLOW_STOPWATCH_H_
  ╷
5 │ #ifndef FLUTTER_FLOW_INSTRUMENTATION_H_
  │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
The following 731 files have invalid header guards:
```
2024-01-26 13:15:56 -08:00
David Iglesias
d9ef3e2551 [web] Do not wipe the PlatformViewManager when disposing of a view. (flutter/engine#49991)
When a view gets disposed of, its rasterizer completely clears up the singleton `PlatformViewManager`. Particularly, it removes all registered platform view factories.

This is wrong because the remaining PlatformViews on the page cannot be re-rendered, and the default Platform View factories (used by `pointer_interceptor`, for example), disappear.

This PR attempts to preserve the `dispose` logic of the canvaskit rasterizer, without using the `debugClear` method of the `PlatformViewManager` (which is supposedly test-only).

## Issues

* Fixes https://github.com/flutter/flutter/issues/142094

## Tests

* Added unit-test
* Deployed demo app: https://dit-maps-tests.web.app

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-01-26 20:23:26 +00:00
Matan Lurey
e9e5a237f8 Finish landing missing/incorrect header guards across flutter/engine (flutter/engine#50069)
Generated by https://github.com/flutter/engine/pull/48903 (`dart ./tools/header_guard_check/bin/main.dart --fix`).

As discussed with @cbracken and @jmagman, the guards are not technically needed on the Mac/iOS code, but they (a) do not hurt and (b) still provide value if for some reason `#include` is used instead of `#import` (though I suspect we could try to add that to the tool in the future as well).
2024-01-26 19:42:36 +00:00
skia-flutter-autoroll
c2c550c395 Roll Skia from 32f6bff0f193 to e24124912cc3 (2 revisions) (flutter/engine#50093)
https://skia.googlesource.com/skia.git/+log/32f6bff0f193..e24124912cc3

2024-01-26 jvanverth@google.com Add Arcs to MotionMark slide
2024-01-26 johnstiles@google.com Add unit test demonstrating structs in a module.

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 brianosman@google.com,jacksongardner@google.com,lovisolo@google.com,rmistry@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-01-26 19:39:22 +00:00
skia-flutter-autoroll
4f951b2760 Roll Skia from cbdf09d69efc to 32f6bff0f193 (3 revisions) (flutter/engine#50092)
https://skia.googlesource.com/skia.git/+log/cbdf09d69efc..32f6bff0f193

2024-01-26 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from dcea6056ebed to 2bc97ca55761
2024-01-26 jvanverth@google.com Add MotionMark slide to Viewer.
2024-01-26 michaelludwig@google.com [graphite] Classify orthographic and perspective separately

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 brianosman@google.com,jacksongardner@google.com,lovisolo@google.com,rmistry@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-01-26 18:54:14 +00:00
Dan Field
ce731f3716 Fix Shell::Screenshot for Impeller (flutter/engine#50072)
Fixes https://github.com/flutter/flutter/issues/141571

Shell::Screenshot was impelemnted in a Skia-only way and would crash when invoked. Adds test coverage for the breaking path on iOS that ends up calling `FlutterView drawLayer`.
2024-01-26 17:17:32 +00:00
skia-flutter-autoroll
deefc137b5 Roll Skia from ae73baacb793 to cbdf09d69efc (1 revision) (flutter/engine#50085)
https://skia.googlesource.com/skia.git/+log/ae73baacb793..cbdf09d69efc

2024-01-26 brianosman@google.com Remove AAA/SAA flags from tools

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 brianosman@google.com,jacksongardner@google.com,lovisolo@google.com,rmistry@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-01-26 17:01:45 +00:00
skia-flutter-autoroll
b74aad622b Roll Skia from cc5124317c18 to ea260ac426c3 (10 revisions) (flutter/engine#50083)
https://skia.googlesource.com/skia.git/+log/cc5124317c18..ea260ac426c3

2024-01-26 robertphillips@google.com Revert "[Vulkan] Add optional callback invoked on VK_ERROR_DEVICE_LOST"
2024-01-26 brianosman@google.com Force AAA on all Skia GN builds
2024-01-26 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from c7ed7da64071 to d0f5a662084b (5 revisions)
2024-01-26 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from e822313f0e9f to 4625676a9344 (2 revisions)
2024-01-26 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from b6eb3ddf32bb to 3f152effd05b (4 revisions)
2024-01-26 johnstiles@google.com Properly track `isBuiltin` on struct and array types.
2024-01-25 johnstiles@google.com Pass Context to SymbolTable::clone() and addArrayDimension().
2024-01-25 nscobie@google.com [Vulkan] Add optional callback invoked on VK_ERROR_DEVICE_LOST
2024-01-25 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll Dawn from be3d39c26501 to e822313f0e9f (8 revisions)
2024-01-25 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll vulkan-deps from 43b6e2049a16 to b6eb3ddf32bb (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 brianosman@google.com,jacksongardner@google.com,lovisolo@google.com,rmistry@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-01-26 15:17:25 +00:00
David Iglesias
9cc9f396b5 [web] Add views proxy and getInitialData. (flutter/engine#49320)
Adds a Dart API so Application/Plugin programmers can retrieve the `initialData` configuration value that may be passed when adding a view from JS in a multiViewEnabled app.

When adding a view to an app like this:

```js
flutterApp.addView({
  hostElement: someElement,
  initialData: {
    randomUUID: globalThis.crypto.randomUUID(),
  }
});
```

`initialData` can be accessed from Dart by defining a JS-interop class like:

```dart
import 'dart:js_interop';

// The JS-interop definition of the `initialData` object passed to the views of this app.
@JS()
@staticInterop
class InitialData {}

/// The attributes of the [InitialData] object.
extension InitialDataExtension on InitialData {
  external String? get randomUUID;
}
```

And then, from the code of the application:

```dart
...
  Widget build(BuildContext context) {
    final int viewId = View.of(context).viewId;
    final InitialData? data = ui_web.views.getInitialData(viewId) as InitialData?;
    return Text('${data?.randomUUID}');
  }
...
```

## Testing

Will add unit tests once naming is sorted out :)

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-01-26 02:36:37 +00:00
David Iglesias
4292cddf6f [web] Prevent re-rendering disposed views when the engine hot restarts. (flutter/engine#49958)
While debugging a different [issue](https://github.com/flutter/flutter/issues/141588), @elliette identified a problem with the web engine when a flutter web app hot-restarts.

TL;DR: the engine is requesting the framework to re-render a view as it tears them down, causing an assertion failure.

This fix stops listening to changes on view "disposed" events when the engine itself is being disposed, so it doesn't trigger re-renders for views that are never coming back.

## Issues

* Fixes https://github.com/flutter/flutter/issues/142030

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-01-26 02:26:21 +00:00
skia-flutter-autoroll
7505f6bdaf Roll Dart SDK from 2fb950853f06 to 00784f1f22b5 (3 revisions) (flutter/engine#50068)
https://dart.googlesource.com/sdk.git/+log/2fb950853f06..00784f1f22b5

2024-01-26 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.4.0-74.0.dev
2024-01-25 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.4.0-73.0.dev
2024-01-25 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.4.0-72.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 dart-vm-team@google.com,jacksongardner@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-01-26 01:44:05 +00:00
Matan Lurey
036ccdbd2c Avoid sizing ImageReaderSurfaceProducer smaller than 1x1 (flutter/engine#50066)
Partial fix towards https://github.com/flutter/flutter/issues/142082.

This fixes OpenGLES + SurfaceProducer, but not Vulkan + SurfaceProducer (that requires VK-specific changes).
2024-01-26 00:56:58 +00:00
Jonah Williams
472d16e991 Use clamp sampling mode in external texture. (flutter/engine#50063)
This is a more reasonable default sampling mode.
2024-01-25 16:14:04 -08:00
John McCutchan
b9c9338455 Reland Optimizations for TLHC frame rate and jank (flutter/engine#50065)
- ImageReaderSurfaceProducer no longer drops frames when the producer
and the consumers are up to two frames out of sync.
- Have the native C++ side of the Android external textures check if a
new frame has been pushed and that the texture needs to be updated. This
avoids having to schedule a task on the raster thread for each updated
texture.
- Notify the engine earlier that a frame is needed when updating a TLHC
texture.
- Reland fix: Call SurfaceTextureExternalTexture::ProcessFrame if
dl_image_ is null.
2024-01-25 16:01:54 -08:00
skia-flutter-autoroll
0b56f7ab32 Roll Fuchsia Linux SDK from Igt2rE-R6rgfmTRaF... to WHlwlOwznFknNm5IS... (flutter/engine#50059)
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 jacksongardner@google.com,rmistry@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-01-25 23:54:52 +00:00
auto-submit[bot]
d4a6b6d842 Reverts "Optimizations for TLHC frame rate and jank" (flutter/engine#50062)
Reverts flutter/engine#50033
Initiated by: zanderso
This change reverts the following previous change:
Original Description:
- ImageReaderSurfaceProducer no longer drops frames when the producer and the consumers are up to two frames out of sync.
- Have the native C++ side of the Android external textures check if a new frame has been pushed and that the texture needs to be updated.  This avoids having to schedule a task on the raster thread for each updated texture.
- Notify the engine earlier that a frame is needed when updating a TLHC texture.
2024-01-25 23:31:18 +00:00
Brandon DeRosier
5e80d9e9e1 [Impeller] Fix advanced blend alpha issue, improve blend goldens. (flutter/engine#50035)
Figured out one of the problems...

Multiply before (notice weird alpha behavior on the bird):
<img width="401" alt="Screenshot 2024-01-25 at 12 07 50 AM" src="https://github.com/flutter/engine/assets/919017/91c7891f-58f8-4337-b9d6-f49803938a53">

Multiply after:
<img width="401" alt="Screenshot 2024-01-25 at 12 06 43 AM" src="https://github.com/flutter/engine/assets/919017/233ede85-bdc5-475e-83bd-3263959c7d2a">
2024-01-25 22:53:44 +00:00
Eitan Liu
745af8297c Fix android new engine in group (flutter/engine#49659)
Fix android `FlutterFragmentActivity.createFlutterFragment()` new engine in group.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-01-25 22:03:57 +00:00
skia-flutter-autoroll
c60ba1487d Roll Skia from 801bb44f2b09 to cc5124317c18 (1 revision) (flutter/engine#50054)
https://skia.googlesource.com/skia.git/+log/801bb44f2b09..cc5124317c18

2024-01-25 egdaniel@google.com Removed unused params to our VMA wrapper.

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 brianosman@google.com,jacksongardner@google.com,lovisolo@google.com,rmistry@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-01-25 21:25:06 +00:00
Bruno Leroux
282cb244ad Fix a typo in ChannelBuffers documentation (flutter/engine#49928)
Fix one typo in ChannelBuffers documentation
2024-01-25 21:17:17 +00:00
Dan Field
b3ab50daf2 Add include suggested by clang-tidy (flutter/engine#49898)
This is from the google3 roll. Adding this cuts down on noise for rollers.
2024-01-25 21:15:00 +00:00
Callum Moffat
b473589fe5 Refactor macOS trackpad gesture tracking (flutter/engine#49424)
The AppKit state machine was not well understood before. Sometimes the engine would leave orphan PanZoomStart after a certain sequences including NSEventPhaseMayBegin

Now track each gesture's specific phase instead of boolean true/false which doesn't really accurately represent the system state.

Fixes https://github.com/flutter/flutter/issues/140730
FIxes https://github.com/flutter/flutter/issues/136622
2024-01-25 21:10:06 +00:00
Nishant Kumar
f27cfea630 winding order from tesellator.h to formats.h (flutter/engine#49865)
i have removed WindingOrder from tesellator.h and moved it to formats.h . Fixes https://github.com/flutter/flutter/issues/138832

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-01-25 21:05:18 +00:00
John McCutchan
c4781018bc Optimizations for TLHC frame rate and jank (flutter/engine#50033)
- ImageReaderSurfaceProducer no longer drops frames when the producer
and the consumers are up to two frames out of sync.
- Have the native C++ side of the Android external textures check if a
new frame has been pushed and that the texture needs to be updated. This
avoids having to schedule a task on the raster thread for each updated
texture.
- Notify the engine earlier that a frame is needed when updating a TLHC
texture.
2024-01-25 12:44:38 -08:00
Jonah Williams
c80a0580f4 [Impeller] Fix mipmap generation for Vulkan render target textures. (flutter/engine#49848)
Potentially fixes https://github.com/flutter/flutter/issues/141495

The texture used as a render target attachment can have miplevels, but
the image view cannot. Unconditionally create two image views per
texture (this could be optimized in some cases), where the specific
"render target texture view" always sets a mipcount of 1.

In theory this should allow us to generate mipmaps for textures that are
used as render target attachments, including toImage and toImageSync
textures which are currently missing this functionality.

---------

Co-authored-by: Aaron Clarke <aaclarke@google.com>
Co-authored-by: gaaclarke <30870216+gaaclarke@users.noreply.github.com>
2024-01-25 12:28:26 -08:00
Jason Simmons
2bc62b42f1 [Impeller] Do not emit metadata for structs that are not part of the shader's interface (flutter/engine#50029)
Fixes https://github.com/flutter/flutter/issues/138404
2024-01-25 19:48:57 +00:00
skia-flutter-autoroll
5a1ecec956 Roll Skia from de46a989e0ca to 29b545e4356b (1 revision) (flutter/engine#50047)
https://skia.googlesource.com/skia.git/+log/de46a989e0ca..29b545e4356b

2024-01-25 fmalita@chromium.org [skottie] Add TrivialFontRunIterator build option

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 brianosman@google.com,jacksongardner@google.com,lovisolo@google.com,rmistry@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-01-25 19:41:10 +00:00
Jonah Williams
48384a2022 [Impeller] write vertices geometry data to host buffer. (flutter/engine#49741)
Now that host buffer writes go directly to device buffers, there is no advantage to creating dedicated device buffers for the vertices contents.

Fixes https://github.com/flutter/flutter/issues/141202
2024-01-25 18:58:57 +00:00
Jonah Williams
f9923488be Revert "[Impeller] round up subpass coverage when it is close to (and smaller) than root pass size." (flutter/engine#50041)
Reverts flutter/engine#49925

This did not improve benchmarks: https://flutter-flutter-perf.skia.org/e/?queries=device_type%3DPixel_7_Pro%26sub_result%3D90th_percentile_frame_rasterizer_time_millis%26sub_result%3D99th_percentile_frame_rasterizer_time_millis%26sub_result%3Daverage_frame_rasterizer_time_millis%26sub_result%3Dworst_frame_rasterizer_time_millis%26test%3Dnew_gallery_impeller_old_zoom__transition_perf&selected=commit%3D38910%26name%3D%252Carch%253Dintel%252Cbranch%253Dmaster%252Cconfig%253Ddefault%252Cdevice_type%253DPixel_7_Pro%252Cdevice_version%253Dnone%252Chost_type%253Dlinux%252Csub_result%253D99th_percentile_frame_rasterizer_time_millis%252Ctest%253Dnew_gallery_impeller_old_zoom__transition_perf%252C

From follow up investigation: some of the routes hit this optimization, while some did not as the the bounds size seems to depend on the exact contents.
2024-01-25 18:51:23 +00:00
gaaclarke
d8b2624fcf [Impeller] turned on vulkan validation for all but one golden test (flutter/engine#50045)
fixes https://github.com/flutter/flutter/issues/142017

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-01-25 18:38:17 +00:00
skia-flutter-autoroll
b35b7d7917 Roll Skia from 56c06ee7a252 to bcc2e8b6105a (2 revisions) (flutter/engine#50042)
https://skia.googlesource.com/skia.git/+log/56c06ee7a252..bcc2e8b6105a

2024-01-25 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll vulkan-deps from 601d5676bb98 to 43b6e2049a16 (3 revisions)
2024-01-25 michaelludwig@google.com [skif] Add stats tracking for surfaces/shader types

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 brianosman@google.com,jacksongardner@google.com,lovisolo@google.com,rmistry@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-01-25 17:14:23 +00:00