29717 Commits

Author SHA1 Message Date
Robert Ancell
14ae687eac Make a mock messenger that can easily mock channels (flutter/engine#56867)
The previous mock required knowing the specific functions used in the
binary messenger, this method instead allows test code to provide
complete platform channel implementation for testing and make simulated
platform channel calls into embedder code.
2024-12-03 13:41:33 +13:00
skia-flutter-autoroll
3cb4a84de6 Manual roll Dart SDK from c579d193341d to 61bfa9bbb91d (1 revision) (flutter/engine#56909)
Manual roll requested by asiva@google.com

https://dart.googlesource.com/sdk.git/+log/c579d193341d..61bfa9bbb91d

2024-12-02 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-207.0.dev

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-sdk-flutter-engine
Please CC asiva@google.com,dart-vm-team@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-12-03 00:39:26 +00:00
Robert Ancell
983837c311 Fix GTask reference counting (flutter/engine#56866)
Incorrect reference counting of GTask objects meant platform channel
method calls would leave tasks alive that would leak memory and leave
unclosed references to the binary messenger.
2024-12-03 13:37:31 +13:00
skia-flutter-autoroll
d5c7efdb64 Roll Dart SDK from 46630dbefbbd to c579d193341d (1 revision) (flutter/engine#56907)
https://dart.googlesource.com/sdk.git/+log/46630dbefbbd..c579d193341d

2024-12-02 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-206.0.dev

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-sdk-flutter-engine
Please CC dart-vm-team@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-12-02 22:02:19 +00:00
LongCatIsLooong
18cf7ae0a7 Reland "[iOS] Full keyboard access scrolling (#56606)" (flutter/engine#56842)
Reverts flutter/engine#56802

https://github.com/flutter/flutter/pull/159517 should address the engine roll failure.

I'm not planning to land this until the coming Monday.
2024-12-02 21:53:21 +00:00
Robert Ancell
aa01970589 Always check for errors when propagating task values. (flutter/engine#56856)
This could occur if a request is cancelled, without this it might not chain up to the original caller correctly.
2024-12-02 21:47:06 +00:00
richardexfo
c62bbc18ad Fix linux on vivante drivers. (flutter/engine#56862)
The same problem with NVIDIA drivers which causes issue [152099](https://github.com/flutter/flutter/issues/152099) occurs with Vivante Corporation drivers.

Quick fix for issue on Vivante drivers:  
https://github.com/flutter/flutter/issues/152099

- [ 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 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.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-12-02 21:16:22 +00:00
skia-flutter-autoroll
a7db4d6b56 Roll Skia from d7751d3d6ff4 to 2c4ce1d953ba (5 revisions) (flutter/engine#56901)
https://skia.googlesource.com/skia.git/+log/d7751d3d6ff4..2c4ce1d953ba

2024-12-02 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll Dawn from 5a657da0d714 to dbff5894310b (35 revisions)
2024-12-02 skia-autoroll@skia-public.iam.gserviceaccount.com Roll skcms from d4f01d560853 to b2e692629c1f (1 revision)
2024-12-02 jvanverth@google.com [graphite] Missed one WebGPU adapter change
2024-12-02 kjlubick@google.com Revert "Minor cleanups with AutoSTArray and AutoSTMalloc"
2024-12-02 jvanverth@google.com [graphite] Fix issue with combining clips.

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 jvanverth@google.com,kjlubick@google.com,zra@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://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-12-02 20:16:08 +00:00
Tristan Ross
3ca2049252 [ci] use env for format and support arm64 hosts (flutter/engine#56268)
Fixes running x64 binaries on arm64 hosts, this fixes systems like Raspberry Pi's, Apple Silicon, and Ampere.

Before, I would get something like:
```
Checking GN formatting...
Completed checking 0 GN files with no formatting problems.
Checking Java formatting...
No Java files with changes, skipping Java format check.
Checking Python formatting...
All python files formatted correctly.
Checking for trailing whitespace on 1 source file...
No trailing whitespace found.
No header files with changes, skipping header guard check.
Checking C++/ObjC/Shader formatting...
ERROR: Formatter command '/home/ross/flutter-engine/src/flutter/buildtools/linux-x64/clang/bin/clang-format --style=file shell/platform/linux/fl_application_test.cc' failed with exit code 255. Command output follows:

qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory

Completed checking 0 C++/ObjC/Shader files with no formatting problems
```

Now it just works, I also changed the shell script to use env since `/bin/bash` doesn't exist on NixOS so using env is a more portable solution.

*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
2024-12-02 19:04:32 +00:00
LN Liberda
9f76c9d47e Replace outdated wiki URLs in pull request template (flutter/engine#56824)
The wiki hasn't existed for a long time, and the URLs now require manually following through a click to the documents.

*List which issues are fixed by this PR. You must list at least one issue.*
closes https://github.com/flutter/flutter/issues/159514

*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
2024-12-02 18:51:23 +00:00
gaaclarke
e40835cb89 [impeller] makes UniformBindData 15% faster and adds unit test (flutter/engine#56844)
issue: https://github.com/flutter/flutter/issues/159177

The improvements come from using absl::flat_hash_map.

measurements with std vs absl (`host_profile_arm64`):
```
# Std
0.041124
0.0398002
0.0396546
0.0405552
0.0397742

# Absl
0.0353708
0.0336834
0.0338616
0.033050
0.0331976
```

Benchmark used
```c++
TEST(BufferBindingsGLESTest, BindUniformDataMicro) {
  BufferBindingsGLES bindings;
  absl::flat_hash_map<std::string, GLint> uniform_bindings;
  uniform_bindings["SHADERMETADATA.FOOBAR"] = 1;
  bindings.SetUniformBindings(std::move(uniform_bindings));
  std::shared_ptr<MockGLES> mock_gl = MockGLES::Init();
  MockAllocator allocator;
  Bindings vertex_bindings;

  ShaderMetadata shader_metadata = {
      .name = "shader_metadata",
      .members = {ShaderStructMemberMetadata{.type = ShaderType::kFloat,
                                             .name = "foobar",
                                             .offset = 0,
                                             .size = sizeof(float),
                                             .byte_length = sizeof(float)}}};
  std::shared_ptr<ReactorGLES> reactor;
  std::shared_ptr<Allocation> backing_store = std::make_shared<Allocation>();
  ASSERT_TRUE(backing_store->Truncate(Bytes{sizeof(float)}));
  DeviceBufferGLES device_buffer(DeviceBufferDescriptor{.size = sizeof(float)},
                                 reactor, backing_store);
  BufferView buffer_view(&device_buffer, Range(0, sizeof(float)));
  vertex_bindings.buffers.push_back(BufferAndUniformSlot{
      .slot =
          ShaderUniformSlot{
              .name = "foobar", .ext_res_0 = 0, .set = 0, .binding = 0},
      .view = BufferResource(&shader_metadata, buffer_view)});
  Bindings fragment_bindings;
  int32_t count = 5'000'000;
  auto start = std::chrono::high_resolution_clock::now();
  for (int32_t i = 0; i < count; ++i) {
    bindings.BindUniformData(mock_gl->GetProcTable(), allocator,
                             vertex_bindings, fragment_bindings);
    if (i % 100 == 0) {
      mock_gl->GetCapturedCalls();
    }
  }
  auto end = std::chrono::high_resolution_clock::now();
  auto duration =
      std::chrono::duration_cast<std::chrono::microseconds>(end - start)
          .count();
  std::cout << "Execution time: " << duration / static_cast<double>(count)
            << " microseconds" << std::endl;
}
```

This is one of our hottest symbols on the raster thread:

<img width="1528" alt="Screenshot 2024-11-27 at 2 27 54 PM"
src="https://github.com/user-attachments/assets/a9029d6f-ee96-4612-83f1-6b69f24e6ce8">

## 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 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
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[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
2024-12-02 10:46:29 -08:00
skia-flutter-autoroll
f92abcbbbe Roll Skia from dd70c8e1c38f to d7751d3d6ff4 (36 revisions) (flutter/engine#56898)
Roll Skia from dd70c8e1c38f to d7751d3d6ff4 (36 revisions)

https://skia.googlesource.com/skia.git/+log/dd70c8e1c38f..d7751d3d6ff4

2024-12-02 kjlubick@google.com Minor cleanups with AutoSTArray and AutoSTMalloc
2024-12-02 fmalita@google.com Update SkVideoEncoder for new ffmpeg
2024-12-02 jvanverth@google.com [graphite] Update GraphiteDawnTestContext to new Adapter interface
2024-12-02 kjlubick@google.com Add Rust-based PNG decoder tests to CQ
2024-12-02 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from a2d76f039918 to f7cac0bb8d2f (6 revisions)
2024-12-02 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 846022101a6f to 963fb6511438 (2 revisions)
2024-12-02 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from d897b7ac1f75 to e0222e69ea90 (1 revision)
2024-11-30 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from ef4dc615f82d to d897b7ac1f75 (1 revision)
2024-11-29 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 2dc072ec71cc to a2d76f039918 (10 revisions)
2024-11-29 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from dad165201f86 to ef4dc615f82d (3 revisions)
2024-11-29 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from b24f37dbbe4a to 846022101a6f (2 revisions)
2024-11-28 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from b7e10ed68dd0 to dad165201f86 (3 revisions)
2024-11-28 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 2e25ea1e727e to 2dc072ec71cc (8 revisions)
2024-11-28 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 594fe3cae8c3 to b24f37dbbe4a (5 revisions)
2024-11-28 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from 01354c07cdb2 to 5a657da0d714 (18 revisions)
2024-11-28 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from ecc3cdc4d28b to b7e10ed68dd0 (10 revisions)
2024-11-27 epeev@google.com Reland "Reland "SkCodec: Remove the sysprop guard for SkCrabbyAvifCodec""
2024-11-27 kjlubick@google.com Remove redundant SkDoubleIsNaN function
2024-11-27 kjlubick@google.com Fix SIMD compilation error for GCC 8.x and below
2024-11-27 kjlubick@google.com Make SK_NO_SANITIZE more compatible with GCC
2024-11-27 skia-autoroll@skia-public.iam.gserviceaccount.com Roll skcms from 2c7a7bff0512 to d4f01d560853 (1 revision)
2024-11-27 kjlubick@google.com Remove sk_path_analyze_verbs() from include/private
2024-11-27 kjlubick@google.com Squelch warning with microhttplib and newer GCC versions
2024-11-27 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from cecefe53430a to 2e25ea1e727e (8 revisions)
2024-11-27 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 08d21277b1a1 to ecc3cdc4d28b (1 revision)
2024-11-27 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from dbdf344026c9 to 594fe3cae8c3 (7 revisions)
2024-11-27 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from 27f9f8696a43 to 01354c07cdb2 (21 revisions)
2024-11-27 briansalomon@gmail.com Enable gpu timer query for Graphite/Dawn
2024-11-27 skia-autoroll@skia-public.iam.gserviceaccount.com Roll skottie-base from 52028e548417 to bd94aa86becd
2024-11-27 skia-autoroll@skia-public.iam.gserviceaccount.com Roll shaders-base from 7bdb025e3cbb to 9481c3eb25d2
2024-11-27 skia-autoroll@skia-public.iam.gserviceaccount.com Roll jsfiddle-base from 99d4627f212e to fb2d48f7af98
2024-11-27 skia-autoroll@skia-public.iam.gserviceaccount.com Roll debugger-app-base from 9e05eb5b9edb to e9a6ea69ff3d
2024-11-27 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 915d114daeb2 to 08d21277b1a1 (3 revisions)
2024-11-26 lukasza@chromium.org [rust png] Delete `SkPngRustDecoder.h` from the old location.
2024-11-26 lukasza@chromium.org [rust png] Revert adding `png_codec_base_...` to `skia_codec_rust_png`.
2024-11-26 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 10c2dc7a1b4b to cecefe53430a (29 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,jvanverth@google.com,zra@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

...
2024-12-02 18:39:10 +00:00
skia-flutter-autoroll
0a4305b5d4 Roll Dart SDK from 5785058c9bb1 to 46630dbefbbd (12 revisions) (flutter/engine#56897)
https://dart.googlesource.com/sdk.git/+log/5785058c9bb1..46630dbefbbd

2024-12-02 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-205.0.dev
2024-12-02 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-204.0.dev
2024-12-01 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-203.0.dev
2024-11-30 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-202.0.dev
2024-11-29 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-201.0.dev
2024-11-29 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-200.0.dev
2024-11-28 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-199.0.dev
2024-11-28 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-198.0.dev
2024-11-28 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-197.0.dev
2024-11-28 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-196.0.dev
2024-11-28 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-195.0.dev
2024-11-28 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-194.0.dev

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-sdk-flutter-engine
Please CC dart-vm-team@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-12-02 17:44:56 +00:00
gaaclarke
6e278bf216 switched reactor to absl::flat_hash_map (flutter/engine#56845)
We don't need consistent pointers anymore since we are avoiding deleting
objects to minimize time in the writer lock

related pr with benchmarks: https://github.com/flutter/engine/pull/56844

## 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 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
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[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
2024-12-02 09:41:25 -08:00
gaaclarke
be97fbcf13 Sped up SubpixelGlyph::Equal (flutter/engine#56851)
This allows a quick out when the simple parameters fail to be equal
without even looking at optional properties. In the case where they both
have properties there is now one less `has_value()`.

## 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 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
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[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
2024-12-02 09:40:54 -08:00
Jonah Williams
effea219cb [Impeller] dont cache glyph layout if atlas is invalid. (flutter/engine#56879)
Fixes https://github.com/flutter/flutter/issues/159578

When the screen is shut off, the atlas context is destroyed but the text frames are not. This can lead to a state where we expect the glyph atlas to be populated but it is not. make sure to check if the atlas itself is valid.
2024-12-02 17:39:09 +00:00
Jason Simmons
d28811c8f3 Roll Dart SDK from 0740ded7b9bf to 5785058c9bb1 (5 revisions) (flutter/engine#56886)
Includes updates to licenses_flutter related to the roll of BoringSSL

https://dart.googlesource.com/sdk.git/+log/0740ded7b9bf..5785058c9bb1

2024-11-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.7.0-193.0.dev
2024-11-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.7.0-192.0.dev
2024-11-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.7.0-191.0.dev
2024-11-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.7.0-190.0.dev
2024-11-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.7.0-189.0.dev
2024-12-02 08:16:29 -08:00
skia-flutter-autoroll
fbbac70e24 Roll Fuchsia Linux SDK from pc49rc4B22IXqigQ-... to j424tGVlulTUzBtPj... (flutter/engine#56889)
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 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://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-12-02 16:15:57 +00:00
skia-flutter-autoroll
d78fb06705 Roll Skia from f149f852c70a to dd70c8e1c38f (4 revisions) (flutter/engine#56814)
https://skia.googlesource.com/skia.git/+log/f149f852c70a..dd70c8e1c38f

2024-11-26 lukasza@chromium.org [rust png] Extract a separate `src/codec:png_codec_base` Bazel target.
2024-11-26 kjlubick@google.com Inline GpuToolUtils MakeTextureImage
2024-11-26 kjlubick@google.com Extract tools/graphite/GraphiteToolUtils as its own files
2024-11-26 kjlubick@google.com Reland "Change window::DisplayParams to be immutable and passed by pointer"

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,danieldilan@google.com,zra@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://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-12-02 16:13:57 +00:00
skia-flutter-autoroll
c60b625dce Roll Fuchsia Linux SDK from oJzuSXcrUmaw5Ck2g... to pc49rc4B22IXqigQ-... (flutter/engine#56876)
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 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://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-11-29 13:16:34 +00:00
Chris Bracken
f988f524fe iOS: Apply nullability annotations to FlutterPlatformViewsController (flutter/engine#56839)
Applies non-null by default annotations to
FlutterPlatformViewsController with opt-outs where necessary. Updates unit tests to create graphics contexts where requried.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-11-28 17:44:23 +00:00
skia-flutter-autoroll
8b237d39d5 Roll Fuchsia Linux SDK from u0agumUB4Ag6cTiKk... to oJzuSXcrUmaw5Ck2g... (flutter/engine#56853)
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 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://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-11-28 04:03:18 +00:00
LN Liberda
daed210840 IWYU: add some missing includes failing with libstdc++13/14 (flutter/engine#56822)
Fixes builds of engine with libstdc++13 and libstdc++14.

*List which issues are fixed by this PR. You must list at least one issue.*
closes https://github.com/flutter/flutter/issues/159513

*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
2024-11-27 20:11:17 +00:00
Jonah Williams
e8c3eefb21 [Impeller] dont use dynamic shader metadata path for precompiled shaders. (flutter/engine#56827)
Should fix https://github.com/flutter/flutter/issues/159520 ~~but I still need to check locally.~~ Seems to do the trick.

All cmd bindings were copying the shader metadata, which meant allocating/de-allocating a lot of strings per draw.
2024-11-27 17:21:09 +00:00
Chris Bracken
fb558d9867 Reland: iOS: Eliminate global in platformviews controller (flutter/engine#56831)
This is a minor refactoring that moves a global bool to a boolean ivar in FlutterPlatformViewsController. The purpose of this variable is simply to avoid the overhead of trying to create backdrop filters if we've ever failed to create one in the past.

Given that this class will only ever have the one instance created and held by per engine with the same duration, and that most apps only ever have one engine, the performance win will be identical for most apps. For the few add-to-app cases with multiple engines either at once or over the course of an app's lifetime, the costs associated with firing up an engine are already a far bigger hit than those being saved by this bool.

Also migrates from C++ style namespace { ... } to Obj-C style static functions. These are entirely equivalent as both restrict symbols to the current translation unit.

This is a reland of https://github.com/flutter/engine/pull/56805, which was reverted as part of https://github.com/flutter/engine/pull/56817.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-11-27 15:32:16 +00:00
Chris Bracken
263fb587b7 Reland: iOS: Delete FlutterPlatformViewsController.layerPoolSize (flutter/engine#56830)
This field is unused in the codebase/tests.

This is a reland of https://github.com/flutter/engine/pull/56806, which was reverted as part of https://github.com/flutter/engine/pull/56790.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-11-27 06:29:24 +00:00
Chris Bracken
2afb790cad Reland: iOS: Migrate PlatformViewsController to Objective-C (flutter/engine#56828)
This migrates PlatformViewController from C++ to Objective-C. Generally, we try to keep the embedder interfaces and components written in Objective-C except for the few places where C++ interfaces are requried to interface with engine APIs such as Shell and PlatformView (e.g. the PlatformViewIOS subclass). Now that the implementation is Objective-C, the class and file are renamed to match Objective-C naming conventions.

This allows us to take advantage of ARC and weak references, which eliminates the need for std::shared_ptr, fml::WeakPtr etc. Further, this eliminates some particularly unintuitive behaviour wherein this class was owned via a std::shared_ptr held by FlutterEngine, and injected into many other classes (e.g. AccessibilityBridge) via a std::shared_ptr& reference -- such that only one instance of the std::shared_ptr actually ever existed, presumably to avoid std::shared_ptr refcounting overhead. Given that this overhead was only incurred a single time at engine initialisation, this seems like overkill. One might ask why it wasn't therefore held in a `std::unique_ptr` and a `std::unique_ptr&` reference passed around. Likely, this was because we wanted to take a `fml::WeakPtr` reference on it.

Regardless, none of this is necessary any longer now that we can inject `__weak FlutterPlatformViewsController*` instances to classes that use it.

To be clear, this patch makes no attempt whatsoever to simplify or clean up the interface or implementation of this class. This class ties together far too many concepts and is injected into far too many places, and we should break it up and simplify it. However, the goal of this patch was simply to port to an Objective-C interface that plays nicely with the rest of the iOS embedder. This does include a couple minor cleanups in `#include`/`#import` order and usage to match our style guide.

This is a reland with a one-line fix of a lambda-capture block to ensure `self` and any local variables are captured by value rather than by reference:
* In the case where this method is called on the platform thread (i.e. where the UI and platform thread are merged), we use the latch to pause the calling thread until the lambda completes, in which case all locals could be passed by reference since the locals are guaranteed to hang around until the lambda completes and signals the latch.
* In the case where this method is called from the UI thread (i.e. where UI and platform thread are not merged), locals may have gone out of scope by the time the lambda executes, leading to undefined behaviour if passed by reference; thus we always pass by value to be sure; since `latch` must be shared between threads, it's passed held in a `std::shared_ptr` so the underlying latch/mutex is shared but it's kept live until it goes out of scope in both threads.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-11-27 04:11:25 +00:00
Jonah Williams
90320619b8 [Impeller] make sampler use string_view instead of std::string. (flutter/engine#56821)
I believe these are always const strings anyway, so remove the copy associated with using std::string.
2024-11-27 02:26:20 +00:00
skia-flutter-autoroll
354d431d9d Roll Dart SDK from 72b594775c83 to 0740ded7b9bf (1 revision) (flutter/engine#56826)
https://dart.googlesource.com/sdk.git/+log/72b594775c83..0740ded7b9bf

2024-11-26 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-188.0.dev

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-sdk-flutter-engine
Please CC dart-vm-team@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-11-27 01:08:00 +00:00
skia-flutter-autoroll
7510d84598 Roll Fuchsia Linux SDK from 50xtjbMWWrqay_7m_... to u0agumUB4Ag6cTiKk... (flutter/engine#56823)
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 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://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-11-27 00:14:34 +00:00
Jim Graham
0c245ce56b [DisplayList] Delete (publicly) unused DlColorColorSource (flutter/engine#56825)
While recently updating the DlColorSource sources I noticed some questionably implementation choices in the Color variant of the color sources.

I then realized that there was no public use of these classes (other than mostly their own unit tests) and so they should be deleted to focus on implementing the variants that are actually used by Flutter.
2024-11-27 00:13:22 +00:00
Jonah Williams
fb62aa5d47 [engine] reland: more consistently flush message loops tasks (flutter/engine#56815)
Changes the following shell callbacks to flush the dart event loop:

* OnPlatformViewSetViewportMetrics
* OnPlatformViewDispatchPointerDataPacket
* OnPlatformViewDispatchPlatformMessage
* OnPlatformViewSetSemanticsEnabled
* OnPlatformViewSetAccessibilityFeatures
Using a new TaskRunner API RunNowAndFlushMessages. If the task runner can run tasks on the current thread, this will immediately invoke a callback and then post an empty task to the event loop to ensure dart listeners fire.

Unlike https://github.com/flutter/engine/pull/56738, does not touch the vsync API - which looks like it depends on scheduling behavior today, at least for iOS.
2024-11-26 22:34:00 +00:00
Jonah Williams
26dd7e27cf [Impeller] cache even more text frame data to skip lookups. (flutter/engine#56798)
Every text frame must inform the glyph atlas about the glyphs + scale it contains. When this happens, the glyph atlas will populate the glyph and then tell teh text frame about the location in the atlas, so that the text contents shader can sample it correctly.

Once this has been done once for a given text frame + scale + offset, we can actually just keep reusing the same data provided 1) the atlas itself hasn't changed and 2) the scale/offset/properties are the same.

This constitutes a nice CPU usage reduction in places where there is a lot of text that isn't being invalidated, like scrolling on the flutter gallery.
2024-11-26 21:35:23 +00:00
Jim Graham
2a55c9edd8 [DisplayList] migrate DlColorFilter objects to new source layout (flutter/engine#56785)
A new source code/header structure was introduced when the DlColorSource and DlImageFilter objects were migrated to Impeller geometry classes. Even though the DlColorFilter objects did not depend on Skia geometry objects, they need to be updated to the new source layout for consistency.
2024-11-26 20:48:20 +00:00
skia-flutter-autoroll
e97a8c5786 Roll Dart SDK from ca02d403f1a8 to 72b594775c83 (1 revision) (flutter/engine#56819)
https://dart.googlesource.com/sdk.git/+log/ca02d403f1a8..72b594775c83

2024-11-26 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-187.0.dev

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-sdk-flutter-engine
Please CC dart-vm-team@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-11-26 20:38:25 +00:00
Chris Bracken
52661e51c0 Revert "iOS: Migrate PlatformViewsController to Objective-C (#56790)" (flutter/engine#56817)
This is a combination of 3 reverts, required to get back to the revert that caused `ios_platform_view_tests` to start failing in the framework repo. In reverse chronological order, this reverts two trivial commits plus the non-trivial commit that likely caused the breakage:

* Revert "iOS: Eliminate global in platformviews controller (#56805)" This reverts commit cea4600caa7098fa7ec109d18b869db46cda726a.
* Revert "iOS: Delete FlutterPlatformViewsController.layerPoolSize (#56806)" This reverts commit 80fa8a590876e0d29055b9ddbfa8670c1f83759e.
* Revert "iOS: Migrate PlatformViewsController to Objective-C (#56790)" This reverts commit afd05afc406deb79fbe9c16684aeeeb19322b288.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-11-26 19:52:13 +00:00
Chris Bracken
61d0019469 iOS: Rename FlutterPlatformViews_Internal.mm (flutter/engine#56816)
Objective-C files should be named to match their header, in this case, //flutter/shell/platform/darwin/ios/framework/Headers/FlutterPlatformViews.h.

When private API is required, we often create a header named FlutterFoo_Internal.h, but the implementation file is always just FlutterFoo.mm. This brings FlutterPlatformViews back into line with convention.

No test changes since this is just a file rename.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-11-26 18:56:24 +00:00
Chris Bracken
cea4600caa iOS: Eliminate global in platformviews controller (flutter/engine#56805)
This is a minor refactoring that moves a global bool to a boolean ivar in FlutterPlatformViewsController. The purpose of this variable is simply to avoid the overhead of trying to create backdrop filters if we've ever failed to create one in the past.

Given that this class will only ever have the one instance created and held by per engine with the same duration, and that most apps only ever have one engine, the performance win will be identical for most apps. For the few add-to-app cases with multiple engines either at once or over the course of an app's lifetime, the costs associated with firing up an engine are already a far bigger hit than those being saved by this bool.

Also migrates from C++ style namespace { ... } to Obj-C style static functions. These are entirely equivalent as both restrict symbols to the current translation unit.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-11-26 18:28:15 +00:00
skia-flutter-autoroll
3a2097395c Roll Dart SDK from bdb76c714009 to ca02d403f1a8 (1 revision) (flutter/engine#56809)
https://dart.googlesource.com/sdk.git/+log/bdb76c714009..ca02d403f1a8

2024-11-26 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-186.0.dev

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-sdk-flutter-engine
Please CC dart-vm-team@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-11-26 10:00:05 +00:00
skia-flutter-autoroll
c8a762107c Roll Skia from b697dd1b03b2 to 8d9d892657a7 (1 revision) (flutter/engine#56808)
https://skia.googlesource.com/skia.git/+log/b697dd1b03b2..8d9d892657a7

2024-11-26 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from f433991c6d8e to dbdf344026c9 (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 aaclarke@google.com,brianosman@google.com,danieldilan@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://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-11-26 07:28:26 +00:00
Chris Bracken
80fa8a5908 iOS: Delete FlutterPlatformViewsController.layerPoolSize (flutter/engine#56806)
This field is unused in the codebase/tests.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-11-26 05:23:09 +00:00
skia-flutter-autoroll
214afb3f08 Roll Dart SDK from 4b49546a1dfa to bdb76c714009 (1 revision) (flutter/engine#56803)
https://dart.googlesource.com/sdk.git/+log/4b49546a1dfa..bdb76c714009

2024-11-26 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-185.0.dev

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-sdk-flutter-engine
Please CC aaclarke@google.com,dart-vm-team@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-11-26 02:16:22 +00:00
Chris Bracken
afd05afc40 iOS: Migrate PlatformViewsController to Objective-C (flutter/engine#56790)
This migrates PlatformViewController from C++ to Objective-C. Generally, we try to keep the embedder interfaces and components written in Objective-C except for the few places where C++ interfaces are requried to interface with engine APIs such as Shell and PlatformView (e.g. the PlatformViewIOS subclass). Now that the implementation is Objective-C, the class and file are renamed to match Objective-C naming conventions.

This allows us to take advantage of ARC and weak references, which eliminates the need for std::shared_ptr, fml::WeakPtr etc. Further, this eliminates some particularly unintuitive behaviour wherein this class was owned via a std::shared_ptr held by FlutterEngine, and injected into many other classes (e.g. AccessibilityBridge) via a std::shared_ptr& reference -- such that only one instance of the std::shared_ptr actually ever existed, presumably to avoid std::shared_ptr refcounting overhead. Given that this overhead was only incurred a single time at engine initialisation, this seems like overkill. One might ask why it wasn't therefore held in a `std::unique_ptr` and a `std::unique_ptr&` reference passed around. Likely, this was because we wanted to take a `fml::WeakPtr` reference on it.

Regardless, none of this is necessary any longer now that we can inject `__weak FlutterPlatformViewsController*` instances to classes that use it.

To be clear, this patch makes no attempt whatsoever to simplify or clean up the interface or implementation of this class. This class ties together far too many concepts and is injected into far too many places, and we should break it up and simplify it. However, the goal of this patch was simply to port to an Objective-C interface that plays nicely with the rest of the iOS embedder. This does include a couple minor cleanups in `#include`/`#import` order and usage to match our style guide.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-11-26 01:23:21 +00:00
gaaclarke
6d9cdb5750 Started caching HandleGLES's hash and made them immutable (flutter/engine#56800)
https://github.com/flutter/flutter/issues/159177
test exempt: no functional change, performance

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-11-26 01:09:25 +00:00
auto-submit[bot]
57b102520b Reverts "[iOS] Full keyboard access scrolling (#56606)" (flutter/engine#56802)
Reverts: flutter/engine#56606
Initiated by: LongCatIsLooong
Reason for reverting: https://github.com/flutter/flutter/issues/159456
Original PR Author: LongCatIsLooong

Reviewed By: {chunhtai, cbracken}

This change reverts the following previous change:
This PR adds basic FKA scrolling support: when the iOS focus (the focus state is maintained separately from the framework focus, see the previous PR) switches to an item in a scrollable container that is too close to the edge of the viewport, the container will scroll to make sure the next item is visible. 

Previous PR for context: https://github.com/flutter/engine/pull/55964

https://github.com/user-attachments/assets/84ae5153-f955-4d23-9901-ce942c0e98ac

### Why the UIScrollView subclass in the focus hierarchy

The iOS focus system does not provide an API that allows apps to notify it of focus highlight changes. So if we were to keep using the transforms sent by the framework as-is and not introducing any UIViews in the focus hierarchy, the focus highlight will be positioned at the wrong location after scrolling (via FKA or via framework). That does not seem to be part of the public API and the focus system seems to only know how to properly highlight focusable UIViews.

### Things that currently may not work

1. Nested scroll views (have not tried to verify) 

The `UIScrollView`s are always subviews of the `FlutterView`. If there are nested scrollables the focus system may not be able to properly determine the focus hierarchy (in theory the iOS focus system should never depend on `UIView.parentView` but I haven't tried to verify that).

2. If the next item is too far below the bottom of the screen and there is a tab bar with focusable items, the focus will be transferred to tab bar instead of the next item in the list

Video demo (as you can see the scrolling is really finicky):

https://github.com/user-attachments/assets/51c2bfe4-d7b3-4614-aa49-4256214f8978

I've tried doing the same thing using a `UITableView` with similar configurations but it seems to have the same problem. I'll try to dig a bit deeper into this and see if there's a workaround.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-11-26 00:39:15 +00:00
skia-flutter-autoroll
569d30910b Roll Skia from 12c8bd6ac1d9 to c1c8ff84997c (14 revisions) (flutter/engine#56801)
https://skia.googlesource.com/skia.git/+log/12c8bd6ac1d9..c1c8ff84997c

2024-11-25 danieldilan@google.com Revert "Change window::DisplayParams to be immutable and passed by pointer"
2024-11-25 lukasza@chromium.org [rust png] Build / sources organization: Separate `decoder/` directory.
2024-11-25 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 73e40f43c062 to 64698c1a35b2 (1 revision)
2024-11-25 kjlubick@google.com Change window::DisplayParams to be immutable and passed by pointer
2024-11-25 danieldilan@google.com Use SkSafe32 functions when adding/subtracting deltas.
2024-11-25 kjlubick@google.com Save 16 bytes on GrContextOptions allocations* by reordering fields
2024-11-25 skia-autoroll@skia-public.iam.gserviceaccount.com Roll skottie-base from e4021a6fc9aa to 52028e548417
2024-11-25 skia-autoroll@skia-public.iam.gserviceaccount.com Roll debugger-app-base from 931df19ec335 to 9e05eb5b9edb
2024-11-25 skia-autoroll@skia-public.iam.gserviceaccount.com Roll shaders-base from 99b73d05cdae to 7bdb025e3cbb
2024-11-25 skia-autoroll@skia-public.iam.gserviceaccount.com Roll jsfiddle-base from 034839b9814b to 99d4627f212e
2024-11-25 skia-autoroll@skia-public.iam.gserviceaccount.com Roll skottie-base from c0ad379b6c58 to e4021a6fc9aa
2024-11-25 kylechar@chromium.org Fix DefaultImageProvider::Make() leak
2024-11-25 kjlubick@google.com Make SkGlyph and GrDriverBugWorkarounds trivially destructible
2024-11-25 michaelludwig@google.com [graphite] Fix texture matrix for asyncReadPixelsYUV420

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,danieldilan@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://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-11-26 00:38:57 +00:00
Jonah Williams
0d4c7dbe07 [Impeller] better handle allocation herustics of Android slide in page transition. (flutter/engine#56762)
For https://github.com/flutter/flutter/pull/158881

The new Android m3 page transition animates a saveLayer w/ opacity + slide in animation. See example video from linked PR:

https://github.com/user-attachments/assets/1382374a-4e0c-4a0e-9d70-948ce12e6298

On each frame, we intersect the coverage rect of this saveLayer contents with the screen rect, and shrink it to a partial rectangle. But this changes each frame, which forces us to re-allocate a large texture each frame, causing performance issues.

Why not ignore the cull rect entirely? We sometimes ignore the cull rect for the image filter layer for similar reasons, but from observation, the sizes of these saveLayer can be slightly larger than the screen for flutter gallery. Instead, I attempted to use the cull rect size to shrink the saveLayer by shifting the origin before intersecting.

I think this should be safe to do, as I believe it could only leave the coverage as larger than it would have been and not smaller.
2024-11-25 23:48:05 +00:00
Chris Bracken
a661e86e3f iOS: Eliminate logging of non-zero origin platformviews (flutter/engine#56796)
In flutter/engine#35501, handling was added to log a debug message to the console in the case where a platform view with a non-zero origin was identified.

Unfortunately:
* In unopt builds, the first thing we do in that block is to call FML_DCHECK asserting that the origin is zero, so we never actually emit the log statement.
* In opt builds, FML_DCHECK is a no-op, so users are unlikely to actually ever notice the crash.

The proper fix is to eliminate this restriction, but in the meantime, this eliminates this block entirely and leaves the TODO. We've had only two comments on that bug in the 2.5 years since it was added.

Issue: https://github.com/flutter/flutter/issues/109700

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-11-25 23:38:59 +00:00
gaaclarke
8ad87e8401 [impeller] gles: started storing the number of handle deletions to avoid reallocation (flutter/engine#56799)
I saw in profiles that we were spending a lot of time in
push_back_slow_path. Reserving + emplacing removes that.
test-except: no functional change, performance increase

## 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 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
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[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
2024-11-25 15:35:33 -08:00
skia-flutter-autoroll
45f4ca57b7 Roll Fuchsia Linux SDK from 9o0fWa2xVhmxV6Mtn... to 50xtjbMWWrqay_7m_... (flutter/engine#56795)
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,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://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-11-25 22:36:22 +00:00