1203 Commits

Author SHA1 Message Date
Zachary Anderson
d72727e744 Remove --enable-software-rendering from iOS scenario tests (flutter/engine#45093) 2023-08-25 20:29:05 +00:00
Ian Hickson
f9a5c26a42 FontVariation.lerp, custom FontVariation constructors, and more documentation (flutter/engine#45030)
This should aid with implementing the framework side of https://github.com/flutter/flutter/issues/105120.
This should also address https://github.com/flutter/flutter/issues/28543.

Original commit in https://github.com/flutter/engine/pull/43750 was reverted in https://github.com/flutter/engine/pull/44993.
Second attempt in https://github.com/flutter/engine/pull/44996 was reverted in https://github.com/flutter/engine/pull/45023.
2023-08-25 05:54:08 +00:00
Jim Graham
5a9d0ee712 Reland "Split DisplayListBuilder into DlCanvas optimizer and DlOp recorder classes #44718" (flutter/engine#45085)
Fixes: https://github.com/flutter/flutter/issues/133200
2023-08-25 00:22:14 +00:00
Zachary Anderson
ad1a04dea2 Revert "FontVariation.lerp, custom FontVariation constructors, and more documentation" (flutter/engine#45023)
Reverts flutter/engine#44996

Analysis failures on rolling to the framework
https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20analyze/62884/overview
2023-08-23 14:36:08 -07:00
Michael Ludwig
9cec508891 Use decal TileMode in blur image_filter_test.dart (flutter/engine#45004)
The expected color values appear to match the output of Skia's raster
backend's blur. Historically, that doesn't support any tile mode other
than decal, so while the `makeBlur()` function defaulted to clamp
tiling, the output was decal and thus showed the blur fading to
transparent.

The test draws a 1x1 green rectangle in the center of a 3x3 image. Clamp
tiling would actually cause the output of the blur to just copy the
central green color to the remaining 8 pixels. This is the output of
Skia's GPU blur. I am working to land changes in Skia that make the
raster backend handle all tile modes, which then has it match the
existing GPU blur's behavior of a constant output for clamp tiling in
this test (so it then fails).

Decal tiling appears to be more useful for this test case anyways
because it creates per-pixel variations that can be validated against.

This is needed to land Skia-side fixes for skbug.com/40039877 and
skbug.com/40039025

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide] and the [C++,
Objective-C, Java style guides].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I added new tests to check the change I am making or feature I am
adding, or 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-23 14:32:50 -04:00
Ian Hickson
190343a2bb FontVariation.lerp, custom FontVariation constructors, and more documentation (flutter/engine#44996)
This should aid with implementing the framework side of https://github.com/flutter/flutter/issues/105120.
This should also address https://github.com/flutter/flutter/issues/28543.

This is a reland of https://github.com/flutter/engine/pull/43750 with two changes, one to fix a typo mentioned in https://github.com/flutter/engine/pull/43750#issuecomment-1689299114, and one to fix the analysis error found when rolling this to the framework (https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20analyze/62845/overview). The latter change is temporary and can be relaxed when FontVariations is reexported from dart:ui. I plan to do that when fixing https://github.com/flutter/flutter/issues/105120.
2023-08-23 18:05:53 +00:00
Zachary Anderson
c187b9fcfd Revert "FontVariation.lerp, custom FontVariation constructors, and more documentation" (flutter/engine#44993)
Reverts flutter/engine#43750

Looks like this is having trouble rolling into the framework: https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20analyze/62845/overview
2023-08-23 05:55:13 +00:00
Ian Hickson
2a18cbd604 FontVariation.lerp, custom FontVariation constructors, and more documentation (flutter/engine#43750)
This should aid with implementing the framework side of https://github.com/flutter/flutter/issues/105120 This should also address https://github.com/flutter/flutter/issues/28543.
2023-08-23 03:35:20 +00:00
Jim Graham
5fa5cb698e Revert "Split DisplayListBuilder into DlCanvas optimizer and DlOp recorder classes" (flutter/engine#44968)
Reverts flutter/engine#44718

A rendering issue was discovered in internal testing (b/296975714)
2023-08-22 19:14:48 +00:00
LongCatIsLooong
649a1e181c Reland "Implementing TextScaler for nonlinear text scaling (#42062)" (flutter/engine#44907)
The original PR crashes because of a JNI signature mismatch (`(FJ)F` -> `(FI)F`). Update the signature in a415da5619

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-21 23:16:10 +00:00
Brian Osman
41be06b59f Include GrVkTypes where necessary (flutter/engine#44916)
IWYU fix to be able to use GrVkImageInfo. An incoming Skia change will otherwise fail to compile here.
2023-08-21 19:50:04 +00:00
Jim Graham
5774ccf84f Split DisplayListBuilder into DlCanvas optimizer and DlOp recorder classes (flutter/engine#44718)
DisplayListBuilder grew over time from a class that implemented a developer-unfriendly stateful API into one that implemented both the developer-friendly DlCanvas API as well as its original stateful API. Over time, the stateful API was buried under a "testing only" facade.

In the meantime, the optimization features that it applies to the DlCanvas calls before it records the operations in a DlOp store are useful without the recording process and so I've been wanting to break those into 2 parts for a while with the goal of removing all stateful APIs from DisplayListBuilder (see https://github.com/flutter/flutter/issues/108303).

This PR takes a major step along that direction by splitting DisplayListBuilder into essentially a convenience class that marries 2 new classes together to achieve its old functionality:
- `DlCanvasToReceiver` - a class that implements DlCanvas, optimizes common situations, and then sends commands to any object that implements `DlOpReceiver`
- `DlOpRecorder` - an implementation of DlOpReceiver that records the operations in a buffer from which to create a `DisplayList` object
- `DisplayListBuilder` now inherits from DlCanvasToReceiver to get the optimizations and provides it with an instance of `DlOpRecorder` as the receiver that it will send its results to
- Similarly, a `DlCanvasToReceiver` instance could be directed to an `impeller:DlDispatcher` to achieve a more straight-through path from the DlCanvas interface to impeller Pictures.
2023-08-21 07:17:19 +00:00
Jonah Williams
6f3b341232 Revert "Implementing TextScaler for nonlinear text scaling" (flutter/engine#44882)
Reverts flutter/engine#42062

Failing due to:

>>>>>>>> 08-18 15:59:41.350 3439 3484 E flutter :
[ERROR:flutter/shell/platform/android/platform_view_android_jni_impl.cc(902)]
Could not locate FlutterJNI#getScaledFontSize method
>>>>>>>> 08-18 15:59:41.350 3439 3484 F flutter :
[FATAL:flutter/shell/platform/android/library_loader.cc(26)] Check
failed: result.
2023-08-20 14:10:13 -07:00
LongCatIsLooong
7d07749fdd Implementing TextScaler for nonlinear text scaling (flutter/engine#42062)
`platformTextScaler` doesn't need to be per window, assuming the SP -> DiP mapping is always the same on the same device (unless the user changes the preference), and does not depend on the display device's pixel density (it's confirmed).

Design doc: https://docs.google.com/document/d/1-DlElw3zWRDlqoc9z4YfkU9PbBwRTnc7NhLM97ljGwk/edit#

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-18 22:22:16 +00:00
Dan Field
0d8aebd040 Revert "Make run_tests.py assert that the ios test dylib is at least as new as libFlutter.dylib" (flutter/engine#44690)
Reverts flutter/engine#41720

Fixes https://github.com/flutter/flutter/issues/131899
2023-08-14 18:36:02 +00:00
LongCatIsLooong
eb3946ff27 allow ParagraphBuilder.shouldDisableRoundingHack to actually be set to false in tests (flutter/engine#44647)
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-11 23:04:57 +00:00
LongCatIsLooong
e156901deb Disable text rounding hack by default (flutter/engine#44544)
This depends on https://github.com/flutter/flutter/pull/132094 and customer_testing migration.

I'll announce this change and add a g3 fix after this lands.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-10 01:44:23 +00:00
Jason Simmons
2ae4942db0 Use the Clang unreachable code warning flag in the engine tree (flutter/engine#44458) 2023-08-08 17:40:03 +00:00
Jason Simmons
0413e2710d Revert "[Impeller] DlCanvas implementation wrapping Aiks canvas" (flutter/engine#44466)
This reverts commit 1785eb5cb8cba53da249614158065d1d53f8f863.

See https://github.com/flutter/flutter/issues/132071
2023-08-07 23:59:47 +00:00
Brandon DeRosier
e8e4f8c118 [Impeller] Flutter GPU: Add GpuContext. (flutter/engine#44359)
Move the GpuContext to its new home. I added a `flutter_tester` test that just verifies an exception is gracefully thrown when Impeller isn't available.

In a later patch, I'll land a way to eagerly supply the Impeller context on the cpp side to enable testing through the playground (as mentioned in https://github.com/flutter/flutter/issues/127712).
2023-08-07 19:41:57 +00:00
Dan Field
1785eb5cb8 [Impeller] DlCanvas implementation wrapping Aiks canvas (flutter/engine#44248)
Fixes https://github.com/flutter/flutter/issues/130141

The primary goal of this patch is to move dispatching of `dart:ui` `Canvas` commands to the UI thread.

Before this patch, the architecture is something like:

## UI Thread
- `dart:ui` talks to `DisplayListBuilder`, a `DlCanvas` implementation.
- `DisplayListBuilder` does some clip/bounds tracking and creates a `DisplayList` object that is held by `dart:ui`'s `Picture` objects.
- `DisplayList`s are added to `DisplayListLayer`s in `flow`. 

## Raster Thread
- `flow` flattens the various operations into a single `DisplayList` via another `DisplayListBuilder`.
- A `DlOpReceiver`implementation converts that `DisplayList` into an `Aiks` `Canvas`/`Picture`.

After this patch, the architecture instead looks like:

## UI Thread

- No change for Skia.
- If Impeller, use a new `DlCanvasImplementation` that talks to `Aiks`'s `Canvas`.
- If Impeller, `dart:ui` Picture's now hold an `Aiks` `Picture`, which get shared into `AiksLayer`s in `flow`.

## Raster thread

- No change for Skia, but some light refactoring for places that assumed a `DisplayListBuilder` where they really just needed a `DlCanvas`.
- The `Aiks` `Picture`s are combined using new API on `DlCanvas` and still backed by `Aiks`.

These changes show significant improvement on raster times on Android and only very small regressions on UI times in local testing, see https://gist.github.com/dnfield/26528090194c9f5abdbac13cdcbf4f79 for old gallery transition perf numbers.

Many of the other changes in this patch are related to the following:

- Making `DlRTree` usable for Impeller.
  - It would be nice to have a version of DlRTree that speaks `impeller::Rect`.
- Creating the requisite classes to support `EmbeddedViews` so that Desktop works.

This patch does not remove the `impeller::DlDispatcher`, which now would only be used in tests.
2023-08-04 17:35:14 +00:00
Dan Field
528d5bfddc [Impeller] Fail loudly if --enable-software-rendering is used. (flutter/engine#44346)
We have tests today that are trying to testwith impeller but using software rendering, so they're not actually testing with impeller.

In an unrelated patch, I'm causing the request to enable impeller to have additional checks that Impeller related objects/configurations are set when using Impeller, which isn't true if software rendering is enabled, and is causing the tests getting disabled here to fail.

The tests are not actually testing Impeller and thus are getting added to the skip list (they now crash with this change). https://github.com/flutter/flutter/issues/131888 tracks re-enabling them. They will almost certainly need different golden files than the Skia ones.

Fixes https://github.com/flutter/flutter/issues/131887
2023-08-03 23:01:05 +00:00
Chris Bracken
d86ab60601 [darwin] Move common targets to common/BUILD.gn (flutter/engine#44335)
Previously, some common Darwin framework targets existed in: 
//flutter/shell/platform/darwin/BUILD.gn

This moves all targets into:
//flutter/shell/platform/darwin/common/BUILD.gn

The framework_shared target has been renamed framework_common for consistency with the directory name, and flutter_channels_unittests has been renamed framework_common_unittests since it's a reasonable target for adding other tests of common framework code.

We also de-duplicate targets with existing targets.
* The `flutter_channels` target duplicates the existing
`framework_shared` target.
* The `common` target already includes the buffer conversions
translation units,
  which are only used by the iOS embedder.

No test changes since there are no semantic changes, just a
restructuring of build targets.

## 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-08-03 13:21:35 -07:00
Kevin Lubick
ecda6a659e Migrate GL calls of GrBackend* (flutter/engine#44334)
In https://skia-review.googlesource.com/c/skia/+/701398 Skia refactored
GrBackend* to not require #ifdefs. This changes
callsites in Flutter to use static functions instead of methods that
were conditionally compiled on those classes.

There should be no functional change with these. As I was updating these
callsites, I saw uses of the deprecated GrMipMapped enum and used the
updated skgpu::Mipmapped (the former is an alias to the latter).

## 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.
- [ ] 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-03 15:46:14 -04:00
Brandon DeRosier
07c646b28d [Flutter GPU] Export symbols from engine, stub for testing on CI. (flutter/engine#44280)
Part of https://github.com/flutter/flutter/issues/131346

Stubs a minimal test of the FFI utilities that `dart:ui` uses, but using
public symbols exported from the engine library. If this goes well, I'll
move the stuff from `dart:ui` into here and begin landing parts of the
API with test coverage.
2023-08-03 08:11:57 -07:00
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
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
Qun Cheng
58c5cbd17f Add Expanded/Collapsed state for SubmenuButton (flutter/engine#43983)
This PR is to add support for the expanded/collapsed-state semantics flag to the engine. After adding another PR to Flutter, we will be able to support the expanded/collapsed state in semantics for submenu buttons.

Related to [#127617](https://github.com/flutter/flutter/issues/127617) in flutter
2023-07-28 00:49:12 +00:00
Ian Hickson
69ded94b7b Add a breadcrumb for people who want to run the web tests (flutter/engine#43865) 2023-07-21 02:32:11 +00:00
Jason Simmons
a4d8601b57 Fix the rules for determining whether a blur image filter is valid (flutter/engine#43791)
See https://github.com/flutter/flutter/issues/130318
2023-07-19 07:14:06 +00:00
Michael Goderbauer
40c304099d Move ViewConfiguration ownership to FlutterView (flutter/engine#43701)
This makes the FlutterView object a little bit less brittle by not depending on the PlatformDispatcher so much.
2023-07-15 01:21:09 +00:00
Martin Kustermann
0e369e0e4e Use utf8.encode() instead of longer const Utf8Encoder.convert() (flutter/engine#43675)
The change in [0] has propagated now everywhere, so we can use 
`utf8.encode()` instead of the longer `const Utf8Encoder.convert()`.

Also it cleans up code like

```
  Uint8List bytes;
  bytes.buffer.asByteData();
```

as that is not guaranteed to be correct, the correct version would be

```
  Uint8List bytes;
  bytes.buffer.asByteData(bytes.offsetInBytes, bytes.length);
```

a shorter hand for that is:

```
  Uint8List bytes;
  ByteData.sublistView(bytes);
```

[0] https://github.com/dart-lang/sdk/issues/52801
2023-07-14 13:44:54 +02:00
LongCatIsLooong
b7472f9a45 Reland #43118 "Add a flag to ParagraphBuilder for rounding hack migration" (flutter/engine#43647)
real diff: aedc37a3e0

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-07-13 22:30:32 +00:00
LongCatIsLooong
64c139e98a Revert "Add a flag to ParagraphBuilder for rounding hack migration" (flutter/engine#43642)
Reverts flutter/engine#43118

The incorrect default value (`true` instead of  `false`) was used in the PR and that caused internal test failures. I'll add a test before trying to reland.
2023-07-13 17:54:33 +00:00
Ian Hickson
eaca35dd7c Document (and assert) that channel names can't contains nulls (flutter/engine#43593)
Fixes https://github.com/flutter/flutter/issues/116652
2023-07-12 21:44:31 +00:00
LongCatIsLooong
3b27aa3e95 Add a flag to ParagraphBuilder for rounding hack migration (flutter/engine#43118)
The goal is to remove the rounding applied in skparagraph and in the framework: https://github.com/flutter/flutter/issues/31707

The plumbing is done via a new static variable `ParagraphBuilder.shouldDisableRoundingHack` that toggles the rounding behavior in skparagraph and the flag is read by framework code. Application code and test code can either use `ParagraphBuilder.setDisableRoundingHack` or `--dart-define="SKPARAGRAPH_REMOVE_ROUNDING_HACK=1"` to opt-in. 
Once the internal migration is finished the default value of the flag will be set to true.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-07-12 20:36:45 +00:00
Jim Graham
870fc78163 header file cleanup focusing on removing unnecessary SkPicture includes (flutter/engine#43589)
Most of the #include directives for SkPicture are removed except where they are still functional. Many comments rewritten to no longer be SkPicture-centric.

- DL unit tests still use it for consistency testing
- rasterizer/engine still use it for screen shot support
- Fuchsia still uses it extensively
2023-07-12 08:17:06 +00:00
Zachary Anderson
8e4206c239 Run linux_unopt on a machine with more cores (flutter/engine#43473)
The unit tests can run in parallel so running on a bigger machine gives a good speedup. This shaves ~10 minutes off of linux_unopt time. Some of the DisplayList unit tests go over the 120s limit, so this PR also bumps the default limit to 300s.
2023-07-11 22:56:05 +00:00
David Worsham
b400037017 [fuchsia] Fix tests; remove fuchsia dart SDK deps (flutter/engine#43461)
Dart is being removed from the Fuchsia SDK, so remove references to it
here.

Also remove references to workstation_eng and replace with terminal.
workstation_eng is no longer a thing.
2023-07-08 09:37:34 +10:00
Chris Yang
5c27bcf072 [iOS] Avoid crash when backdrop filter is null for PlatformViews (flutter/engine#43150)
During certain partial repaint logic, the backdrop filter layer is present but the filter itself is null. We need to account for it when deciding whether to add such filter to the mutator stack.

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

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-07-05 18:14:14 +00:00
Martin Kustermann
d6f96120e9 Prepare for utf8.encode() to return more precise Uint8List type (flutter/engine#43335)
To avoid analyzer warnings when utf8.encode() will return the more
precise Uint8List type, we use const Utf8Encoder().convert() which
already returns Uint8List

See https://github.com/dart-lang/sdk/issues/52801
2023-06-29 19:27:49 +02:00
fzyzcjy
7d5a34cf72 ParagraphStyle uses the wrong bit mask (flutter/engine#43070)
For example, `_encodeParagraphStyle` says:

```dart
  if (locale != null) {
    result[0] |= 1 << 12;
    // Passed separately to native.
  }
```

We know `1<<12` is 4096.

On the other hand, the old code uses `0x800`, which is 2048.

And the strutStyle field is missing.

*Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.*

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

*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-06-26 18:58:47 +00:00
Márk Tolmács
f41c1644d8 Enabling pre-push checks on Windows (flutter/engine#36123)
Re-submit the changes to enable windows pre-push checks.

This patch changes how `ci/bin/format.dart` generate diffs from `diff` and `patch` commands to `git diff` and `git apply` in order to have a common method for these operations on all platforms. Windows installations don't have diff and patch commands available by default and many implementations which provide such commands work differently than the UN*X tools. Git however works consistently across all platforms.

Additionally, this patch also changes the python executable in some of the pre-push components affected by this to `vpython3` to continue the effort started at flutter/flutter#108474 and I also removed the `--no-sound-null-safety` parameter in the ci/format.sh, ci/format.bat files

NOTE: Since the original patch caused some issues, I suggest that this should be tested more carefully before it is merged.

### Issues fixed by this PR
* flutter/flutter#108122
* flutter/flutter#107920
* flutter/flutter#86506
* flutter/flutter#106615

### [flutter/tests] repo impact
None.

writing and running engine tests.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-06-21 17:20:06 +00:00
Jason Simmons
c4e22ba089 Implement the APNG_DISPOSE_OP_BACKGROUND disposal method in the animated PNG decoder (flutter/engine#42933) 2023-06-21 00:36:49 +00:00
Michael Goderbauer
12e586914e Reland "Add deprecations to PlatformMessage stuff" (#42580) (flutter/engine#42929)
This reverts commit 2b5c1f8d95c9c54e51787f5ceaeb142c0666aa72.

This is a straight reland without any additional changes. The package that was still using the outdated API causing the original revert has been updated in https://github.com/flutter/packages/pull/4233. **Do not land this until that PR has rolled into the framework.**
2023-06-20 16:42:25 +00:00
gaaclarke
2b5c1f8d95 Revert "Add deprecations to PlatformMessage stuff" (flutter/engine#42921)
Reverts flutter/engine#42580
2023-06-16 10:54:40 -07:00
Michael Goderbauer
57ffdedfc4 Add deprecations to PlatformMessage stuff (flutter/engine#42580)
Fixes old TODOs originally added in https://github.com/flutter/engine/pull/22181.
The framework appears to be fully migrated off these.
2023-06-15 19:53:13 +00:00
utzcoz
5351826be1 Fix generateLockfiles running directory for documentation (flutter/engine#42734)
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-06-14 15:07:06 +00:00
Chris Yang
cc1ec72179 Remove some trivial deprecated symbol usages in iOS Embedder (flutter/engine#42711)
stringWithCString was deprecated in iOS 2.0
UIAccessibilityVoiceOverStatusChanged was deprecated in iOS 11.0

fixes: https://github.com/flutter/flutter/issues/128732
https://github.com/flutter/flutter/issues/128736

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-06-13 22:26:59 +00:00
Chris Yang
4f88b3f075 Reland "[ios_platform_view] only recycle maskView when the view is applying mutators #42115" (flutter/engine#42823)
Relands https://github.com/flutter/engine/pull/42115, which was reverted in https://github.com/flutter/engine/pull/42231 due to a crash in the framework test.

The crash is due to a memory management issue that I fixed it in this PR, I also added a scenario test to catch the crash.

fixes: https://github.com/flutter/flutter/issues/125620

See also: orignal PR https://github.com/flutter/engine/pull/41573 for more details.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-06-13 22:14:06 +00:00