1175 Commits

Author SHA1 Message Date
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
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
J-P Nurmi
42b7de838e [Linux][a11y] implement AtkText::get_text/string_at_offset() (flutter/engine#38144)
This PR implements `AtkText::get_string_at_offset()` (and the deprecated `AtkText::get_text_at_offset()` still used by e.g. Orca) for `FlAccessibleTextField` to allow Orca to read out loud the current character while moving the text cursor around.

### Before (unmute to hear the screen reader)

[textfield-a11y-before.webm](https://user-images.githubusercontent.com/140617/206556644-fb4f4df8-acca-4d97-86d5-7120f0a4871d.webm)

### After (unmute to hear the screen reader)

[textfield-a11y-after.webm](https://user-images.githubusercontent.com/140617/206556678-4fbf9112-291e-4518-a258-e9ca33469430.webm)

Fixes: flutter/flutter#113049

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-06-07 17:18:04 +00:00
Jason Simmons
92064621b7 Convert pixel formats for animated PNG frames using the source blend mode (flutter/engine#42581)
The destination buffer format may not exactly match the source format. In particular, the alpha type of the source may need to be converted to the alpha type of the destination.

Fixes https://github.com/flutter/flutter/issues/128102
2023-06-07 00:02:03 +00:00
Kevin Lubick
0f09000dea Add missing #include of SkCFObject.h (flutter/engine#42573)
Another follow-on to http://review.skia.org/704942 which removed some
#includes that Flutter had been transitively depending on.

Note that SkCFObject is mac-only, so I included it the appropriate
#ifdef in embedder.cc, but the other two files are already mac-only so
they do not need that guard.

## 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.
- [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.
- [ ] 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-05 14:44:46 -04:00
Matej Knopp
eb1f10ea00 Improve getting non-overlapping rectangles from RTree (flutter/engine#42399)
Fixes https://github.com/flutter/flutter/issues/116070
Fixes https://github.com/flutter/flutter/issues/126202

Introduces `DlRegion` class which implements subset of `SkRegion`
required to get non-overlapping rectangles from region.

The implementation is different and faster than `SkRegion` for this
particular use-case (`display_list_region_benchmarks`):

Edit: Updated benchmark to latest revision and natively (initial run
went through rosetta)
```
----------------------------------------------------------------------------
Benchmark                                  Time             CPU   Iterations
----------------------------------------------------------------------------
BM_RegionBenchmarkDlRegion/Tiny          616 us          616 us          908
BM_RegionBenchmarkSkRegion/Tiny        70559 us        70557 us           10
BM_RegionBenchmarkDlRegion/Small        1315 us         1314 us          537
BM_RegionBenchmarkSkRegion/Small      121736 us       121717 us            6
BM_RegionBenchmarkDlRegion/Medium       1079 us         1079 us          650
BM_RegionBenchmarkSkRegion/Medium      22039 us        22035 us           32
BM_RegionBenchmarkDlRegion/Large         399 us          399 us         1763
BM_RegionBenchmarkSkRegion/Large        1510 us         1510 us          466
```

## 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-06-05 20:41:21 +02:00
Kevin Lubick
14d8bae027 Add missing includes of GrBackendSurface.h (flutter/engine#42563)
In https://skia-review.googlesource.com/c/skia/+/704942, Skia removed
some unnecessary #includes which parts of Flutter had been depending on
implicitly. This adds those includes in explicitly.

## 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.
- [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.
- [ ] 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-05 10:32:41 -04:00
Jason Simmons
c7254f00aa Generate a unique temporary directory name in the iOS scenario test script (flutter/engine#42520)
This ensures that a retry of this script on CI will not collide with the output directory of a previous run.
2023-06-02 21:08:18 +00:00
godofredoc
648918469b Move benchmarks no upload to a test. (flutter/engine#42356)
This is moving the execution of the benchmarks script to a test inside the existing host_relese configuration. It keeps the same coverage with and removes one build.

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-02 17:03:58 +00:00
toneyzeng
8c80858576 Support DisposalMethod::kRestorePrevious in MultiFrameCodec and fix the apng problem. (flutter/engine#42153)
Support DisposalMethod::kRestorePrevious in MultiFrameCodec and fix the apng problem.

![image](https://github.com/flutter/engine/assets/5031712/48bb95c1-10b3-4736-a42e-46281d355cd3)

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-06-01 20:07:18 +00:00
gaaclarke
922c7250bd [Impeller] Fixed TypographerTest.MaybeHasOverlapping (flutter/engine#42429)
fixes https://github.com/flutter/flutter/issues/127714

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-30 23:33:00 +00:00
gaaclarke
25154333d5 [Impeller] Fixed GlyphAtlasWithLotsOfdUniqueGlyphSize (flutter/engine#42423)
fixes https://github.com/flutter/flutter/issues/127715

## 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-05-30 13:13:36 -07:00
gaaclarke
097856100f [Impeller] removed vulkan unit test csv (flutter/engine#42354)
fixes https://github.com/flutter/flutter/issues/113961

There were just 2 outstanding tests that were failing.

## 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-30 11:50:20 -07:00
gaaclarke
d73aac2434 Started executing vulkan unit tests with validation on macos (flutter/engine#42337)
fixes https://github.com/flutter/flutter/issues/127634

This PR depends on a buildroot change at https://github.com/flutter/buildroot/pull/737

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-26 19:05:19 +00:00
Jim Graham
de4939288a Move checkerboard unit tests onto DisplayList mechanism (flutter/engine#41951)
Part of an ongoing set of efforts to address https://github.com/flutter/flutter/issues/106448

Move the checkerboard layer unit tests onto the DisplayList version of the paint contexts and fix some bugs in the reusability of the DisplayListBuilder that this migration uncovered.
2023-05-25 21:56:25 +00:00
gaaclarke
dc22f5f572 [Impeller] Turn on vulkan tests for mac CI. (flutter/engine#42225)
This uses swiftshader to run the tests on mac.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-24 23:25:06 +00:00
gaaclarke
9258309eed Turned back on debug unit tests (flutter/engine#42261)
I refactored the `EXPECT_EXIT` tests since they are unsafe to execute in a process with multiple threads.

This leaves `flutter_desktop_darwin_unittests` disabled since it has existing issues.

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

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-23 23:13:35 +00:00
Zachary Anderson
1a85b3733f Revert "[ios_platform_view] only recycle maskView when the view is applying mutators #41573" (flutter/engine#42231)
Reverts flutter/engine#42115

Failing on the framework tree as in
https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20platform_views_scroll_perf_ios__timeline_summary/11103/overview
2023-05-22 19:35:47 -07:00
Chris Yang
b20b25128a Reland "[ios_platform_view] only recycle maskView when the view is applying mutators #41573" (flutter/engine#42115)
The original PR (https://github.com/flutter/engine/pull/41573) was reverted due to https://github.com/flutter/flutter/issues/126951

The issue will be fixed in https://github.com/flutter/engine/pull/42079

This needs to be landed after https://github.com/flutter/engine/pull/42079

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

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-22 20:10:37 +00:00
Zachary Anderson
df51526b1d Revert "[ios_platform_view] only recycle maskView when the view is applying mutators" (flutter/engine#42080)
Reverts flutter/engine#41573

Crashing on Framework CI
2023-05-16 14:32:18 -07:00
Chris Yang
259217c7aa [ios_platform_view] only recycle maskView when the view is applying mutators (flutter/engine#41573)
A mistake was introduced in https://github.com/flutter/engine/pull/39498  where the maskViews are already recycles each frame. 

Sometimes a PlatformView does not need to be re-composite: (https://github.com/flutter/engine/blob/main/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm#L398-L401), so the mask view for such PlatformView should not be recycled.

This PR changed the `recycleMaskViews` API to allow individual maskviews to be recycled. `ApplyMutator` then only recycle the maskView for that particular PlatformView.

The MaskViewPool is also reworked to be simpler. 

- The pool now contains a single set of mask views, there is no index counter needed.
- When a maskView is needed, try to get it from the pool. 
  - If pool is empty, create a new view.
  - If pool has an available maskview, remove it from the pool.
- When a PlatformView starts to `applyMutator`, it removes current the maskView, insert the maskView to the pool.
- When the above PlatformView needs to a maskView, it grabs one from the pool. 

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

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-16 16:24:05 +00:00
Chris Yang
e82760c0ff Fix upload xcresult script in run_tests.py (flutter/engine#42056)
The original PR https://github.com/flutter/engine/pull/41647 forgot to add try-except-raise

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

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-15 23:11:04 +00:00
Chris Yang
8d07db38c5 Upload xcresults to LUCI cloud storage (flutter/engine#41647)
Taking over from https://github.com/flutter/engine/pull/41644

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

Steps to verify

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-15 19:05:10 +00:00
Kevin Lubick
0946d27add Migrate uses of SkSurface factories (flutter/engine#41978)
In http://review.skia.org/687639, many SkSurface static methods were moved and one was deleted (SkSurface::MakeRasterN32Premul). (SkSurface::MakeNull was omitted accidentally and http://review.skia.org/696537glesource.com/c/skia/+/696537 has not rolled into Flutter yet)

This changes the calls in Flutter to match those moved functions. There should be no functional difference and everything was done pretty mechanically (e.g. find and replace)

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-15 16:41:10 +00:00
gaaclarke
015608f15e [Impeller] starts running vulkan golden image tests with swiftshader (flutter/engine#41958)
fixes https://github.com/flutter/flutter/issues/126022

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-12 20:34:55 +00:00
William Hesse
cb63c1f350 Add pkg:protobuf as a dependency for testing/dart (flutter/engine#41938)
Package vm_service added dependencies on protobuf and fixnum. Adding these, and transitive dependency on collections, to the path overrides in the testing/dart package's pubspec.yaml.

This is needed to roll https://github.com/dart-lang/sdk/commit/6c3c34560e6fdac211e362078557fdda254baf
2023-05-11 12:46:20 +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
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
Dan Field
1535542946 Make run_tests.py assert that the ios test dylib is at least as new as libFlutter.dylib (flutter/engine#41720)
This would have helped me figure out why I wasn't getting the same failures as on CI more quickly.
2023-05-04 01:49:22 +00:00