22583 Commits

Author SHA1 Message Date
Callum Moffat
641003fc6d Fix crash with CJK keyboard with emoji at end of text field (flutter/engine#42540)
The `isRTLAtPosition` method had a bug, it used `NSInteger max = [_selectionRects count]` instead of `NSInteger max = [_selectionRects count] - 1`. But I realized we don't even need the function any more, it was used in a few places in previous iterations of #36643, but in the only place remaining, we actually already have the selection rect and don't need to search for it by position.

Btw as an explanation of the crash, I guess there is some mismatch between code point and character count somewhere. UIKit was asking for `caretRectForPosition:2` when we only had 1 character. This could have only crashed when floating cursor selection was used, but actually when switching to CJK keyboard, UIKit turns out to use `caretRectForPosition` to calculate something about the composing rect.

Fixes https://github.com/flutter/flutter/issues/128031
2023-06-12 18:13:03 +00:00
skia-flutter-autoroll
ed72d25fef Roll Skia from 658b1d366758 to 6bdb0ef30cb6 (2 revisions) (flutter/engine#42778)
https://skia.googlesource.com/skia.git/+log/658b1d366758..6bdb0ef30cb6

2023-06-12 johnstiles@google.com Remove Wno-redundant-move setting.
2023-06-12 bungeman@google.com Allow SkSpan to be created from Container&&

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,herb@google.com,jacksongardner@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-06-12 18:11:52 +00:00
Jonah Williams
a9b8415bfc [Impeller] Correct attachment description for offscreen MSAA resolve. (flutter/engine#42753)
Two issues:

1. The resolve texture is created from the same impeller attachment as the msaa attachment, so the store mode was getting set to dont care instead of store.

2. the image layout for the resolve attachment should be ePresentSrcKHR, at least from following the guide at https://vulkan-tutorial.com/Multisampling

Fixing both of these locally fixes all of the weird offscreen cursed rendering.

Fixes https://github.com/flutter/flutter/issues/128600
2023-06-12 18:01:07 +00:00
Tamir Duberstein
0984c52a8f Remove dependency on memfs (flutter/engine#42773)
See individual commits.
2023-06-12 17:14:35 +00:00
Kevin Lubick
471a8975bd Remove unnecessary #include of SkPromiseImageTexture (flutter/engine#42770)
I was refactoring this class on the Skia side and saw Flutter #included it, but did not appear to actually use it.

This replaces an unnecessary #include with a necessary one.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-06-12 16:16:48 +00:00
skia-flutter-autoroll
9ff0c742c7 Roll Skia from 951123096e55 to 0f974a0f8c10 (5 revisions) (flutter/engine#42771)
https://skia.googlesource.com/skia.git/+log/951123096e55..0f974a0f8c10

2023-06-12 kjlubick@google.com Remove remaining references to GrSlug
2023-06-12 johnstiles@google.com Add a SkSLSwitchCase cpp file.
2023-06-12 michaelludwig@google.com [skif] Cleanup comments missed in Displacement update CL
2023-06-12 cmumford@google.com [bazel] Add PathKit build rule
2023-06-12 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 61c4fb9d6c0c to 2219aacad808 (1 revision)

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,herb@google.com,jacksongardner@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-06-12 16:15:43 +00:00
Jonah Williams
6eb184bed6 [Impeller] opt all vertex shader position/uvs into highp (flutter/engine#42746)
Fixes https://github.com/flutter/flutter/issues/128605

f16 doesn't have enough resolution at large pixel values to be safely used for positions. Opt all shaders into highp. I think we might be able to get away with mediump for uv since values from 0-1 should have plenty of precisision, but we can worry about that later.
2023-06-12 16:11:47 +00:00
gaaclarke
25e060e7bc [Impeller] added debug info to frame debuggers like AGI (flutter/engine#42717)
fixes https://github.com/flutter/flutter/issues/128629

Screenshot of the change in action:
<img width="740" alt="Screenshot 2023-06-09 at 4 30 48 PM"
src="https://github.com/flutter/engine/assets/30870216/3923c992-323b-466c-bab7-18097c6d1ee2">


## 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
2023-06-12 09:11:12 -07:00
skia-flutter-autoroll
efb58b46d9 Roll Skia from 91f5ec62e30b to 951123096e55 (4 revisions) (flutter/engine#42767)
https://skia.googlesource.com/skia.git/+log/91f5ec62e30b..951123096e55

2023-06-12 drott@chromium.org [Fontations] Implement onGetTableData table access
2023-06-12 drott@chromium.org [Fontations] No .0.as_ref() boilerplate, simpler tag conversion
2023-06-12 cmumford@google.com [pathkit] Eliminate compile warnings
2023-06-12 cmumford@google.com [canvaskit] fix path to git-sync-deps

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,herb@google.com,jacksongardner@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-06-12 15:01:35 +00:00
skia-flutter-autoroll
ae7a6b81b6 Roll Skia from c4624cc7135a to 943f70d6f836 (2 revisions) (flutter/engine#42754)
https://skia.googlesource.com/skia.git/+log/c4624cc7135a..943f70d6f836

2023-06-12 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from d2e4270f67b2 to 3a77c42f230d (11 revisions)
2023-06-12 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 76c4b7d0e45f to c5beac3c360b (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,herb@google.com,jacksongardner@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-06-12 05:53:38 +00:00
Jim Graham
0b6d9a337c Reland "add non-rendering operation culling to DisplayListBuilder" (#41463) (flutter/engine#42584)
This reverts commit 01aeff259aa37b93304d5dea20e38302e79bf84a.

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

This PR should fix the blendmode/color analysis that caused failures for https://github.com/flutter/engine/pull/41463 as well as the bounds failures for inverted rectangles that caused failures for https://github.com/flutter/engine/pull/42330 (incorporating the fix from https://github.com/flutter/engine/pull/42556).

The description from the [previous PR](https://github.com/flutter/engine/pull/41463) updated with the new name of the DL property:

---------------------------------
This optimization avoids recording unnecessary render operations that will not affect the output and also eliminates the need for "draw detection" mechanisms like `DlOpSpy` and `CanvasSpy` by remembering if any non-transparent operations were included. The `DlOpSpy` unit tests were updated to check if the results from that object match the new `DisplayList::modifies_transparent_black()` method.

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

In addition, this change will unblock some other Issues:

- https://github.com/flutter/flutter/issues/125318
- https://github.com/flutter/flutter/issues/125403
2023-06-11 21:14:24 +00:00
Tong Mu
57758b70c8 Use ShellTest::Config struct to create Shell (flutter/engine#42332) 2023-06-11 10:38:17 -07:00
skia-flutter-autoroll
69c3465d88 Roll Skia from 5c9cdc4e0b61 to 2bab3a2a2953 (57 revisions) (flutter/engine#42731)
Roll Skia from 5c9cdc4e0b61 to 2bab3a2a2953 (57 revisions)

https://skia.googlesource.com/skia.git/+log/5c9cdc4e0b61..2bab3a2a2953

2023-06-10 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 4a513c734ca6 to 27c917dbec91 (1 revision)
2023-06-10 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 938975820ae4 to 4a513c734ca6 (3 revisions)
2023-06-10 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from 76c4b7d0e45f to aefb2afea477
2023-06-10 johnstiles@google.com Revert "Refactor SkJpegXmp into SkXmp which is more generic."
2023-06-09 johnstiles@google.com Refactor IR helper functions into reusable helper class.
2023-06-09 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 701c5daafb72 to 938975820ae4 (1 revision)
2023-06-09 robertphillips@google.com Disable the BigImageTest on IntelIris655 and IntelIris540 GPUs
2023-06-09 bungeman@google.com Reland "[pdf] Use DW when it is an integer"
2023-06-09 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll Dawn from 6e25bf7674bb to d2e4270f67b2 (10 revisions)
2023-06-09 maryla@google.com Refactor SkJpegXmp into SkXmp which is more generic.
2023-06-09 kjlubick@google.com Move DDL and SkSurfaceCharacterization to include/private/chromium
2023-06-09 johnstiles@google.com Improve WGSL codegen for break-if statements.
2023-06-09 johnstiles@google.com Optimize away logical-not applied to a comparison op.
2023-06-09 michaelludwig@google.com [skif] Update DisplacementMap to use FilterResult and runtime sksl
2023-06-09 robertphillips@google.com Minor refactor of tiled image unit test
2023-06-09 kjlubick@google.com Add codec files back (for now) to public.bzl
2023-06-09 jvanverth@google.com Revert "[graphite] Use SkSpan for YUVATextureProxies and YUVABackendTextures."
2023-06-09 jvanverth@google.com Revert "Add SkSpan constructor that takes const Container&"
2023-06-09 robertphillips@google.com Add clipping to the tiled image unit test
2023-06-09 robertphillips@google.com Restructure tiled image test
2023-06-09 senorblanco@google.com Manually roll Dawn from d7b8efa431ad to 6e25bf7674bb (16 revisions)
2023-06-09 kjlubick@google.com Remove Ganesh code from SkCanvasPriv
2023-06-09 boliu@google.com Null check GrGLBuffer::Make
2023-06-09 jvanverth@google.com [graphite] Use SkSpan for YUVATextureProxies and YUVABackendTextures.
2023-06-09 jvanverth@google.com [graphite] Add TextureFromYUVAImages.
2023-06-09 kjlubick@google.com Move XfermodeInterpretation -> SkBlendModePriv
2023-06-09 kjlubick@google.com [canvaskit] Fix exports in npm
2023-06-09 kjlubick@google.com Remove Ganesh code from SkBlendMode/XferMode
2023-06-09 zzyiwei@google.com Update VkHardwareBufferTest to also fallback for ahb mem type
2023-06-09 kjlubick@google.com Add more files to public.bzl
2023-06-09 bungeman@google.com Revert "[pdf] Use DW when it is an integer"
2023-06-09 kjlubick@google.com Manually Roll Dawn from d7b8efa431ad to 6e25bf7674bb (16 revisions)
2023-06-09 drott@chromium.org [Fontations] Make metrics scale with font variations
2023-06-09 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from bc66167d304a to 8a62b4c44fc9 (11 revisions)
2023-06-09 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 03004105c7e9 to 76c4b7d0e45f (11 revisions)
2023-06-09 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from f24ac179ced6 to eb8ee01a4b8b
2023-06-09 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from dbc2d4fbc1cf to 701c5daafb72 (2 revisions)
2023-06-09 herb@google.com Improve quadratic evaluation at t
2023-06-08 bungeman@google.com [pdf] Use DW when it is an integer
2023-06-08 johnstiles@google.com Remove TArray::reserve_back.
2023-06-08 johnstiles@google.com Convert TArray::reserve_back to reserve_exact throughout Skia.
2023-06-08 johnstiles@google.com Remove unused test file.
2023-06-08 johnstiles@google.com Add support for array-equality and struct-equality expressions.
2023-06-08 jvanverth@google.com Add SkSpan constructor that takes const Container&
2023-06-08 zzyiwei@google.com Fallback to use any available memory type for AHB import
2023-06-08 robertphillips@google.com Add picture-backed images to big image unit test
...
2023-06-11 04:54:13 +00:00
ColdPaleLight
4f49c89943 [Impeller] Improved numerical stability in cubic path boundary calculations (flutter/engine#42720)
fix https://github.com/flutter/flutter/issues/128532

In this commit, we refined the method for calculating cubic path boundaries in CubicPathBoundingPopulateValues function. By adopting an alternative quadratic formula from Numerical Recipes in C (The code is ported from skia's `SkFindUnitQuadRoots`),  we mitigated numerical errors, hence boosting precision and reliability in handling cubic paths.
2023-06-11 04:02:05 +00:00
Jonah Williams
2142fff539 [Impeller] Fix vulkan gradient nan issue. (flutter/engine#42715)
Fixes https://github.com/flutter/flutter/issues/128603

We were hitting a nan issue. GLSL has different relaxed precision semantics than vulkan does, and didn't hit it for some reason.
2023-06-10 17:14:29 +00:00
skia-flutter-autoroll
e95110fbd6 Roll Fuchsia Linux SDK from 1ODZdNPvGxBrgnCzf... to pd1VfyK_WEW6tu8WI... (flutter/engine#42723)
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-06-10 10:28:30 +00:00
gaaclarke
36730c35a9 [Impeller] Added helper messaging around validation usage (flutter/engine#42708)
Adds some helper messages around using validation layers.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-06-09 23:07:51 +00:00
keyonghan
a24de2eaef Fix an archive name in windows_host_engine config (flutter/engine#42709)
Use the correct archive name.
2023-06-09 22:37:59 +00:00
Dan Field
d33b2d4288 Delete WeakPtrFactory from GPUSurfaceVulkanImpeller (flutter/engine#42710)
Should fix https://github.com/flutter/flutter/issues/128618.

This is unused - if it were used we'd have to be careful about deleting the object on the same thread it's created on.
2023-06-09 22:27:46 +00:00
gaaclarke
bf5c52d8af [Impeller] Reland: Added a switch to turn on vulkan (flutter/engine#42669)
relands https://github.com/flutter/engine/pull/42585

## 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-06-09 11:35:29 -07:00
Brandon DeRosier
9d1159855f [Impeller] Add CPU implementations for all color filters (flutter/engine#42692)
Part of https://github.com/flutter/flutter/issues/127232.

Adds a CPU implementation for ColorMatrix and the color space
conversions. Also changes the blend signature for consistency.

These will be necessary to make the mask blur fast path continue working
in the presence of color filters. In general, we can use these to
eliminate a needlessly expensive image-based color filter for the
non-image color sources.
2023-06-09 11:13:05 -07:00
Jonah Williams
71009220e0 [Impeller] add explicit VMA flush to device memory writes. (flutter/engine#42685)
According to my read of the documentation for VMA/Vulkan allocation docs, setting VK_MEMORY_PROPERTY_HOST_COHERENT_BIT means we shouldn't need to flush the memory. nevertheless, this fixes the corruption of host buffers observed in https://github.com/flutter/flutter/issues/124040

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

> VK_MEMORY_PROPERTY_HOST_COHERENT_BIT bit specifies that the host cache management commands [vkFlushMappedMemoryRanges](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkFlushMappedMemoryRanges.html) and [vkInvalidateMappedMemoryRanges](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkInvalidateMappedMemoryRanges.html) are not needed to flush host writes to the device or make device writes visible to the host, respectively.

🤷‍♂️
2023-06-09 17:23:09 +00:00
gaaclarke
2097506136 [Impeller] Makes validation layers flag work for android (flutter/engine#42625)
This builds and links in the validation layers for android. They then
can be turned on or off with a manifest field.

fixes https://github.com/flutter/flutter/issues/123788
depends on https://github.com/flutter/buildroot/pull/741

## 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.
- [ ] 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
2023-06-09 10:22:21 -07:00
Justin McCandless
986c173094 Platform channel for predictive back (flutter/engine#39208)
Adds a platform channel method for enabling/disabling Android's predictive back feature.
2023-06-09 10:06:33 -07:00
Jonah Williams
fb0c47c6ec [Impeller] disable buffer to texture blit for Vulkan. (flutter/engine#42686)
This fixes some f'd up ness in the images. Will need to debug this separately on Android. For now, we can just turn it off in the caps.
2023-06-09 15:53:56 +00:00
Bruno Leroux
0445311a23 [Linux] Return keyboard pressed state (flutter/engine#42346)
## Description

This PR updates the Linux engine in order to answer to keyboard pressed state queries from the framework (as implemented in https://github.com/flutter/flutter/pull/122885).

## Related Issue

Linux engine implementation for https://github.com/flutter/flutter/issues/87391

## Tests

Adds 2 tests.
2023-06-09 11:28:15 +00:00
skia-flutter-autoroll
17cf5bf08b Roll Fuchsia Linux SDK from lPCv1NshK-tvjtLgC... to xqQPG9jnWgD1Dj3FL... (flutter/engine#42694)
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-06-09 08:01:09 +00:00
Mitchell Kember
b1fa42d81e [fuchsia] Bump the target API level to 12, and pass it to fidlc (flutter/engine#42667)
This makes the GN build pass the target Fuchsia API level to fidlc.
Currently it relies on the default of HEAD, meaning all FIDL changes are
immediately visible when the SDK rolls. This was never the intention:
flutter should be targeting a specific API level.

This unblocks https://fxrev.dev/864297 which makes the fidlc --available
flag required, and which uncovered this problem.

I also copied the changes to gen_response_file.py from
https://fxrev.dev/865020 to make it forward --available to fidlc.
2023-06-09 11:56:49 +10:00
Brandon DeRosier
320a689d5e [Impeller] Add tests for foreground blends with mask blurs (flutter/engine#42687)
Part of https://github.com/flutter/flutter/issues/127232.

Both of these tests should be rendering as a clipped and blurred green circle. Making mask blurs interact correctly with color filters is not going to be trivial... These bugs extend beyond the filter graph itself. Want to get some goldens in to compare against.

ForegroundPorterDuffBlend:
![Screenshot 2023-06-08 at 4 58 54 PM](https://github.com/flutter/engine/assets/919017/e5592b35-1054-48f3-91e4-c97136a2ecfd)

ForegroundAdvancedBlend:
![Screenshot 2023-06-08 at 4 58 38 PM](https://github.com/flutter/engine/assets/919017/8de5d12a-6413-4436-aa35-f3a4ef09615f)
2023-06-09 01:15:07 +00:00
godofredoc
dcb764b1d3 Document the use of realm in archives. (flutter/engine#42682)
Add docs for realm propery in the archives of build configuration files.

Bug: https://github.com/flutter/flutter/issues/126121

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-06-09 00:43:12 +00:00
godofredoc
0f80fdedc2 Prevent double upload of benchmarks. (flutter/engine#42683)
The benchmarks have been migrated to v2 but the legacy build is uploading benchmarks even when running on staging.

Bug: https://github.com/flutter/flutter/issues/127678

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-06-08 23:38:03 +00:00
godofredoc
834380cdfa Remove all the uses of master branch in the .ci.yaml file. (flutter/engine#42679)
Master branch is not the default branch in the engine anymore and we should not run any builds on it.

Bug: https://github.com/flutter/flutter/issues/90476

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-06-08 22:31:52 +00:00
godofredoc
b58192e6b1 Replace benchmarks with its v2 version. (flutter/engine#42677)
Benchmarks has been migrated to engine v2 and it is ready to replace the legacy version.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-06-08 22:18:11 +00:00
Brandon DeRosier
3dd6e55e45 [Impeller] Reorder blend filter checks to avoid unnecessary destination snapshot (flutter/engine#42678)
Side quest of https://github.com/flutter/flutter/issues/127232.

Tiny reordering to avoid unnecessary input resolution. :) Happened to notice we were hitting this case while going through some frame captures of reported fidelity issues.

Before:
![Screenshot 2023-06-08 at 1 45 48 PM](https://github.com/flutter/engine/assets/919017/aae28b7d-985d-4f16-9801-c689f8dc6f18)

After:
![Screenshot 2023-06-08 at 1 48 49 PM](https://github.com/flutter/engine/assets/919017/b667a4cd-bcf7-4e3a-98f7-0ed182b7a227)
2023-06-08 22:00:56 +00:00
Brandon DeRosier
81a4a5e34b [Impeller] Specify blend mode on blend filter commands (flutter/engine#42676)
Side quest of https://github.com/flutter/flutter/issues/127232.

This is particularly useful for debugging pipeline blend variations of the blend filter, since we otherwise have to look at the raw pipeline blend ops and figure out and piece together what the blend mode must've been.
2023-06-08 21:58:59 +00:00
Renzo Olivares
8b7818b946 [Linux] composing delta fixes (flutter/engine#42648)
Fixes a few issues with the Linux text editing delta implementation that was causing some issues when composing CJK text.

`im_preedit_changed_cb` dispatches a delta with the delta range set as the current composing region causing a crash when composing because the new composing region range might not yet exist in the `oldText` that the delta is applied to. We should instead send the composing region before the change to the text as that will be the correct range that is being modified in the `oldText`.

`im_preedit_end_cb` dispatches a delta with an empty `oldText`, a not empty `deltaText`, and a delta range of `(-1,-1)` causing a crash when composing ends because the delta range will never be within the range of the text. We should instead send the current text value as the `oldText` and not send a `deltaRange` or `deltaText` since a `(-1,-1)` range essentially means nothing in the text changed.

`im_commit_cb` does not account for the case when we were previously composing when the text was committed. This causes the dispatched delta to have a delta range that always inserts at the current the selection, when it should instead replace the previous composing range. We should account for the case when we are previously composing before committing the text, and dispatch a delta with the previous composing region.

Fixes https://github.com/flutter/flutter/issues/113909
2023-06-08 21:14:01 +00:00
toneyzeng
c659b9a590 Fix: invalid time-point comparison between each from different clock source (flutter/engine#42409)
Sometimes the time point created late will less than the time point create earlier since the CLOCK SOURCE has changed.

We must make sure the  CLOCK SOURCE (fml::TimePoint) is always keep the same while we are testing. 
Corrects the test case is needed before we fix the problem completely.
2023-06-08 21:12:12 +00:00
Jonah Williams
e448fff0da [Impeller] sort all vertex inputs by location. (flutter/engine#42664)
Fixes https://github.com/flutter/flutter/issues/128283

Why doesn't this happen elsewhere? might depend on how spirv compiles shaders or the order they run in. Long term fix is https://github.com/flutter/engine/pull/42628 which computes all offset data in the compiler

![flutter_04](https://github.com/flutter/engine/assets/8975114/645c5db6-4f2f-42f7-af8f-6230bba72b2b)
2023-06-08 17:23:52 +00:00
Zachary Anderson
8e7fbbb8a7 Revert "[Impeller] Added a switch to turn on vulkan" (flutter/engine#42660)
Reverts flutter/engine#42585

Reverting to investigate
https://github.com/flutter/flutter/issues/128484
2023-06-08 09:04:17 -07:00
godofredoc
3539afcbb8 Benchmarks configurations for engine v2. (flutter/engine#42622)
This configuration migrates benchmarks to engine_v2.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-06-08 03:47:34 +00:00
skia-flutter-autoroll
aad7a69125 Roll Skia from 1a3adf848e61 to 8fdbbca7d35d (1 revision) (flutter/engine#42645)
https://skia.googlesource.com/skia.git/+log/1a3adf848e61..8fdbbca7d35d

2023-06-07 kjlubick@google.com Decouple SkShaders from Ganesh backend

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 borenet@google.com,brianosman@google.com,jacksongardner@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-06-08 00:46:39 +00:00
Alexander Aprelev
f3c26172de Roll dart to 3.1.0-180.0.dev (flutter/engine#42638)
Roll dart to 3.1.0-180.0.dev
    
    Changes since last roll
    ```
    bbce07ad394 (tag: 3.1.0-180.0.dev) Version 3.1.0-180.0.dev
    81fc5e710d8 (tag: 3.1.0-179.0.dev) Version 3.1.0-179.0.dev
3b850bb1ace [js-rti] Support legacy types in `is FutureOr` specializer.
    dcac7808518 Update PULL_REQUEST_TEMPLATE.md
    5b3a57908d5 [dart:js_interop] Remove ObjectLiteral
30b9ac9f873 [dds/dap] Don't show skipped tests as passes in debug
adapter output
    79b71c789f6 Use ParameterReference for ChangeParameterType.
bc94e7662be [analyzer] Refactor visitConditionExpression in the const
evaluator.
    cf5168ea339 (tag: 3.1.0-178.0.dev) Version 3.1.0-178.0.dev
7071c65b8c7 Change TransformSetParser.singleKey() to avoid null asserts.
a3399e3616f [analysis_server] Add support for adding imports with
show/hide + update Move to File
    463c7cb5a2f [vm] Support unchecked AsExpressions in the VM
3a598b4c031 [vm, gc] Honor kAllocatablePageSize during promotion and
snapshot reading.
    b84077426ab (tag: 3.1.0-177.0.dev) Version 3.1.0-177.0.dev
    9421ca07994 Delete old debianpackage-linux builder.
    d4c2d659075 Remove unnecessary null check on `initializerType`.
26fd946904e Run CFE presubmit lints with scanner configured for null
safety mode.
    cbd1b8d4943 (tag: 3.1.0-176.0.dev) Version 3.1.0-176.0.dev
    033fa5e684d [build] Remove unused pipes import from vs_toolchain.py
b5ee6fa8885 [vm/ffi] Support native assets in `dart build` with relative
path
    5e8c29e7b68 (tag: 3.1.0-175.0.dev) Version 3.1.0-175.0.dev
    7335116e08a (tag: 3.1.0-174.0.dev) Version 3.1.0-174.0.dev
07f587504b1 Reland "[vm] Migrate FFI callbacks to the new metadata
system."
    369a8312aa4 [ddc] Fix types of constants in legacy libraries
    105f7e17222 (tag: 3.1.0-173.0.dev) Version 3.1.0-173.0.dev
526ce3aba48 Issue 52005. Convert non-exhaustive returning
SwitchStatement to SwitchExpression when followed by throw.
    cc18b250ae8 Bump github/codeql-action from 2.3.5 to 2.3.6
5ff0821b274 [kernel,vm] First-class kernel serialization of FutureOrType
and NullType
8d298292719 Use 'coveringNode' name in RefactoringContext, as it is in
Selection.
    97ec9e95bf8 Convert imported reference completion tests
f92c6da7bf4 [analyzer] Refactor visitAsExpression and visitIsExpression
in the constant evaluator.
    9e196bc7118 Roll gn from 5a004f9427a0 to e3978de3e8da
    7c63a493a22 (tag: 3.1.0-172.0.dev) Version 3.1.0-172.0.dev
88f05965ac4 Issue 52606. Fix AstNodeExtension.nodeCovering() when
selection if at the end of Comment.
09df4e5200b [ddc] Fix dynamic calls of generic methods with new types
    1e1266f8e6c [ddc] Sync dart_library.js from internal
56cb8de9736 Make ParsedUnitResult and ParsedLibraryResult superclasses
of ResolvedUnitResult and ResolvedLibraryResult respectively.
03b2abf78f2 [deps] rev async, dartdoc, ffi, http, leak_tracker, lints,
mockito, test, tools, webdev
29f121126ba [analysis_server] Allow skipping slow benchmarks with env
variable
    ```
2023-06-07 16:28:03 -07:00
skia-flutter-autoroll
e2ea5e6410 Roll Skia from 156542f8bf13 to 1a3adf848e61 (1 revision) (flutter/engine#42644)
https://skia.googlesource.com/skia.git/+log/156542f8bf13..1a3adf848e61

2023-06-07 michaelludwig@google.com [skif] Improve magnifier zoom window with missing content

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 borenet@google.com,brianosman@google.com,jacksongardner@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-06-07 23:19:50 +00:00
skia-flutter-autoroll
93b0156c27 Roll Skia from c5a8c4547f59 to 156542f8bf13 (4 revisions) (flutter/engine#42641)
https://skia.googlesource.com/skia.git/+log/c5a8c4547f59..156542f8bf13

2023-06-07 robertphillips@google.com Disable rotated nearest-neighbor testing in the big image test
2023-06-07 johnstiles@google.com Emit simpler WGSL for-loops when the loop-count is known.
2023-06-07 johnstiles@google.com Add WGSL support for the discard statement.
2023-06-07 johnstiles@google.com Allow assignment to function parameters in WGSL.

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 borenet@google.com,brianosman@google.com,jacksongardner@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-06-07 22:10:20 +00:00
Jason Simmons
08f35fa586 Roll HarfBuzz to 7.3.0 (flutter/engine#42629) 2023-06-07 21:51:10 +00:00
ColdPaleLight
437cbb1154 [Impeller] Corrected the 'texture_coords' computation in 'Geometry::GetPositionUVBuffer' (flutter/engine#42619)
fix https://github.com/flutter/flutter/issues/128328

We need to transform the 'position' first and then divide 'texture_coverage', otherwise the result will be incorrect.

without patch
![66WTKLw7fY](https://github.com/flutter/engine/assets/31977171/6d31138e-0595-4d9c-883e-70a50a5e228d)
with patch
![VAHrQB0HLk](https://github.com/flutter/engine/assets/31977171/0d75e2f8-126e-4ba0-8867-187a311249f4)
2023-06-07 21:44:54 +00:00
skia-flutter-autoroll
6e6dfee6de Roll Skia from 773765ca1dd2 to c5a8c4547f59 (4 revisions) (flutter/engine#42633)
https://skia.googlesource.com/skia.git/+log/773765ca1dd2..c5a8c4547f59

2023-06-07 robertphillips@google.com Expand big image unit test
2023-06-07 jvanverth@google.com [graphite] Clean up BackendTexture.
2023-06-07 michaelludwig@google.com [skif] Update SkLocalMatrixImageFilter to FilterResult system
2023-06-07 robertphillips@google.com Add unit test for large images (take 2)

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 borenet@google.com,brianosman@google.com,jacksongardner@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-06-07 20:59:35 +00:00
godofredoc
ed776ac512 Add global test docs. (flutter/engine#42531)
Adds documentation for the use cases supported by global tests along with their respective configurations.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-06-07 20:52:51 +00:00
Casey Hillers
7507e8dc16 [labeler] Fix to run on flutter/engine (flutter/engine#42634)
Fixes https://github.com/flutter/flutter/issues/128448#issuecomment-1581353250
2023-06-07 20:11:49 +00:00
Bruno Leroux
a3843d747d [iOS] Fix TextInputAction.continueAction sends wrong action to framework (flutter/engine#42615)
## Description

This PR fixes an issue related to text input plugin, on IOS, sending a wrong action string to the engine for `FlutterTextInputActionContinue`.

## Related Issue

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

## Tests

Adds 1 test.
2023-06-07 20:11:47 +00:00