23226 Commits

Author SHA1 Message Date
Derek Xu
dedec555f2 Handle deprecation of Dart_TimelineEvent Embedder API (flutter/engine#42497)
This PR changes usages of `Dart_TimelineEvent` to
`Dart_RecordTimelineEvent` as `Dart_TimelineEvent` was deprecated in
https://dart-review.googlesource.com/c/sdk/+/308721.
2023-08-02 16:09:31 -04:00
skia-flutter-autoroll
d9d8602827 Roll Skia from ccc17f784e5d to 25f5a32367ad (4 revisions) (flutter/engine#44283)
https://skia.googlesource.com/skia.git/+log/ccc17f784e5d..25f5a32367ad

2023-08-02 jlavrova@google.com Justification problems
2023-08-02 johnstiles@google.com Remove DSLType.
2023-08-02 johnstiles@google.com Move verify_type into TypeReference.
2023-08-02 kjlubick@google.com Remove SK_GL #ifdefs from GrBackendSurface

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,jvanverth@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2023-08-02 19:41:26 +00:00
skia-flutter-autoroll
684b54d1bd Roll Skia from 7104d0e8863f to ccc17f784e5d (2 revisions) (flutter/engine#44279)
https://skia.googlesource.com/skia.git/+log/7104d0e8863f..ccc17f784e5d

2023-08-02 johnstiles@google.com Clean up comment drift.
2023-08-02 armansito@google.com [sksl][spirv] Support storage texture intrinsics

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,jvanverth@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2023-08-02 18:22:45 +00:00
hellohuanlin
da9b932e28 [ios][autocorrection]disable auto-correction highlight in iOS 17 (flutter/engine#44176)
This PR disables the "auto-correction highlight" feature in iOS 17. 

This feature was introduced in https://github.com/flutter/flutter/pull/45354 and https://github.com/flutter/engine/pull/13959/ (CC: @LongCatIsLooong who was the original author)

I have created [a new issue](https://github.com/flutter/flutter/issues/131622) to find other approaches to re-enable this feature. 

**Note that "auto-correction" itself still works, it's only the "highlight" part is disabled:**

- iOS 16 with highlight:
https://github.com/flutter/engine/assets/41930132/2fe7bbf6-f2db-4212-a020-e420ad8dd5e6

- iOS 17 without highlight:
https://github.com/flutter/engine/assets/41930132/34f34743-6bef-4e93-80d2-d04c92ba59bf

## Why disable this feature?

The original PR uses `UITextInput::firstRectForRange` API for auto-correction, since Apple does not provide any other API when auto-correction should show up, so the original PR used this API as a workaround. 

In iOS 17, Apple changed a few `UITextInput` behaviors:  
- UIKit does not query `UITextInput::firstRectForRange` for text range of the auto-corrected word any more. 
- But instead, it repeatedly queries every single character of the current word (after entering or deleting a character), regardless whether the word should be auto-corrected or not. 

I have tried all other `UITextInput` APIs that takes a text range, and none are suitable for auto-correction feature. As a result, I have to disable this feature for iOS 17 for now. 

*List which issues are fixed by this PR. You must list at least one issue.*

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

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-02 18:20:17 +00:00
John McCutchan
d4d816b177 Reland Introduce TextureRegistry.ImageTexture and HardwareBufferExternalTextureGL (flutter/engine#44278)
Introduce TextureRegistry.ImageTexture and
HardwareBufferExternalTextureGL

- Introduce TextureRegistry.ImageTexture and related machinery.
- Introduce HardwareBufferExternalTextureGL and related machinery.
- Introduce ImageReaderPlatformViewRenderTarget.

NOTE: ImageReaderPlatformViewRenderTarget requires Android 26.

NOTE: This CL does not enable using ImageReaderPlatformViewRenderTarget
yet.

Additional fixes:

- Relax JNI lookup for classes and methods that aren't available in API
22
- Add @Keep annotations on code that is only referenced by JNI
2023-08-02 10:52:06 -07:00
skia-flutter-autoroll
2d3f56e62a Roll Skia from 93764a98b866 to 7104d0e8863f (4 revisions) (flutter/engine#44273)
https://skia.googlesource.com/skia.git/+log/93764a98b866..7104d0e8863f

2023-08-02 brianosman@google.com Remove FM
2023-08-02 michaelludwig@google.com [skif] Relax kForceResolveInputs to a kSampledRepeatedly hint
2023-08-02 brianosman@google.com Add Test-MSAN (CPU) job
2023-08-02 jvanverth@google.com [OpenGL] Another approach to fixing mipmap generation on Intel.

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,jvanverth@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2023-08-02 17:37:11 +00:00
Jason Simmons
fcb58723ad [Impeller] Fix leak of wrapped TextureMTL objects in the Metal embedder API (flutter/engine#44245)
Fixes https://github.com/flutter/flutter/issues/131682
2023-08-02 17:30:42 +00:00
Loïc Sharma
ad7865d372 Revert "Listen to window notifications to update application lifecycle" (flutter/engine#44275)
Reverts flutter/engine#43558

Customer reported a crash on shutdown:

```
flutter::Window::HandleMessage(unsigned int,unsigned __int64,__int64)
...
?NtUserDestroyWindow
flutter::Window::Destroy()
flutter::Window::~Window()
flutter::FlutterWindow::`vector deleting destructor'`adjustor{312}' (unsigned int)
flutter::FlutterWindowsView::~FlutterWindowsView()
flutter::FlutterWindowsView::~FlutterWindowsView
FlutterDesktopViewControllerDestroy
flutter::FlutterViewController::~FlutterViewController
FlutterWindow::~FlutterWindow()
wWinMain
```

The message causing the crash is `WM_KILLFOCUS`.
2023-08-02 17:18:21 +00:00
skia-flutter-autoroll
80146e890f Roll Skia from 514c66ce0471 to 93764a98b866 (1 revision) (flutter/engine#44270)
https://skia.googlesource.com/skia.git/+log/514c66ce0471..93764a98b866

2023-08-02 kjlubick@google.com Decouple SkTextBlob from gpu cache

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,jvanverth@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2023-08-02 16:36:48 +00:00
Chris Yang
e3a395f1ab [iOS][A11Y] fix hittest with non-SemanticsObject (flutter/engine#44014)
PlatformViewSemanticsContainer did not implement the nativeAccessibility method, leads to a nil object being returned. 

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

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-02 16:15:16 +00:00
Zachary Anderson
f417dbc920 Revert "[Impeller] Support for rendering Android Platform Views into a HardwareBuffer backed texture." (flutter/engine#44262)
Reverts flutter/engine#44087

Reverting for https://github.com/flutter/flutter/issues/131772
2023-08-02 08:04:44 -07:00
skia-flutter-autoroll
a2f8d31791 Roll Skia from c6577d328585 to 6009cc6d7d80 (2 revisions) (flutter/engine#44264)
https://skia.googlesource.com/skia.git/+log/c6577d328585..6009cc6d7d80

2023-08-02 johnstiles@google.com Fix variable-shadow warnings from Clang 17.
2023-08-02 johnstiles@google.com Remove DSLType::Void/Invalid/Poison.

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,jvanverth@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2023-08-02 14:59:09 +00:00
skia-flutter-autoroll
727ee5e971 Roll Skia from 1c0bba7c1053 to c6577d328585 (2 revisions) (flutter/engine#44260)
https://skia.googlesource.com/skia.git/+log/1c0bba7c1053..c6577d328585

2023-08-02 nicolettep@google.com Reland "[graphite] Enable Vulkan draws and binding texture/samplers"
2023-08-02 robertphillips@google.com Reorganize Protected content utilities to be more reusable

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,jvanverth@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2023-08-02 14:11:13 +00:00
skia-flutter-autoroll
7a62e7b287 Roll Dart SDK from 8ff03ebf7eaa to afbaf4216fc8 (1 revision) (flutter/engine#44259)
https://dart.googlesource.com/sdk.git/+log/8ff03ebf7eaa..afbaf4216fc8

2023-08-02 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-27.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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2023-08-02 14:09:24 +00:00
skia-flutter-autoroll
d4b0b3d39e Roll Skia from 6087a5224c6f to 6807d8b8a9d3 (2 revisions) (flutter/engine#44250)
https://skia.googlesource.com/skia.git/+log/6087a5224c6f..6807d8b8a9d3

2023-08-02 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from b65d24de9b8d to 17b4158d1701
2023-08-02 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from a0873d3f0d98 to b65d24de9b8d (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,jvanverth@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2023-08-02 06:19:10 +00:00
Jonah Williams
ac6ec58823 [Impeller] Give a fixed timeout for acquireNextImageKHR. (flutter/engine#44241)
Fixes https://github.com/flutter/flutter/issues/131610

Since we're not blocking on presentation, we can have multiple images pending. This is generally good, but for the backpressure from acquireNextImageKHR to be valid it needs to have a finite timeout.

Pick a somewhat arbitrary but fairly long ms duration. See also: https://github.com/flutter/flutter/issues/131698
2023-08-02 05:30:04 +00:00
skia-flutter-autoroll
d620528012 Roll Dart SDK from 7c03426705da to 8ff03ebf7eaa (2 revisions) (flutter/engine#44243)
https://dart.googlesource.com/sdk.git/+log/7c03426705da..8ff03ebf7eaa

2023-08-02 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-26.0.dev
2023-08-01 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-25.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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2023-08-02 03:33:04 +00:00
Harry Terkelsen
aed57ec7af [canvaskit] Enable CanvasKit to compute tight SkPicture bounds (flutter/engine#43361) 2023-08-01 16:07:19 -07:00
skia-flutter-autoroll
3ff184cb6c Roll Dart SDK from 197fc0d7fea2 to 7c03426705da (2 revisions) (flutter/engine#44237)
https://dart.googlesource.com/sdk.git/+log/197fc0d7fea2..7c03426705da

2023-08-01 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-24.0.dev
2023-08-01 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-23.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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2023-08-01 22:49:43 +00:00
John McCutchan
75cc4c162b [Impeller] Support for rendering Android Platform Views into a HardwareBuffer backed texture. (flutter/engine#44087)
- Introduce TextureRegistry.ImageTexture and related machinery.
- Introduce ImageReaderPlatformViewRenderTarget.
- Introduce HardwareBufferExternalTextureGL and related machinery.

NOTE: ImageReaderPlatformViewRenderTarget requires Android 26.

NOTE: This CL does not enable using ImageReaderPlatformViewRenderTarget
yet.

Related https://github.com/flutter/flutter/issues/130892
2023-08-01 15:39:32 -07:00
Yegor
6136444a48 [web:a11y] add platform view role (flutter/engine#44188)
Add `PlatformViewRoleManager`, the primary role manager for platform views. Currently, all it does is manager the `aria-owns` attribute that determines the screen reader traversal order of the platform view w.r.t. surrounding content.

This is a partial fix for https://github.com/flutter/flutter/issues/124765. While it does not address literally using the TAB key as a means for traversing widgets, it does address traversal via screen reader shortcuts.
2023-08-01 22:25:07 +00:00
skia-flutter-autoroll
c0f9e5ae79 Roll Skia from 18cf818e044f to 4deae93198f9 (1 revision) (flutter/engine#44236)
https://skia.googlesource.com/skia.git/+log/18cf818e044f..4deae93198f9

2023-08-01 johnstiles@google.com Simplify parsing of expression-statements.

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,jvanverth@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2023-08-01 22:25:04 +00:00
skia-flutter-autoroll
08096c8f9c Roll Skia from 58c031441cbb to 18cf818e044f (6 revisions) (flutter/engine#44234)
https://skia.googlesource.com/skia.git/+log/58c031441cbb..18cf818e044f

2023-08-01 michaelludwig@google.com [skif] Refine ShaderFlags and Builder::eval API
2023-08-01 nicolettep@google.com [graphite] Add Vulkan window context to support viewer
2023-08-01 michaelludwig@google.com Skip ImageFilterCropRect_GPU test on Iris655 ANGLE
2023-08-01 fmalita@chromium.org Add a "twirl" effect to mesh demo slide
2023-08-01 johnstiles@google.com Add uniform-matrix polyfills for unpacking std140 alignment.
2023-08-01 johnstiles@google.com Clean up Modifiers, DSLModifiers and ModifierFlags.

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,jvanverth@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2023-08-01 21:27:09 +00:00
skia-flutter-autoroll
cec2c50d3c Roll Fuchsia Linux SDK from lwCo6le6r0X-Srvx3... to KPSWBhOvG6piddBQG... (flutter/engine#44230)
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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2023-08-01 20:46:48 +00:00
skia-flutter-autoroll
bb68a95f4a Roll Skia from d53f7b880651 to 58c031441cbb (2 revisions) (flutter/engine#44229)
https://skia.googlesource.com/skia.git/+log/d53f7b880651..58c031441cbb

2023-08-01 johnstiles@google.com Move single-use boolean out of WGSL codegen class.
2023-08-01 herb@google.com Add bounds checking to AutoTArray and AutoSTArray

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,jvanverth@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2023-08-01 20:18:54 +00:00
Srujan Gaddam
8491586ef9 Remove extends JSTypedArray from JSUint8Array1 (flutter/engine#44175)
Any user @staticInterop types should only subtype the dart:js_interop
types JSObject and or JSAny as user @staticInterop types erase to
JSObject.

In the future, the other JS types will be added as extension types,
allowing users to implement them with their own extension types.

Allows https://dart-review.googlesource.com/c/sdk/+/316865/1 to be
landed.

## 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.
- [ ] I added new tests to check the change I am making or feature I am
adding, or Hixie said the PR is test-exempt. See [testing the engine]
for instructions on writing and running engine tests.
- [X] I updated/added relevant documentation (doc comments with `///`).
- [X] I signed the [CLA].
- [ ] All existing and new tests are passing.
2023-08-01 12:39:27 -07:00
gaaclarke
87979d9700 Made the licenses script output all problems (flutter/engine#44223)
fixes: https://github.com/flutter/flutter/issues/131680

verified the behavior in https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8773943493296876561/+/u/test:_licenses_check/stdout

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-01 19:16:44 +00:00
skia-flutter-autoroll
89540a71b0 Roll Skia from a7a3646c2c8a to d53f7b880651 (6 revisions) (flutter/engine#44226)
https://skia.googlesource.com/skia.git/+log/a7a3646c2c8a..d53f7b880651

2023-08-01 herb@google.com Reland "Update AutoTArray to always track size"
2023-08-01 cmumford@google.com [debugger-app] use Git from /cipd/bin if present
2023-08-01 jmbetancourt@google.com [skottie] add boolean return value to Slot Manager setters
2023-08-01 kjlubick@google.com Fix copy-pasta in KeyHelpers
2023-08-01 michaelludwig@google.com Reland "[skif] Update MatrixConvolution to use FilterResult"
2023-08-01 jlavrova@google.com SkUnicode with libgrapheme implementation

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,jvanverth@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2023-08-01 19:08:32 +00:00
Chris Yang
39fd1931c6 [iOS] Add darwin_extension_safe flag and use UIScene api when building for extensions (flutter/engine#43449)
iOS extensions forbids the usage of UIApplication.sharedApplication. This PR refactors the engine to use UISceneAPI when darwin_extension_safe flag is on. Using UISceneAPI can help avoid the usage of `UIApplication.sharedApplication` as much as possible.
This PR also added a new `_extension_safe` variant for the engine build so all the logic with the `darwin_extension_safe` flag is on can be tested separately.

This PR doesn't enable the engine to build for the extension even when darwin_extension_safe is true.

part of https://github.com/flutter/flutter/issues/124289

There are several issues related to UIApplication life cycle and I manually tested they still work with the scene API:

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-01 18:12:45 +00:00
gaaclarke
3c31a896c8 [Impeller] Started using a pool for HostBuffers. (flutter/engine#44081)
This removes ~792 MB/s of allocation when scrolling around the Gallery
((358 MB - 226 MB) * 6).

## before
<img width="1337" alt="Screenshot 2023-07-27 at 1 48 57 PM"
src="https://github.com/flutter/engine/assets/30870216/d320c2da-c333-40b7-9326-c9b69e5ff462">

## after
<img width="1391" alt="Screenshot 2023-07-27 at 1 36 35 PM"
src="https://github.com/flutter/engine/assets/30870216/e3314a03-8691-4766-9989-aef112703384">


## 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.
- [ ] I added new tests to check the change I am making or feature I am
adding, or Hixie said the PR is test-exempt. See [testing the engine]
for instructions on writing and running engine tests.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I signed the [CLA].
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat

---------

Co-authored-by: Jonah Williams <jonahwilliams@google.com>
2023-08-01 09:54:14 -07:00
gaaclarke
dbf0e3eead [Impeller] Made the clear optimization handle backdrop filters. (flutter/engine#44192)
fixes https://github.com/flutter/flutter/issues/131576

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-01 16:24:03 +00:00
gaaclarke
1b4f573c46 [Impeller] moved to one staging buffer pool (flutter/engine#44172)
I measured the pool usage while using the wonderous app after having
consolidated the pools by printing capturing the pool usage after every
call of `vmaCreateBuffer`. The max number of allocations ever seen in
this pool were 1288704 B. Each of these pools are 32 MB. So this change
removes 64MB from the baseline memory usage of a Vulkan Flutter engine.
Worse case for a swapchain of 3 would be roughly 3 * 1.2 MB which is
well within the limits of the 32 MB buffer.

Using one pool also increases the likelihood that a buffer will have
been more recently used which leads to better memory performance.

This is safe to do since buffers will only be placed back into the pool
after they are disposed of.

## patch used for measuring
```diff
--- a/impeller/renderer/backend/vulkan/allocator_vk.cc
+++ b/impeller/renderer/backend/vulkan/allocator_vk.cc
@@ -474,6 +474,15 @@ std::shared_ptr<DeviceBuffer> AllocatorVK::OnCreateBuffer(
                                              &buffer_allocation_info  //
                                              )};
 
+  VmaStatistics pool_stats;
+  ::vmaGetPoolStatistics(allocator_.get(), staging_buffer_pool_.get().pool,
+                         &pool_stats);
+  static uint64_t s_max = 0;
+  if (pool_stats.allocationBytes > s_max) {
+    s_max = pool_stats.allocationBytes;
+    FML_LOG(ERROR) << "pool max: " << s_max;
+  }
+
   if (result != vk::Result::eSuccess) {
     VALIDATION_LOG << "Unable to allocate a device buffer: "
                    << vk::to_string(result);
```

## Pre-launch Checklist

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

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2023-08-01 09:16:10 -07:00
skia-flutter-autoroll
5ad6c197d5 Roll Dart SDK from 45405dd4ea87 to 197fc0d7fea2 (1 revision) (flutter/engine#44217)
https://dart.googlesource.com/sdk.git/+log/45405dd4ea87..197fc0d7fea2

2023-08-01 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-22.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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2023-08-01 14:55:23 +00:00
skia-flutter-autoroll
e122c49806 Roll Skia from bddb07184f88 to 45290179e017 (1 revision) (flutter/engine#44215)
https://skia.googlesource.com/skia.git/+log/bddb07184f88..45290179e017

2023-08-01 jvanverth@google.com Revert "Update AutoTArray to always track size"

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,jonahwilliams@google.com,jvanverth@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2023-08-01 13:58:23 +00:00
skia-flutter-autoroll
2dad77487e Roll Skia from c74c10128334 to bddb07184f88 (1 revision) (flutter/engine#44214)
https://skia.googlesource.com/skia.git/+log/c74c10128334..bddb07184f88

2023-08-01 jvanverth@google.com Revert "[graphite] Enable Vulkan draws and binding texture/samplers"

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,jonahwilliams@google.com,jvanverth@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2023-08-01 13:06:39 +00:00
skia-flutter-autoroll
65f04dce63 Roll Skia from 177897b13a89 to c74c10128334 (4 revisions) (flutter/engine#44213)
https://skia.googlesource.com/skia.git/+log/177897b13a89..c74c10128334

2023-08-01 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 143fa68f50b7 to 6dc0c9d62755 (13 revisions)
2023-08-01 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from a0873d3f0d98 to fda6bb7fc626
2023-08-01 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 1695fc6fc41d to a0873d3f0d98 (4 revisions)
2023-08-01 nicolettep@google.com [graphite] Enable Vulkan draws and binding texture/samplers

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,jonahwilliams@google.com,jvanverth@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2023-08-01 11:48:20 +00:00
skia-flutter-autoroll
778d7e5c18 Roll Fuchsia Linux SDK from wIpcCOc0TtDYasQbl... to lwCo6le6r0X-Srvx3... (flutter/engine#44208)
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 jonahwilliams@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2023-08-01 07:49:58 +00:00
skia-flutter-autoroll
bafe244e55 Manual roll Dart SDK from a58ca112af1c to aca45d2e133c (2 revisions) (flutter/engine#44203)
Manual roll requested by asiva@google.com

https://dart.googlesource.com/sdk.git/+log/a58ca112af1c..aca45d2e133c

2023-07-31 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-19.0.dev
2023-07-31 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-18.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 asiva@google.com,dart-vm-team@google.com,jonahwilliams@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2023-08-01 04:59:11 +00:00
David Worsham
716b6a2cd4 [fuchsia] Only use upstream vulkan headers (flutter/engine#44157)
Stop using the special fuchsia headers, as they are contributing to
undefined behavior when building with LTO.
They are also no longer needed. All relevant fuchsia extensions were
upstreamed some time ago.

In the process, engage in some cleanup which means the "vulkan_config"
is also no longer needed. Rely on GN "public_deps" to provide the vulkan
include paths to various source sets.

See b/291462180 for more details on why this fix was neccesary.
2023-08-01 13:17:14 +10:00
Matan Lurey
bc3b2e01ef [Impeller] Implement, non user-facing, dithering for LinearGradients. (flutter/engine#44181)
Partial work towards https://github.com/flutter/flutter/issues/131450.

---

Run the Playground locally:

```bash
$ENGINE/out/host_debug_unopt/impeller_unittests \
  --enable_playground \
  --gtest_filter="*CanRenderLinearGradientWithDithering*"
```

Summary of changes:

- Added a playground/test for dithering disabled and enabled.
- Added `bool dither` to Impeller's `Paint`, but `SetDither` (use-facing) is ignored.
- Converted [Skia's dithering](f9de059517/src/opts/SkRasterPipeline_opts.h (L1717)) to GLSL and invoked it when `dither` is set.

## Before

![Screenshot 2023-07-31 at 1 29 16 PM](https://github.com/flutter/engine/assets/168174/51d2f7a0-dc22-44fe-b7f9-990b826c5fd9)

## After

![Screenshot 2023-07-31 at 1 29 25 PM](https://github.com/flutter/engine/assets/168174/78da2efe-2c5d-438f-b7f7-d8eb092c6a2c)

## Deleted Scenes

<details>
<summary>Here are some of my earlier attempts that are fun to share :)</summary>

![Screenshot 2023-07-31 at 11 35 07 AM](https://github.com/flutter/engine/assets/168174/719f97fc-1a3d-4920-8687-486c4de28b79)

![Screenshot 2023-07-31 at 12 12 38 PM](https://github.com/flutter/engine/assets/168174/ed262f83-442f-484b-8288-30e8e0d5e768)

![Screenshot 2023-07-31 at 12 19 56 PM](https://github.com/flutter/engine/assets/168174/057b1f95-fbd2-4ae2-bb25-8dd967cf8466)

![Screenshot 2023-07-31 at 12 25 59 PM](https://github.com/flutter/engine/assets/168174/34857c6e-49cd-40c1-9e91-646b7bfbf97c)

![Screenshot 2023-07-31 at 12 44 08 PM](https://github.com/flutter/engine/assets/168174/3b272428-b5be-4ca5-8cfe-1b12062a64f4)

</details>
2023-08-01 02:02:25 +00:00
Chinmay Garde
4c6b677ded [Impeller] Document the fiddly bits about setting up Metal shader source debugging. (flutter/engine#44195)
Saying this fixes the two linked issue pushes the bounds of credulity. But this is the best information we have ATM on how to fix the obscure "Invalid UUID" error. And, I have linked to the PR thread as a breadcrumb. Not sure how to do better 🤷🏽‍♂️.

Fixes https://github.com/flutter/flutter/issues/120326
Fixes https://github.com/flutter/flutter/issues/121430
2023-08-01 00:04:23 +00:00
Chinmay Garde
ee65190753 [Impeller] Add documentation on how to enable Metal Profiling HUD without Xcode. (flutter/engine#44196) 2023-07-31 23:43:01 +00:00
Siva
4f13581147 Manual roll of Dart with fixups to zircon system.dart (flutter/engine#44185)
https://dart.googlesource.com/sdk.git/+log/4fd35600b477..0e02245635ea

Merge to Dart Version 3.2.0-16.0.dev
2023-07-31 16:03:14 -07:00
Chinmay Garde
8b852e3aec [Impeller] Update guidance on how to run with Metal validation without Xcode. (flutter/engine#44190)
Fixes https://github.com/flutter/flutter/issues/114202
2023-07-31 22:43:29 +00:00
Ian Hickson
ddb2a2b8b3 Mention the point of BlendMode.plus and advise on using it. (flutter/engine#44189) 2023-07-31 22:32:17 +00:00
skia-flutter-autoroll
1b46ad1000 Roll Skia from db813f4043fe to 2e5f08012a92 (1 revision) (flutter/engine#44187)
https://skia.googlesource.com/skia.git/+log/db813f4043fe..2e5f08012a92

2023-07-31 herb@google.com Update AutoTArray to always track size

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,jonahwilliams@google.com,jvanverth@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2023-07-31 22:07:08 +00:00
Chinmay Garde
e494c2f4df [Impeller] Update guidance on how to try Impeller on macOS Desktop. (flutter/engine#44186)
The website was updated in https://github.com/flutter/website/pull/9114/files
2023-07-31 21:54:52 +00:00
Chinmay Garde
70d6d7cb22 [Impeller] Add a descriptive blurb about newer Impeller components and fix links. (flutter/engine#44183) 2023-07-31 21:24:12 +00:00
skia-flutter-autoroll
3cbc4eaedf Roll Skia from 06174bc8f4d5 to db813f4043fe (1 revision) (flutter/engine#44182)
https://skia.googlesource.com/skia.git/+log/06174bc8f4d5..db813f4043fe

2023-07-31 herb@google.com Use unique_ptr in THashTable

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,jonahwilliams@google.com,jvanverth@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2023-07-31 21:12:48 +00:00
Jason Simmons
3bb1764557 [Impeller] Create a wrapper Impeller context for each Vulkan surface and its swapchain (flutter/engine#44171)
In https://github.com/flutter/engine/pull/41059 the Android context and surface were changed to share one impeller::ContextVK across all instances of AndroidSurfaceVulkanImpeller.  However, the ContextVK holds a reference to the current swapchain.  If an app uses multiple AndroidSurfaceVulkanImpeller instances (e.g. for platform views), then one surface may overwrite the ContextVK's swapchain while another surface is trying to render.

This patch allows each surface to get its own impeller::Context instance holding a swapchain tied to that surface.  The per-surface contexts will delegate most operations to the shared parent ContextVK.
2023-07-31 20:49:11 +00:00