22174 Commits

Author SHA1 Message Date
Chris Bracken
de7c02c2cb [macos] Disable background colour tests (flutter/engine#41904)
These tests are flaky. Until they've been deflaked, disable the
following two tests:
* FlutterEngineTest.BackgroundIsBlack
* FlutterEngineTest.CanOverrideBackgroundColor

Issue: https://github.com/flutter/flutter/issues/124677
2023-05-10 16:03:58 -07:00
Yegor
bdfce08b64 [web] generalize focusability in semantics (flutter/engine#41831)
Introduce 2 new classes for a11y focus management:

* `AccessibilityFocusManager`: a generic class that attaches "focus" and "blur" event handlers, and forwards the events to the framework as `SemanticsAction.didGainAccessibilityFocus` and `SemanticsAction.didLoseAccessibilityFocus` respectively. Provides the `changeFocus` method for the framework to move a11y focus to the target element.
* `Focusable`: a role manager that provides generic focus management functionality to `SemanticsObject`s that don't need anything special.

Rewrites focus management using the above two classes as follows:

* All focusable nodes except text fields and incrementables get the `Focusable` role (all custom focus stuff in `Tappable` was removed and delegated to `Focusable`).
* `Incrementable` uses a custom `<input>` internally and so it cannot use the `Focusable` role. Instead, it uses `AccessibilityFocusManager` to manage the focus on the `<input>` element.

Behavioral changes:

* Fixes https://github.com/flutter/flutter/issues/118737, but more generally fixes all nodes that use the `isFocusable` and `hasFocus` bits.
* `Tappable` only partially implemented focusability (e.g. it didn't generate the respective `SemanticsAction` events). Now by delegating to `Focusable`, it will inherit all the functionality.
* `Incrementable` and `Checkable` (checkboxes, radios, switches) get focus management features for the first time.
* Elements that are not inherently focusable (text, images) can now be focused if semantics requires them to be.
* `TextField` is left alone for now as focus and on-screen keyboard interact with each other in non-obvious ways.
2023-05-10 22:40:20 +00:00
skia-flutter-autoroll
9a60f2897e Roll Skia from 32f4cfc2460b to 1a29bd9a0147 (12 revisions) (flutter/engine#41905)
https://skia.googlesource.com/skia.git/+log/32f4cfc2460b..1a29bd9a0147

2023-05-10 johnstiles@google.com Squelch UBSAN divide-by-zero error.
2023-05-10 jamesgk@google.com [sksl] Rename Program::Inputs to Program::Interface
2023-05-10 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from d36b7c91621a to 28971a855c5f (9 revisions)
2023-05-10 nicolettep@google.com [graphite] Add VulkanDescriptorPool Class
2023-05-10 armansito@google.com [graphite][compute] Initial ComputeTask handling in Device/DrawContext
2023-05-10 drott@chromium.org Roll Fontations dependencies
2023-05-10 johnstiles@google.com Reclaim heap space from mangled-names in Variables.
2023-05-10 johnstiles@google.com Add null guards to intrinsic constant evaluation.
2023-05-10 kjlubick@google.com Move SkSurface factories to SkSurfaces namespace
2023-05-10 johnstiles@google.com Move modifiers-declaration support out of DSLCore.
2023-05-10 jamesgk@google.com Split off BlendFormula to be shared with Graphite
2023-05-10 drott@chromium.org Fix fontations build after 2c322383044e4

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 aaclarke@google.com,brianosman@google.com,djsollen@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-05-10 22:01:13 +00:00
godofredoc
be453d455f Revert "Move linux_license to engine v2." (flutter/engine#41903)
Reverts flutter/engine#41863
2023-05-10 20:52:33 +00:00
hellohuanlin
80c0f9d47f [backdrop_filter]Avoid relying on internal class details (flutter/engine#41873)
The original code creates an internal `class` which is alarming: 

`NSClassFromString(@"_UIVisualEffectBackdropView")`

This PR removes such usage. 

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

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

*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-05-10 20:31:11 +00:00
Mouad Debbar
fdb4e5468d [web] Re-enable history tests on Safari (flutter/engine#41901)
Fixes https://github.com/flutter/flutter/issues/51169
2023-05-10 19:58:05 +00:00
Jim Graham
7fea2b0933 switch from MockCanvas to DisplayListBuilder in layer unit tests (flutter/engine#41889)
Part of an ongoing set of efforts to address https://github.com/flutter/flutter/issues/106448

The layer unittests have been using a MockCanvas class to record the painting of trees of layers and then testing for the expected output.

A while back a similar mechanism was created to compare DisplayList output and to print out a human-friendly version of the differences found, but it was only used in a few tests written at the time it was created and a few since then.

This is the first in a series of PRs that will move all the rest of the unit tests onto the new DL comparison mechanism, starting with the layer types that just do basic drawing. Some of the remaining layers will require creating new hooks in, for instance, the Texture registry, the performance overlay TextBlob generation, etc.
2023-05-10 19:00:18 +00:00
Zachary Anderson
b676910c42 Revert "Move linux fuchsia engine v2 build to prod." (flutter/engine#41902)
Reverts flutter/engine#41865

Failing a framework test on presubmit:
https://github.com/flutter/flutter/pull/126452
2023-05-10 11:46:52 -07:00
godofredoc
adf99b66bf Migrate mac host clang tidy to engine v2. (flutter/engine#41824)
This removes the additional gn command from the ci/lint tool and uses a single gn command.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-10 17:31:31 +00:00
Jonah Williams
ae75a375f2 [Impeller] delete special handling of RRect. (flutter/engine#41872)
The convex path tessellator is more general purpose than the RRect and shouldn't be any slower. BY removing this class, we make it easier to switch to GPU polyline generation and tessellation for convex shapes.
2023-05-10 16:08:17 +00:00
yaakovschectman
e0b8175ef4 Only register top level window message listener upon registering service binding (flutter/engine#41733)
Move registering the `WM_CLOSE` message listener in the engine from
initialization to in response to a message sent from `ServiceBinding`
upon its initialization so that we do not intercept window messages when
there is no binding registered.

Addresses https://github.com/flutter/flutter/issues/126033.

## 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 `///`).
- [ ] 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: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
2023-05-10 07:55:39 -04:00
skia-flutter-autoroll
3023ebde60 Roll Skia from 8c936fb9ba8e to 32f4cfc2460b (27 revisions) (flutter/engine#41891)
https://skia.googlesource.com/skia.git/+log/8c936fb9ba8e..32f4cfc2460b

2023-05-10 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from c441206103b1 to b0f9c01ec303 (6 revisions)
2023-05-10 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from c4d18f21ffde to 48f97fe0593e
2023-05-10 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 07d94082da0b to d36b7c91621a (7 revisions)
2023-05-10 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 0d5474fe31ef to c4d18f21ffde (7 revisions)
2023-05-10 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 9ebfb6b54814 to a62e8dbc3467 (1 revision)
2023-05-09 vmiura@google.com SkStrikeCache: Optimize purging of pinned strikes
2023-05-09 jvanverth@google.com [Direct3D] Check for null mapped pointer in onReadPixels
2023-05-09 brianosman@google.com Remove temporary analytic AA APIs
2023-05-09 scroggo@google.com Reland "Add support for decoding CICPs in Android"
2023-05-09 robertphillips@google.com [graphite] Disable MakeColorSpace_Test in Dawn
2023-05-09 weiyuhuang@google.com fix incorrect check
2023-05-09 johnstiles@google.com Switch to SkNoDestructor<T> instead of allocations.
2023-05-09 kjlubick@google.com Organize fontations Bazel rules to allow stub impls
2023-05-09 jvanverth@google.com [graphite] Add VulkanImageView class.
2023-05-09 brianosman@google.com Force AAA in the canvaskit GMs build script
2023-05-09 jamesgk@google.com [graphite] Account for shader blend mode correctly in precomp
2023-05-09 johnstiles@google.com Remove DSL-based intrinsic functions.
2023-05-09 johnstiles@google.com Remove DSL usage from FunctionCall.
2023-05-09 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 180f3708bf26 to 07d94082da0b (10 revisions)
2023-05-09 lokokung@google.com Update deprecated ShaderModuleWGSLDescriptor.source to .code instead.
2023-05-09 fmalita@chromium.org Add some mesh (drawVertices) samples
2023-05-09 lovisolo@google.com [bazel] //tests/BUILD.bazel: Extract test groups into //tests/testgroups.bzl.
2023-05-09 johnstiles@google.com Reland "Add SkNoDestructor<T> class to Skia."
2023-05-09 johnstiles@google.com Remove DSL usage from RTAdjust fixup code.
2023-05-09 jvanverth@google.com Update Skia Vulkan headers to 1.2.197
2023-05-09 djsollen@google.com Revert "Add support for decoding CICPs in Android"
2023-05-09 brianosman@google.com Revert "Add SkNoDestructor<T> class to Skia."

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 aaclarke@google.com,brianosman@google.com,djsollen@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-05-10 10:48:22 +00:00
Yegor
0e9f0ef05f [web] dialog a11y fixes (flutter/engine#41681)
Fixes two issues in dialog accessibility:

* Fixes https://github.com/flutter/flutter/issues/45207 by setting `role="dialog"` on nodes that have both `scopesRoute` and `namesRoute` set. There's no guarantee that this combination of flags is an actual dialog, but it's close enough, and it makes the screen reader announce the appearance of the dialog. Note that `scopesRoute` alone is not sufficient, because Flutter uses it for overlays that are not semantically dialogs, such as dismiss barriers.
* Fixes an issue with focus management, where focus fails to transfer to background content after the dialog is dismissed. This happened because `EngineSemanticsOwner._semanticsTree` retained descendants of parents that were removed. This is benign in many cases. However, for focus this is problematic because the HTML element can go away and come back (losing focus along the way), but its corresponding `SemanticsObject` is never marked as "dirty" and fails to update and request focus.

I'm hoping this is sufficient to fix b/251839784 as well. Will work with the relevant team to find out.
2023-05-10 05:02:22 +00:00
Jonah Williams
4422323e7d [Impeller] Increase minimum size of alpha glyph atlas. (flutter/engine#41880)
Fixes https://github.com/flutter/flutter/issues/122839
Fixes https://github.com/flutter/flutter/issues/126103

Unlike Skia which starts with 2048x2048, I decreased the size of 1024x1024. Now that we'll never switch this to a color bitmap, the memory impact is dramatically lessened.
2023-05-10 01:29:22 +00:00
Jonah Williams
57ba44806f [Impeller] Use separate atlases and shaders for color and alpha (flutter/engine#41780)
Creates a separate atlas context and cache for color and alpha bitmap glyphs. Removes SDF shader and uses separate shader for full color glyphs.

Requires https://github.com/flutter/engine/pull/41754

Fixes https://github.com/flutter/flutter/issues/116818
Fixes https://github.com/flutter/flutter/issues/126101

This also fixes https://github.com/flutter/engine/pull/39383 but for light text on a dark background. This problem crops up when we switch to a full color atlas. In this context, the chosen glyph color is important. But with the alpha channel only atlas, its irrelevant.

See diff:

![image](https://user-images.githubusercontent.com/8975114/236598809-f4434764-cd16-4489-9644-4e9a370de7ee.png)

Example app:

```dart
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

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

void main() =>
  runApp(
    Container(
      alignment: Alignment.center,
     child: Text(
      '''
 (Unicode Conference)، الذي سيعقد في 10-12 آذار 1997 بمدينة مَايِنْتْس، ألمانيا. و سيجمع المؤتمر بين خبراء من كافة قطاعات الصناعة على الشبكة العالمية انترنيت ويونيكود، حيث ستتم، على الصعيدين الدولي والمحلي على حد سواء مناقشة سبل استخدام يونكود في النظم القائمة وفيما يخص التطبيقات الحاسوبية، الخطوط، تصميم النصوص والحوسبة متعددة اللغات.

مَمِمّمَّمِّ😀 😃 😄 😁 😆''',
textDirection: TextDirection.rtl, style: TextStyle(fontSize: 24, color: Colors.white),
     ),
    ),
  );

```
2023-05-10 00:12:04 +00:00
godofredoc
976cbf40b2 Move linux fuchsia engine v2 build to prod. (flutter/engine#41865)
This build has been running on prod for a few days already and it is ready to get moved to prod.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-10 00:00:16 +00:00
Jackson Gardner
3c85b2e565 Implement text rendering in Skwasm (flutter/engine#41832)
This implements full text rendering with the Skwasm renderer.

The font fallback logic has been refactored to decouple the font fallback manager from any CanvasKit-specific types and functions.

A chunk of CanvasKit text rendering tests have been ported over to the renderer-agnostic `ui` tests.

Fixes https://github.com/flutter/flutter/issues/126339
2023-05-09 23:37:21 +00:00
skia-flutter-autoroll
feb10e41a7 Roll Fuchsia Linux SDK from leCRDVJ8szOS2LsPV... to lf8VcONMWlne4oa3H... (flutter/engine#41876)
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 aaclarke@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-05-09 23:26:58 +00:00
gaaclarke
16d9aa190a [Impeller] started cleaning up pools when devices are deleted (flutter/engine#41857)
fixes https://github.com/flutter/flutter/issues/125571

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-09 22:44:07 +00:00
godofredoc
41861533e6 Move linux_license to engine v2. (flutter/engine#41863)
Linux license v2 builds has been running successfully for a few days and it is ready to get moved to prod.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-09 21:32:12 +00:00
godofredoc
83f8f118fc Replace Windows Unopt with the engine v2 version. (flutter/engine#41861)
Both builds have been running successfully. This PR moves Windows Unopt to staging and Windows windows_unopt to prod.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-09 20:12:19 +00:00
Michael Ludwig
3d9ad5fccb Remove staging flag (flutter/engine#41843)
Unit tests have been fixed by @flar, so the staging flag can be removed.

Unlocks progress on https://skbug.com/9283

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-09 19:32:10 +00:00
Jonah Williams
d64bc16426 [Impeller] track path convexity and use it to simplify fill tessellation. (flutter/engine#41834)
We can do this on the GPU, but we'll need a fallback when we don't have polyline compute.

From experimentation, Skia has already computed this value when Impeller gets that path. Additionally, this will allow us to speed up tessellation of known convex shapes like ovals that we don't want to add special cases for in the API.
2023-05-09 18:45:00 +00:00
skia-flutter-autoroll
af593c9777 Roll Skia from 9ba374e0b0f0 to 8c936fb9ba8e (7 revisions) (flutter/engine#41854)
https://skia.googlesource.com/skia.git/+log/9ba374e0b0f0..8c936fb9ba8e

2023-05-09 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from dd7eb1d8e8dc to c441206103b1 (22 revisions)
2023-05-09 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from f76fc9bcab58 to 0d5474fe31ef (4 revisions)
2023-05-09 drott@chromium.org Implement path rendering and advances for Fontations-backed SkTypeface
2023-05-09 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from 53e721afe0c5 to 569699725145 (13 revisions)
2023-05-09 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from 0d5474fe31ef to 56f5bfdeb042
2023-05-09 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from ecefa6c65969 to 9ebfb6b54814 (1 revision)
2023-05-09 alecmouri@google.com Add support for decoding CICPs in Android

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,djsollen@google.com,jimgraham@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-05-09 13:40:25 +00:00
skia-flutter-autoroll
25fc603724 Roll Skia from 485cd3d0f9ca to 9ba374e0b0f0 (3 revisions) (flutter/engine#41849)
https://skia.googlesource.com/skia.git/+log/485cd3d0f9ca..9ba374e0b0f0

2023-05-09 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from c6eb70963cbd to 180f3708bf26 (7 revisions)
2023-05-09 lovisolo@google.com [bazel] Fix Android Vulkan build.
2023-05-09 herb@google.com Small cleanups in underline and glyph code

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,djsollen@google.com,jimgraham@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-05-09 07:19:22 +00:00
godofredoc
b10a10fb30 Increase timeout of orchestrator. (flutter/engine#41839)
Increase timeout of the orchestrator to ensure it has enough time to process the subbuild results with a 1h timeout.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-09 02:43:27 +00:00
Ian McKellar
4579687380 [fuchsia] Stop calling FIDL from Dart in Flutter integration tests (flutter/engine#41669)
As we move the Dart FIDL bindings we need to stop calling FIDL methods
from Dart in the Flutter repo. This only affects some integration tests.

This moves the FIDL calls into C++ and uses platform messages to make
the functionality available to the Dart tests.
2023-05-09 11:34:21 +10:00
drwez
de642efdac [tests] Remove unused fuchsia.sys protocol reference (flutter/engine#41826)
Remove reference to unused fuchsia.sys.Environment protocol in test
Realm setup. Besides being unused,
the reference was not correctly matched by an #include, nor a GN build
dependency.

Bug: fxbug.dev/81285
2023-05-09 11:34:08 +10:00
skia-flutter-autoroll
ea05cfbe53 Roll Skia from 7736fbaf84f0 to 485cd3d0f9ca (6 revisions) (flutter/engine#41840)
https://skia.googlesource.com/skia.git/+log/7736fbaf84f0..485cd3d0f9ca

2023-05-08 johnstiles@google.com Add SkNoDestructor<T> class to Skia.
2023-05-08 johnstiles@google.com Generate simpler code for sk_Clockwise in SPIR-V.
2023-05-08 johnstiles@google.com Eliminate DSLBlock class.
2023-05-08 kjlubick@google.com [base] Move SkSpinlock and SkSharedMutex to src/base
2023-05-08 johnstiles@google.com Eliminate most DSL statement support.
2023-05-08 johnstiles@google.com Simplify Perlin noise chained-if block.

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,djsollen@google.com,jimgraham@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-05-09 01:31:30 +00:00
gaaclarke
dab253347f [Impeller] introduces DeviceHolder to avoid accessing a dead Device (flutter/engine#41748)
An alternative to https://github.com/flutter/engine/pull/41527

This introduces a new protocol called `DeviceHolder` whose only purpose is to return a pointer to a device.  That way people can hold onto weak_ptr's to the `DeviceHolder` and know to abort further work once the Device is deleted (like loading pipelines on a background thread).  This PR also changes the return type of ContextVK::GetDevice from returning a reference to a pointer as a hope to better communicate what is happening and discourage copying of the vk::Device.

I would actually recommend abolishing holding onto instance variables of the vk::Device since it isn't clear that that is just a raw pointer.  That's sort of how we got into this problem.

fixes https://github.com/flutter/flutter/issues/125522
fixes https://github.com/flutter/flutter/issues/125519
~~fixes https://github.com/flutter/flutter/issues/125571~~

Testing: Fixes flake in existing tests.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-09 00:11:05 +00:00
Jackson Gardner
5c98a397a2 Get rid of "outrageous" default text styles for HTML renderer. (flutter/engine#41822)
The CanvasKit renderer doesn't do this, so we should just remove the red text global style.
2023-05-08 22:59:21 +00:00
Jim Graham
027010d27e Adjust DL filter bounds tests to not rely on exact Skia results (flutter/engine#41792)
These tests break under Skia's new behaviors when evaluating the bounds of ill-defined filtering operations such as ColorFilters that affect even transparent pixels.

The Flutter engine is currently building with a backwards compatibility flag which we should be able to remove with the new versions of these tests.
2023-05-08 21:52:29 +00:00
Jonathan Cole
cb8854c7d6 [Android] Fix incorrect viewInsets during keyboard animation with EdgeToEdge (flutter/engine#39391)
Currently during the keyboard animation, the navigation bar insets are subtracted from the keyboard insets. This is correct when the app isn't laid out behind the navigation bar, but results in incorrect viewInsets when the app's running in edge-to-edge or fullscreen.

This change checks if the app is being laid out behind the navigation bar and adjusts the bottom insets accordingly during the keyboard animation.

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

Tested on Android 13 (Pixel 7) using the code sample here: https://github.com/flutter/flutter/issues/109623

### Before

https://user-images.githubusercontent.com/20386860/216786596-24c764b1-a71c-42cf-97a2-3ba10b717819.mp4

### After

https://user-images.githubusercontent.com/20386860/216786591-155ec6a6-b3c5-41e0-a45f-169861077ce2.mp4
2023-05-08 19:57:47 +00:00
skia-flutter-autoroll
d39e16fe16 Roll Skia from 30a368d502bf to 951eb9653163 (4 revisions) (flutter/engine#41820)
https://skia.googlesource.com/skia.git/+log/30a368d502bf..951eb9653163

2023-05-08 johnstiles@google.com Remove Switch support from DSL entirely.
2023-05-08 johnstiles@google.com Simplify parser handling of expressions.
2023-05-08 kjlubick@google.com Manually Roll Dawn from 2966d3ad08eb to 53e721afe0c5 (63 revisions)
2023-05-08 johnstiles@google.com Reland "Prevent name collisions between variables and 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,djsollen@google.com,jimgraham@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-05-08 18:39:22 +00:00
Jackson Gardner
16360e9e25 Reland "Skwasm Font Loading (flutter/engine#41756)
This relands https://github.com/flutter/engine/pull/41246, which had to be reverted due to some issues parsing the font manifest.
2023-05-08 18:17:22 +00:00
skia-flutter-autoroll
beaa48ebd1 Roll Skia from 64ba57381c94 to 30a368d502bf (1 revision) (flutter/engine#41816)
https://skia.googlesource.com/skia.git/+log/64ba57381c94..30a368d502bf

2023-05-08 johnstiles@google.com Eliminate DSLCase from the parser.

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,djsollen@google.com,jimgraham@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-05-08 16:45:30 +00:00
godofredoc
2798660077 Add linux license engine v2 build. (flutter/engine#41797)
This adds the initial configuration and its builder as bringup.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-08 16:42:19 +00:00
godofredoc
a71dc62a37 Windows unopt configuration. (flutter/engine#41785)
This PR also add a standalone folder to the build configurations folder. This is to separate configurations that require orchestrators from the ones the do not require them.

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

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-08 16:42:17 +00:00
godofredoc
12172ca91d Linux fuchsia engine v2 config. (flutter/engine#41759)
Engine V2 configuration for fuchsia builds.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-08 15:55:12 +00:00
skia-flutter-autoroll
b2472bfd4f Roll Skia from 5f7e572995b1 to 64ba57381c94 (1 revision) (flutter/engine#41814)
https://skia.googlesource.com/skia.git/+log/5f7e572995b1..64ba57381c94

2023-05-08 kjlubick@google.com Don't define SkSurface::MakeRenderTarget when there is no GPU 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 brianosman@google.com,djsollen@google.com,jimgraham@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-05-08 13:19:36 +00:00
Michael Goderbauer
43516df2d1 Fix doc to fix engine roll (flutter/engine#41812)
The engine roll is currently failing (https://cirrus-ci.com/task/5475027185827840?logs=main#L172) because of a doc issue introduced by https://github.com/flutter/engine/pull/41685. This fixes the doc issue.
2023-05-08 10:57:19 +00:00
dependabot[bot]
f149ea298c Bump github/codeql-action from 2.3.2 to 2.3.3 (flutter/engine#41811)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.3.2 to 2.3.3.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/github/codeql-action/blob/main/CHANGELOG.md">github/codeql-action's changelog</a>.</em></p>
<blockquote>
<h1>CodeQL Action Changelog</h1>
<h2>[UNRELEASED]</h2>
<p>No user facing changes.</p>
<h2>2.3.3 - 04 May 2023</h2>
<ul>
<li>Update default CodeQL bundle version to 2.13.1. <a href="https://redirect.github.com/github/codeql-action/pull/1664">#1664</a></li>
<li>You can now configure CodeQL within your code scanning workflow by passing a <code>config</code> input to the <code>init</code> Action. See <a href="https://aka.ms/code-scanning-docs/config-file">Using a custom configuration file</a> for more information about configuring code scanning. <a href="https://redirect.github.com/github/codeql-action/pull/1590">#1590</a></li>
<li>Updated the SARIF 2.1.0 JSON schema file to the latest from <a href="123e95847b/Schemata/sarif-schema-2.1.0.json">oasis-tcs/sarif-spec</a>. <a href="https://redirect.github.com/github/codeql-action/pull/1668">#1668</a></li>
</ul>
<h2>2.3.2 - 27 Apr 2023</h2>
<p>No user facing changes.</p>
<h2>2.3.1 - 26 Apr 2023</h2>
<p>No user facing changes.</p>
<h2>2.3.0 - 21 Apr 2023</h2>
<ul>
<li>Update default CodeQL bundle version to 2.13.0. <a href="https://redirect.github.com/github/codeql-action/pull/1649">#1649</a></li>
<li>Bump the minimum CodeQL bundle version to 2.8.5. <a href="https://redirect.github.com/github/codeql-action/pull/1618">#1618</a></li>
</ul>
<h2>2.2.12 - 13 Apr 2023</h2>
<ul>
<li>Include the value of the <code>GITHUB_RUN_ATTEMPT</code> environment variable in the telemetry sent to GitHub. <a href="https://redirect.github.com/github/codeql-action/pull/1640">#1640</a></li>
<li>Improve the ease of debugging failed runs configured using <a href="https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning-for-a-repository#configuring-code-scanning-automatically">default setup</a>. The CodeQL Action will now upload diagnostic information to Code Scanning from failed runs configured using default setup. You can view this diagnostic information on the <a href="https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-the-tool-status-page">tool status page</a>. <a href="https://redirect.github.com/github/codeql-action/pull/1619">#1619</a></li>
</ul>
<h2>2.2.11 - 06 Apr 2023</h2>
<p>No user facing changes.</p>
<h2>2.2.10 - 05 Apr 2023</h2>
<ul>
<li>Update default CodeQL bundle version to 2.12.6. <a href="https://redirect.github.com/github/codeql-action/pull/1629">#1629</a></li>
</ul>
<h2>2.2.9 - 27 Mar 2023</h2>
<ul>
<li>Customers post-processing the SARIF output of the <code>analyze</code> Action before uploading it to Code Scanning will benefit from an improved debugging experience. <a href="https://redirect.github.com/github/codeql-action/pull/1598">#1598</a>
<ul>
<li>The CodeQL Action will now upload a SARIF file with debugging information to Code Scanning on failed runs for customers using <code>upload: false</code>. Previously, this was only available for customers using the default value of the <code>upload</code> input.</li>
<li>The <code>upload</code> input to the <code>analyze</code> Action now accepts the following values:
<ul>
<li><code>always</code> is the default value, which uploads the SARIF file to Code Scanning for successful and failed runs.</li>
<li><code>failure-only</code> is recommended for customers post-processing the SARIF file before uploading it to Code Scanning. This option uploads debugging information to Code Scanning for failed runs to improve the debugging experience.</li>
<li><code>never</code> avoids uploading the SARIF file to Code Scanning even if the code scanning run fails. This is not recommended for external users since it complicates debugging.</li>
<li>The legacy <code>true</code> and <code>false</code> options will be interpreted as <code>always</code> and <code>failure-only</code> respectively.</li>
</ul>
</li>
</ul>
</li>
</ul>
<h2>2.2.8 - 22 Mar 2023</h2>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="29b1f65c5e"><code>29b1f65</code></a> Merge pull request <a href="https://redirect.github.com/github/codeql-action/issues/1669">#1669</a> from github/update-v2.3.3-318bcc7f8</li>
<li><a href="140500d80a"><code>140500d</code></a> Update changelog for v2.3.3</li>
<li><a href="318bcc7f84"><code>318bcc7</code></a> Merge pull request <a href="https://redirect.github.com/github/codeql-action/issues/1664">#1664</a> from github/update-bundle/codeql-bundle-20230428</li>
<li><a href="f72bf5dfb3"><code>f72bf5d</code></a> Fix workflow formatting</li>
<li><a href="33461954a5"><code>3346195</code></a> Merge branch 'main' into update-bundle/codeql-bundle-20230428</li>
<li><a href="8ca5570701"><code>8ca5570</code></a> Merge pull request <a href="https://redirect.github.com/github/codeql-action/issues/1666">#1666</a> from github/aeisenberg/readme-update</li>
<li><a href="b1b3d00b62"><code>b1b3d00</code></a> Add link to changenote for custom config</li>
<li><a href="d2f6dfd52d"><code>d2f6dfd</code></a> Merge pull request <a href="https://redirect.github.com/github/codeql-action/issues/1665">#1665</a> from github/aeisenberg/config-param</li>
<li><a href="cba5616040"><code>cba5616</code></a> Update CHANGELOG.md</li>
<li><a href="40c95932fe"><code>40c9593</code></a> Add changelog note</li>
<li>Additional commits viewable in <a href="f3feb00acb...29b1f65c5e">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github/codeql-action&package-manager=github_actions&previous-version=2.3.2&new-version=2.3.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>
2023-05-08 09:41:22 +00:00
skia-flutter-autoroll
43d503225e Roll Skia from 148ebc0596b7 to f9bef8f7bdb5 (1 revision) (flutter/engine#41806)
https://skia.googlesource.com/skia.git/+log/148ebc0596b7..f9bef8f7bdb5

2023-05-08 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 5894e1e3e47d to f76fc9bcab58 (10 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,djsollen@google.com,jimgraham@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-05-08 06:59:23 +00:00
Dan Field
ea5131772d Add a Display API to dart:ui that reports the physical size, DPR, and refresh rate of the main display (flutter/engine#41685)
Fixes https://github.com/flutter/flutter/issues/123307 - for Android, iOS, and Web, for the main display only (https://github.com/flutter/flutter/issues/125938 tracks supporting multiple displays, https://github.com/flutter/flutter/issues/125939 for desktop).

Desktop will need to be implemented for this, but given priority for a couple of our customers targetting foldable devices on Android I'm inclined to get this in before desktop can be finished.

The main concern for this right now is that on some Android foldable devices, setting a preferred orientation will cause letterboxing and the `MediaQuery` will _never_ get the full screen size when unfolded. This causes apps to think the screen is smaller than it is, as they've mainly been using `MediaQueryData.size` to figure this out. Android's recommendation is to not set a preferred orientation, and if you must to use the new method introduced in `ViewUtil.java` to calculate the maximal window size.
2023-05-06 18:28:22 +00:00
Jonah Williams
aa966cb2f1 [Impeller] remove SDF code paths. (flutter/engine#41754)
From my investigations, we're not likely to be able to use SDF in the near term. To make planned refactors of the text rendering easier to land, I've moved the primary piece of code for generating the SDFs into a new TU for testing.

The shader itself has been deleted so that we don't ship + register it.
2023-05-05 23:43:03 +00:00
skia-flutter-autoroll
2ef6ee34aa Roll Fuchsia Linux SDK from jbpFz7qSikrKiRanC... to leCRDVJ8szOS2LsPV... (flutter/engine#41788)
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 jimgraham@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-05-05 23:23:24 +00:00
skia-flutter-autoroll
5ded91dab7 Roll Skia from aa52cd1afae2 to bc0197405951 (3 revisions) (flutter/engine#41787)
https://skia.googlesource.com/skia.git/+log/aa52cd1afae2..bc0197405951

2023-05-05 johnstiles@google.com Revert "Prevent name collisions between variables and intrinsics."
2023-05-05 jlavrova@google.com Making ParagraphBuilder API for Client ICU public
2023-05-05 johnstiles@google.com Remove unused accessors from ThreadContext.

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,bungeman@google.com,jimgraham@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-05-05 23:19:21 +00:00
skia-flutter-autoroll
abf9a42c2d Roll Skia from d6149a13d696 to aa52cd1afae2 (3 revisions) (flutter/engine#41783)
https://skia.googlesource.com/skia.git/+log/d6149a13d696..aa52cd1afae2

2023-05-05 johnstiles@google.com Prevent name collisions between variables and intrinsics.
2023-05-05 jlavrova@google.com Changing tests after harfbuzz update
2023-05-05 jlavrova@google.com Fixing getLineNumberAt method

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,bungeman@google.com,jimgraham@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-05-05 20:11:10 +00:00
Jason Simmons
87a63996d7 [Impeller] Do not free a Vulkan command buffer if its command pool has already been destroyed (flutter/engine#41761)
Fixes https://github.com/flutter/flutter/issues/125519
2023-05-05 18:49:57 +00:00
Tong Mu
05036058d7 Remove single window assumption from SceneBuilder (flutter/engine#41559)
This PR fixes https://github.com/flutter/flutter/issues/112202. `Scene`
is no longer tied to views, but receives method arguments for view
properties, clearing the path to multiview Flutter.

`Scene` no longer creates a `LayerTree` on construction, but only part
of the config. When a output method is called (`toImage`, `toImageSync`,
or `takeLayerTree`), the `LayerTree` is constructed on the spot. In this
way, all `LayerTree`s return to being `unique_ptr`s instead of
`shared_ptr`s, reverting part of
https://github.com/flutter/engine/pull/35608 . And `Scene` no longer
needs to disfunction after one `takeLayerTree`, since the layer tree
config is never really taken away.

A `device_pixel_ratio` is now added to the parameter list of `Engine::Render` and `Animator::Render`.

## 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-05-05 11:25:55 -07:00