Bruno Leroux
ce5194184d
[Android] Fix enableSuggestions set to false not honored ( flutter/engine#46037 )
...
## Description
This PR fixes an issue where setting `TextField.enableSuggestions` to false was not honored on Android.
Several Android devices (Samsung) and/or IMEs (including GBoard) does not disabled suggestions when `InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS `flag is set. The common solution is to rely on the following flag: ~~`InputType.TYPE_TEXT_VARIATION_PASSWORD`~~ `InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD`.
Reference:
- https://issuetracker.google.com/issues/36934423#comment4
- https://stackoverflow.com/questions/33148168/inputtype-type-text-flag-no-suggestions-in-samsung/33227237#33227237
- Existing comment on the codebase:
195a313245/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java (L270)
## Related Issue
Fixes https://github.com/flutter/flutter/issues/71679 .
## Tests
Adds 1 test.
2023-09-26 20:39:05 +00:00
Ian McKellar
a02355a95c
fuchsia: Update FIDL for unknown interactions ( flutter/engine#45773 )
...
This is part of a language change in FIDL. This should have no effect.
See: [https://fxbug.dev/88366 ](https://fxbug.dev/88366 )
2023-09-25 19:15:36 +00:00
Jonah Williams
f5ff960253
[Engine] use QoS classes in iOS engine. ( flutter/engine#46265 )
...
Hint to the CPU scheduler which of our threads are more important. This change should result in more stable rendering times on CI, but likely doesn't have any other observable effects.
2023-09-25 19:06:09 +00:00
Chris Yang
c889e14d4c
[ios] Fix default assets url ( flutter/engine#46214 )
...
When reverting the default asset url code, the old "flutter_assets" path was also copied in https://github.com/flutter/engine/pull/46073
This PR uses the correct URL. Although I'm unsure why the video player test passed before my change for the asset urls.
I'm going to take another look at it but meanwhile this PR can unblock the roll once rolled into the framework.
fixes of https://github.com/flutter/flutter/issues/135323
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-09-23 11:43:21 +00:00
Casey Hillers
27e8b0633d
Revert "[Impeller] fail if software backend is chosen and Impeller is enabled on iOS" ( flutter/engine#46217 )
...
Reverts flutter/engine#46124
See b/301660190. This is breaking a few Google iOS tests due to test bed configurations. We'll need more time to investigate fixing those tests before relanding.
2023-09-23 02:15:50 +00:00
Jonah Williams
7cd7603dfa
[Impeller] Reland: construct text frames on UI thread. ( flutter/engine#46115 )
...
Due to https://github.com/flutter/flutter/issues/127500 , we can get in a state where enable-impeller is true but we're using Skia. We need to either fall back completely to Skia, make this configuration fatal, or remote the check
----------------
Conversion of SkTextBlobs to impeller::TextFrame objects is one of the most expensive operations in display list dispatching. While the rest of the engine and framework makes a reasonable attempt to cache the SkTextBlobs generated during paragraph construction, the design of the dl dispatcher means that these the Impeller backend will always reconstruct all text frames on each frame - even if the display list/picture that contained those text frames was unchanged.
Removing this overhead is one of the goals of https://github.com/flutter/engine/pull/45386 , however this patch is also fairly risky and will be difficult to land. As a more incremental solution, we can instead construct the impeller::TextFrame objects when performing paragraph painting and record them in the display list. This both moves the text frame construction to the UI thread and allows the framework/engine to cache unchanged text frames.
This also does not conflict with the dl_aiks_canvas patch directly, and is fine to land before or after it does. (though I'd argue we should land this first).
To compare the current performance levels, I ran the complex_layout_scroll perf test, since this is fairly text filled. On a Pixel 6 pro. Across several runs this is a fairly consistent ~1ms raster time improvement.
Fixes https://github.com/flutter/flutter/issues/133204
2023-09-22 17:46:32 +00:00
Bruno Leroux
87139861e6
[iOS] Disable spelling corrections when auto correction is disabled ( flutter/engine#46144 )
...
## Description
This iOS PR disables spellchecking when auto correction is disabled.
## Related Issue
Fixes https://github.com/flutter/flutter/issues/134881 .
## Tests
Adds 1 test.
2023-09-22 06:00:58 +00:00
Dan Field
3ade44e1c7
[Impeller] fail if software backend is chosen and Impeller is enabled on iOS ( flutter/engine#46124 )
...
Fixes https://github.com/flutter/flutter/issues/127408
This is also related to https://github.com/flutter/engine/pull/44346 , which made it fatal to explicitly request both impeller and the software backend.
Before landing this, we need to update some google internal tests that end up in this state to explicitly request Skia (or to get into a mode where they can actually use metal).
2023-09-22 00:31:00 +00:00
John McCutchan
72c674cc1c
Re-enable HardwareBuffer backed Platform Views on Android >= 29 ( flutter/engine#46071 )
2023-09-21 14:40:31 -07:00
Tong Mu
38b8ce1c29
Reland: Enforce the rule of calling FlutterView.Render ( #45300 ) ( flutter/engine#45555 )
...
This PR relands #45300 which was reverted in https://github.com/flutter/engine/pull/45525 due to hanging on a windows startup test. The culprit test still calls `FlutterView.render` in the illegal way, which is ignored, causing no frame being ever produced. This has been fixed in https://github.com/flutter/flutter/pull/134245 . I've also searched through the framework repo for `render(` to ensure there are no other cases.
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-09-21 21:11:03 +00:00
Matan Lurey
476b46954c
Migrate from LOG_X to kLogX. ( flutter/engine#46107 )
...
These should be entirely non-breaking, i.e. 1:1 and same backing `int`
value.
(See https://github.com/flutter/engine/pull/46052 )
2023-09-20 13:24:01 -07:00
Chris Yang
bc8e93271b
[ios] fix asset url not found when loading app extension ( flutter/engine#46073 )
...
In b3fc48b91b , I refactored the assetsPath to use NSURL. It turns out that when the app bundle is not loaded (during launching app exgtension), the assetURL will return nil using the `URLForResource`, but the `pathForResource` successfully returns the raw path.
This PR reverts back to the raw path solution.
part of https://github.com/flutter/flutter/issues/124287
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-09-20 19:55:47 +00:00
Matan Lurey
792830c13f
Make a variety of low-impact Clang tidy fixes. ( flutter/engine#46114 )
...
Work towards https://github.com/flutter/flutter/issues/134969 .
These are all self-contained, so I bundled them all together.
All fixes are generated by `clang-tidy --fix`, and manual search/replace if that wasn't sufficient.
2023-09-20 19:52:03 +00:00
Jonah Williams
dc05767b39
[Impeller] Affinity adjustments for Vulkan backend. ( flutter/engine#46063 )
...
Runs the waiter threads with efficiency affinity and the worker thread with "not performance" affinity.
2023-09-19 23:34:11 +00:00
gaaclarke
8ddfb38703
[Impeller] adds hardware gate for wide gamut ( flutter/engine#46051 )
...
fixes https://github.com/flutter/flutter/issues/133015
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-09-19 22:27:36 +00:00
gaaclarke
70b4e83c3d
Made the warning about downgrading wide gamut happen at the correct time ( flutter/engine#46064 )
...
fixes https://github.com/flutter/flutter/issues/135033
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-09-19 21:45:35 +00:00
Matan Lurey
42bac1a9a9
Conform to clang_tidy in client_wrapper headers. ( flutter/engine#46058 )
...
Partial work towards https://github.com/flutter/flutter/issues/134969 .
All of these were auto-suggested by Clang, and mostly avoid unnecessary
copies.
2023-09-19 14:43:06 -07:00
Matan Lurey
4f1227c920
FlutterMouse.* -> kFlutterMouse.*, so we can lint header files. (flutter/engine#46056 )
...
Partial work towards https://github.com/flutter/flutter/issues/134969 .
---------
Co-authored-by: Chris Bracken <chris@bracken.jp>
2023-09-19 14:13:18 -07:00
Matan Lurey
3c7f8df584
Add TODO(name) to comply with Clang Tidy. ( flutter/engine#46057 )
...
Partial work towards https://github.com/flutter/flutter/issues/134969 .
2023-09-19 12:54:08 -07:00
Matan Lurey
7ebcf75a46
Rename layoutGoals to kLayoutGoals to enforce lints on headers. ( flutter/engine#46054 )
...
This is required to eventually land https://github.com/flutter/flutter/issues/134969 (lint header files).
2023-09-19 17:58:33 +00:00
Bruno Leroux
195a313245
[macOS,iOS] Expose channel buffers 'resize' and 'overflow' control co… ( flutter/engine#44848 )
...
## Description
This PR update the helper function that invokes the control channel 'resize' command (previous implementation relied on a deprecated format). It also adds a similar helper function for the 'overflow' commands exposed by the control channel.
See:
c00c022036/lib/ui/channel_buffers.dart (L302-L309)
## Related Issue
iOS and macOS implementation for https://github.com/flutter/flutter/issues/132386
Similar implementations:
- Android: https://github.com/flutter/engine/pull/44434
- Linux: https://github.com/flutter/engine/pull/44636
## Tests
Adds two tests.
2023-09-19 09:40:18 +00:00
Jonah Williams
88e963e0fd
[Android] Add support for setting thread affinity based on core speed. ( flutter/engine#45673 )
...
https://github.com/flutter/flutter/issues/134452
This patch parses the speed of all CPU data out of /proc and constructs a table that allows us to request high level CPU affinities: performance, efficiency, and not performance. These affinties are applied where appropriate during Android thread construction.
2023-09-19 03:50:05 +00:00
Chris Bracken
0a532593f1
Revert "[Windows] Update vsync on raster thread ( #45310 )" ( flutter/engine#46000 )
...
This also reverts the ANGLE roll (for which the original fix was landed) to 48e2c605adcd5bcc1622b18f357c7a73ebfb3543.
fixes: https://github.com/flutter/flutter/issues/134262
This reverts commit 2bec12f0b4d76d9f60d55d057e16cd2788083ade.
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-09-18 22:34:29 +00:00
John McCutchan
c74acc92aa
Disable HardwareBuffer backed Platform Views temporarily ( flutter/engine#45986 )
...
Necessary to unblock the GPay release
2023-09-18 12:36:16 -07:00
John McCutchan
4081d7d574
Tighten up ImageReaderPlatformViewRenderTarget code ( flutter/engine#45889 )
...
- Fix a missing Image close in an error path.
- Ensure we close the Image when the TextureEntry is finalized.
- Fix an inconsistency in the maxImages when running on Android < 33.
- Wrap acquireLatestImage in a try block and return a null image instead
of crashing the application.
2023-09-18 12:34:10 -07:00
LongCatIsLooong
5b716552a7
[iOS] Remove selectionDidChange call in UndoManager ( flutter/engine#45657 )
...
Fixes https://github.com/flutter/flutter/issues/133424
The `-[TextInputDelegate selectionDidChange:]` call actually triggers some unwanted keyboard NLP actions that generate a bunch of candidates and automatically accept the first candidate. This causes `-[UITextInput setMarkedText:selection]` to be called with the first candidate and that inserts extraneous characters after the user types certain characters on the iPad software keyboard.
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-09-18 17:18:57 +00:00
Jonah Williams
83f48da122
Revert "[Impeller] construct text frames on UI thread." ( flutter/engine#45910 )
...
Reverts flutter/engine#45418
Some google3 tests are hitting the CHECK I added in the DlSkCanvasDispatcher::drawTextFrame, which indicates that the SkParagraph code likely thinks impeller is enabled, whereas other code might be running with Skia.
Perhaps this could happen if its software rendering? It should be a fatal error on startup so we can track this down.
2023-09-16 01:22:13 +00:00
Kevin Lubick
7da278b05b
Migrate GrMipmapped->skgpu::Mipmapped ( flutter/engine#45881 )
...
Skia's Graphite and Ganesh backend coalesced two enums regarding mipmaps
into one and deprecated the public Ganesh version. This migrates Flutter
to use the preferred type.
No functional changes expected. See also
https://skia-review.googlesource.com/c/skia/+/753567
## 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 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
[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
2023-09-15 11:48:20 -04:00
XuanTung95
f95e3baebc
Reduce unnecessary Dart_TimelineGetMicros call ( flutter/engine#45637 )
...
Minor changes that reduce unnecessary Dart_TimelineGetMicros calls.
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-09-14 22:46:56 +00:00
yaakovschectman
52ce8f488d
Handle external window's WM_CLOSE in lifecycle manager ( flutter/engine#45840 )
...
Handle the close messages from non-Flutter windows similarly to how we
handle our own, for graceful app exit purposes.
https://github.com/flutter/flutter/issues/131497
## 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 `///`).
- [ ] 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
2023-09-14 17:07:14 -04:00
Michael Goderbauer
efc22ee283
Enable private field promotion ( flutter/engine#45722 )
...
New feature in upcoming Dart 3.2. See https://github.com/dart-lang/language/issues/2020 . Feature is enabled by bumping the min SDK version to 3.2.
Part of https://github.com/flutter/flutter/issues/134476 .
2023-09-14 21:02:03 +00:00
yaakovschectman
deaf9cc98c
Use start instead of extent for Windows IME cursor position ( flutter/engine#45667 )
...
When composing with the IME in a text edit, we should add the `start` of
the composition range to the in-composition `cursor_pos` rather than its
`extent`. When using `extent`, the cursor position would always be
outside of the composition range, resulting in the linked bug. Add a
test to check cursor position.
https://github.com/flutter/flutter/issues/123749
## 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 `///`).
- [ ] 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
2023-09-13 16:17:48 -04:00
gaaclarke
0a381989a4
Revert "[Impeller] Patch the compiler to account for subpass inputs and PSO metadata." ( flutter/engine#45777 )
...
Reverts flutter/engine#45739
fixes https://github.com/flutter/flutter/issues/134666
2023-09-13 18:46:14 +00:00
Chinmay Garde
6631e24259
[Impeller] Patch the compiler to account for subpass inputs and PSO metadata. ( flutter/engine#45739 )
...
Towards https://github.com/flutter/flutter/issues/128911
Drive by fixes https://github.com/flutter/flutter/issues/123795
2023-09-12 23:39:16 +00:00
gaaclarke
9a1606cb17
Added test to assert the vulkan embedder threadsafe vkqueue usage ( flutter/engine#45732 )
...
fixes https://github.com/flutter/flutter/issues/133933
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-09-12 21:52:10 +00:00
Chinmay Garde
cf31c43c78
[Impeller] If validations are enabled but not found, still create the VK context. ( flutter/engine#45674 )
...
Fixes https://github.com/flutter/flutter/issues/131714
2023-09-12 21:30:04 +00:00
Chris Yang
c2976f7ad8
Reland "Build iOS unittest target in unopt builds" ( #44356 )"" ( #45346 )" ( flutter/engine#45519 )
...
Reland https://github.com/flutter/engine/pull/44821
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-09-12 19:17:01 +00:00
Chris Yang
911433bc29
[ios] Fix testDeallocated failing locally. ( flutter/engine#45663 )
...
Moving the code block to autorelease pool to ensure the FlutterEngine is released in the test.
Fixes: https://github.com/flutter/flutter/issues/134388
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-09-12 18:43:40 +00:00
gaaclarke
296e9102a0
[Impeller] moved validation layers on by default logic to gni scripts ( flutter/engine#45682 )
...
fixes https://github.com/flutter/flutter/issues/134460
Test will happen in the flutter repo as a result of
https://github.com/flutter/flutter/issues/134175
## 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 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
2023-09-12 09:41:55 -07:00
Derek Xu
6a088c7a02
Add trace-to-file switch ( flutter/engine#45553 )
2023-09-12 11:35:10 -04:00
yaakovschectman
aaea38144b
Merge Window into FlutterWindow ( flutter/engine#45542 )
...
Merge abstract base class `Window` into concrete derived class
`FlutterWindow` to simplify future development.
https://github.com/flutter/flutter/issues/132260
## 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 `///`).
- [ ] 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
---------
Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
2023-09-11 17:59:47 -04:00
gaaclarke
4c3f956980
Revert "Makes Skia's vkQueueSubmit threadsafe." ( flutter/engine#45650 )
...
Reverts flutter/engine#45459
I'm going to revert this. It works fine in tests, but it's not going to work for real usage of the embedder since the user has free access to the vkQueue and thus has no way to ensure that the vkQueue isn't used concurrently.
See: https://github.com/flutter/flutter/issues/133933#issuecomment-1712522964
2023-09-11 16:51:13 +00:00
Kevin Lubick
75a05f03e7
Use safer GrDirectContext APIs ( flutter/engine#45644 )
...
In http://review.skia.org/750403 and http://review.skia.org/751523 , Skia
modified some `GrDirectContext` APIs to make them less error-prone in
response to https://crbug.com/1475906 . This updates Flutter to call
those modified APIs.
## 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.
- [ ] 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
2023-09-11 11:28:25 -04:00
gaaclarke
66cdbc5dc9
Makes Skia's vkQueueSubmit threadsafe. ( flutter/engine#45459 )
...
fixes https://github.com/flutter/flutter/issues/133933
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-09-09 00:52:53 +00:00
hellohuanlin
4d9074ec8b
Reverts part of "fix auto-correction highlight on top left corner (Again)" ( flutter/engine#45523 )
...
This reverts part of https://github.com/flutter/engine/pull/44779 . Verified this to be the regression for https://github.com/flutter/flutter/issues/133908 .
This pair of `textWill/DidChange` calls was added in Beta 1, in order to fix highlight region missing last character (more details [here](https://docs.google.com/document/d/1sM3HMv-SQin39yX1aPUU7vtGv7Hcef1Quc3QhRXBl6A/edit?resourcekey=0-SFYD8vmOIkXiXCZvB1Wlcw#heading=h.ddlvu2i2epyl )).
However, that fix doesn't work anymore for Beta 7 - it turns out that in Beta 7, the system doesn't rely on the `selectionRects` to determine the highlight region anymore. Instead, the system relies on `firstRectForRange` API. So we fixed the system highlight in `firstRectForRange` in Beta 7.
So even after reverting this change, the system highlight still works correctly in Beta 7. I was initially leaning towards keeping these calls even after Beta 7, because without it, the `selectionRects` are still out of sync with iOS text input system. (more details [here](https://docs.google.com/document/d/1sM3HMv-SQin39yX1aPUU7vtGv7Hcef1Quc3QhRXBl6A/edit?resourcekey=0-SFYD8vmOIkXiXCZvB1Wlcw )).
However, I was able to verify that it is indeed `textWill/DidChange` that introduced the regression for IME inputs (It's unclear why they are related, so need further investigation).
In summary, after this revert, system highlights are still in the right place, and with the right length.
*List which issues are fixed by this PR. You must list at least one issue.*
Fixes https://github.com/flutter/flutter/issues/133908
*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-09-07 20:11:07 +00:00
Emircan Uysaler
929a86d3fc
[fuchsia] Restructure Flatland vsync loop ( flutter/engine#45531 )
...
This CL restructures Flatland vsync loop to fire for each vsync instead
of each OnNextFrameBegin. As shown in the traces attached to the bug,
the current implementation of firing callbacks on each OnNextFrameBegin
causes skips when Flutter has longer draw calls. By scheduling frames in
between, we are increasing the chance of sending one before the latch
point. OnNextFrameBegin is now used to keep track of present credits and
future presentation times as well as when to start frame, replacing the
need for max_frames_in_flight and vsync_offset fields.
Bug: b/296272449
2023-09-07 14:14:46 -04:00
Kevin Lubick
8aeac03253
Explicitly encode SkImages in SkPictures as PNG ( flutter/engine#45511 )
...
Skia plans to stop the default behavior of encoding SkImages in
SkPictures using a PNG encoder. To preserve that behavior, clients need
to explicitly set an SkSerialProc to do so.
This was the only location I could find in Flutter which serialized an
skp.
## 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 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
[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
2023-09-07 13:06:02 -04:00
Zachary Anderson
a1dcb39a45
Revert "Enforce the rule of calling FlutterView.Render" ( flutter/engine#45525 )
...
Reverts flutter/engine#45300
Speculative revert for the post-submit framework CI failure in `windows_startup_test`: https://ci.chromium.org/ui/p/flutter/builders/prod/Windows%20windows_startup_test/6227/overview
2023-09-07 01:35:09 +00:00
stuartmorgan
5dc4e70477
Add macOS support for plugin value publishing ( flutter/engine#45502 )
...
These directly copy the iOS APIs, to minimize the branching needed in plugins with shared implementation code, and to facilitate the long-term goal of merging the iOS and macOS plugin headers. This does mean replicating the unfortunately non-idiomatic behavior of having `valuePublishedByPlugin:` sometimes return `nil` and sometimes return `NSNull`, instead of distinguishing between `nil` cases (if that's actually even necessary here) via a more specific API. In isolation I would definitely not design the API with this behavior, but consistency with iOS is the more important factor.
(Eventually I think we'll need a sort of "v2" of iOS plugin APIs since there are a number of strange behaviors that we're currently stuck with, but migrating iOS and macOS together to a new set of APIs won't be any harder than doing just iOS, and in the short to medium term consistency will help the ecosystem more that trying to pre-create better APIs as macOS-only.)
Also fixes `FlutterEngineRegistrar` to have a weak pointer to the engine. This should really already have been the case since plugins can retain the registrar, creating a likely cycle; it's now a guaranteed cycle (and failed unit tests designed to find cycles) without that since the engine itself is now keeping references to them.
Fixes https://github.com/flutter/flutter/issues/124721
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-09-06 20:44:02 +00:00
Tong Mu
0b39609150
Enforce the rule of calling FlutterView.Render ( flutter/engine#45300 )
...
This PR enforces the rules as documented in `FlutterView.Render`, where
calls in illegal situations should be ignored - but have never been
enforced.
```
/// This function must be called within the scope of the
/// [PlatformDispatcher.onBeginFrame] or [PlatformDispatcher.onDrawFrame]
/// callbacks being invoked.
///
/// If this function is called a second time during a single
/// [PlatformDispatcher.onBeginFrame]/[PlatformDispatcher.onDrawFrame]
/// callback sequence or called outside the scope of those callbacks, the call
/// will be ignored.
```
This rule is very important to implementing multi-view without having to
introduce new APIs. However, currently these illegal calls are not
ignored, and historically many tests (especially integration tests) were
unknowingly running based on this fact. @goderbauer did great work by
eliminating these cases in g3, and it's time for us to make sure these
calls are ignored.
Most effort of this PR goes to unit testing the changes. Some part of
`Shell::Create` is extracted into a static function to avoid duplicate
code.
## Pre-launch Checklist
- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] 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].
- [ ] 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 `///`).
- [ ] I signed the [CLA].
- [ ] 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-09-06 12:56:42 -07:00