chunhtai
d6bf0fc362
setupDefultFontManager correctly clear out cache ( flutter/engine#42178 )
...
fixes https://github.com/flutter/flutter/issues/123483
Not entirely sure if this really fix the flake as I can't reproduce locally. My guess to the flake is that the setDefaultfontmgr should only be called once during the life time of the app. The setDefaultfontmgr can be remove at the call site, since it is already called during setup
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-06-13 21:49:03 +00:00
Valentin Hăloiu
7fa6d7123c
Dynamically link against system fontconfig ( flutter/engine#40725 )
...
This is the engine counterpart for https://github.com/flutter/buildroot/pull/701 . That pull-request contains more context and the main motivation for this change.
This should fix some startup performance issues related to font loading on desktop linux: https://github.com/flutter/flutter/issues/118911 .
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-25 18:43:06 +00:00
Jackson Gardner
9d87a21795
Use client ICU data with skwasm. ( flutter/engine#42018 )
...
This implements https://github.com/flutter/flutter/issues/126340
For now, I am keeping this implementation simple without any extra caching. I may add caching later based on profiling results.
2023-05-16 22:07:16 +00:00
Jason Simmons
6d1e5ca312
Convert public API NativeFieldWrapper classes to abstract interfaces ( flutter/engine#41945 )
...
See https://github.com/flutter/flutter/issues/123756
2023-05-16 18:13:07 +00:00
Jackson Gardner
4daa0909c2
Compile skwasm at -Oz. ( flutter/engine#42002 )
...
We want to start from a place of small size, and optimize from there with skwasm. Since there is no baseline expectation of performance at `-O3`, let's start with the smallest possible binary.
2023-05-15 19:59:14 +00:00
Jackson Gardner
3c85b2e565
Implement text rendering in Skwasm ( flutter/engine#41832 )
...
This implements full text rendering with the Skwasm renderer.
The font fallback logic has been refactored to decouple the font fallback manager from any CanvasKit-specific types and functions.
A chunk of CanvasKit text rendering tests have been ported over to the renderer-agnostic `ui` tests.
Fixes https://github.com/flutter/flutter/issues/126339
2023-05-09 23:37:21 +00:00
Jackson Gardner
16360e9e25
Reland "Skwasm Font Loading ( flutter/engine#41756 )
...
This relands https://github.com/flutter/engine/pull/41246 , which had to be reverted due to some issues parsing the font manifest.
2023-05-08 18:17:22 +00:00
Jackson Gardner
f2970b73b0
Revert "Skwasm Font Loading" ( flutter/engine#41750 )
...
Reverts flutter/engine#41246
The new font manifest parsing fails in some cases.
2023-05-04 23:54:18 +00:00
Jackson Gardner
6f5ad9737e
Skwasm Font Loading ( flutter/engine#41246 )
...
This implements font loading for the skwasm renderer.
In addition, it does some pretty major refactors:
1) Simplified the font collection interface to just have a single `loadAssetFonts` call, without the separate registration and debug fonts loading stuff
2) Debug fonts load now through http/asset mocking mechanisms instead of having a separate `downloadDebugTestFonts` call
3) Consolidated a few of our different unit test setup functions into a single `setUpUnitTests` function
2023-05-04 18:22:53 +00:00
Brandon DeRosier
b4271c24de
Add missing header guards ( flutter/engine#41322 )
...
These keep turning up, so I did a little bash-fu to find them all.
```bash
grep -lL "#pragma once" $(grep -lL "#ifndef .*_H_" $(find . | grep "\.h$")) | cut -c 3-
```
2023-04-19 21:20:21 +00:00
Jackson Gardner
28d9e0df0f
Improve Wasm Debugging. ( flutter/engine#41054 )
...
Improve Wasm Debugging.
2023-04-12 00:52:04 +00:00
yaakovschectman
8179d070b3
[Windows] Ignore case optionally in AXPlatformNodeTextRangeProviderWin::FindText ( flutter/engine#39922 )
...
When `ignore_case` is `true`, convert needle and haystack strings to
lowercase before performing search,
https://github.com/flutter/flutter/issues/117013
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide] and the [C++,
Objective-C, Java style guides].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I added new tests to check the change I am making or feature I am
adding, or Hixie said the PR is test-exempt. See [testing the engine]
for instructions on writing and running engine tests.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [ ] I signed the [CLA].
- [x] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2023-04-11 14:54:56 -04:00
Jackson Gardner
911b85dc77
Copy canvaskit files directly into flutter_web_sdk ( flutter/engine#40951 )
...
Copy canvaskit files directly into `flutter_web_sdk`
2023-04-05 22:55:41 +00:00
Harry Terkelsen
89f12f767f
Revert "Re-enable LTO and roll buildroot to enable sINLINING_LIMIT" ( flutter/engine#40822 )
...
Reverts flutter/engine#40808
Regresses benchmarks:
https://flutter-flutter-perf.skia.org/e/?numCommits=100&queries=test%3Dweb_benchmarks_canvaskit
2023-03-31 12:35:59 -07:00
Jackson Gardner
63dac880c4
Re-enable LTO and roll buildroot to enable sINLINING_LIMIT ( flutter/engine#40808 )
...
Re-enable LTO and roll buildroot to enable `sINLINING_LIMIT`
2023-03-31 04:09:55 +00:00
Jason Simmons
7dbbb4052e
Disable LTO in builds of CanvasKit to reduce binary size ( flutter/engine#40733 )
...
Disable LTO in builds of CanvasKit to reduce binary size
2023-03-29 20:46:37 +00:00
bungeman
13b279990a
Simplify SkFontMgr classes for sk_sp ( flutter/engine#40627 )
...
These subclasses were previously made very generic to work with both the
pre-sk_sp version of SkFontMgr and the using-sk_sp version of SkFontMgr.
Now that SkFontMgr uses sk_sp for return types, simplify the subclasses.
2023-03-27 16:06:07 -04:00
Dan Field
96773d7c04
Avoid implicit conversions to floats in dart:ui ( flutter/engine#40098 )
...
Avoid implicit conversions to floats in dart:ui
2023-03-24 21:36:41 +00:00
bungeman
d347698e68
Make SkFontMgr subclasses flexible for sk_sp ( flutter/engine#40556 )
...
Skia is changing SkFontMgr and SkFontStyleSet methods to consistently
return sk_sp<SkTypeface> and sk_sp<SkFontStyleSet> instead of
SkTypeface* and SkFontStyleSet*. The pointers returned always needed to
be SkSafeUnref'ed but with sk_sp this ownership is now explicit.
Flutter subclasses both SkFontMgr and SkFontStyleSet and overrides
affected methods. Normally Skia would roll out this change behind a
build flag which would first be set in Flutter (to hold out the change),
Skia then rolled into Flutter, then the build flag removed from Flutter
(along with updating the subclasses). However, this is made quite
difficult and slow because of the need to also be compatible with
Flutter in other repositories at the same time. Instead, this change
updates the subclasses to infer the correct return types in a way that
will work both with and without the Skia change. After the Skia change
is landed and rolled into Flutter the subclasses will be re-simplified
to match the new method signatures.
[0] https://skia-review.googlesource.com/c/skia/+/659856
2023-03-23 09:48:22 -04:00
Mouad Debbar
a3aea64db2
[web] Put image codecs back into CanvasKit Chromium ( flutter/engine#40501 )
...
[web] Put image codecs back into CanvasKit Chromium
2023-03-21 21:08:22 +00:00
Valentin Hăloiu
3fba8a33be
Fix duplicate calls to system font loading on Linux ( flutter/engine#40469 )
2023-03-21 13:48:49 -07:00
Jim Graham
37317c5984
restructure DL sources into sub-directories and new file naming conventions ( flutter/engine#40157 )
...
restructure DL sources into sub-directories and new file naming conventions
2023-03-21 02:34:48 +00:00
Mouad Debbar
c7b040ec98
[web] Remove image codecs from Canvaskit Chromium ( flutter/engine#40309 )
...
[web] Remove image codecs from Canvaskit Chromium
2023-03-17 19:14:49 +00:00
Michael Goderbauer
dcc4b1b535
Reland: Bump lower Dart SDK constraints to 3.0 ( flutter/engine#40318 )
...
* WIP
Bump to 3.0.0-0
* fix lints
* drop web_ui
* opt pointer_converter.dart out of dart 3
* Revert "drop web_ui"
This reverts commit b97a015d5cd0d7e0380a4231be4c31aad36671f1.
2023-03-16 08:07:39 -07:00
Zachary Anderson
32b3e66d7c
Revert "Bump lower Dart SDK constraints to 3.0 ( #40178 )" ( flutter/engine#40317 )
...
Revert "Bump lower Dart SDK constraints to 3.0"
2023-03-15 18:53:00 +00:00
Michael Goderbauer
828f3deb86
Bump lower Dart SDK constraints to 3.0 ( flutter/engine#40178 )
...
Bump lower Dart SDK constraints to 3.0
2023-03-15 17:57:04 +00:00
Yegor
e9abb22ba1
Revert "[web] Access engine version to get correct gstatic URL ( #40194 )" ( flutter/engine#40235 )
...
This reverts commit 46682951fe7f61296070c2fdfb673576628bbd89.
2023-03-10 14:46:06 -08:00
Harry Terkelsen
46682951fe
[web] Access engine version to get correct gstatic URL ( flutter/engine#40194 )
2023-03-10 10:16:48 -08:00
Mouad Debbar
f9989a551d
[web] Copy canvaskit_chromium/* to canvaskit/chromium/* ( flutter/engine#39796 )
...
[web] Copy canvaskit_chromium/* to canvaskit/chromium/*
2023-03-03 22:07:49 +00:00
Jason Simmons
90c1952420
Remove obsolete SkPaint foreground/background attributes from TextStyle ( flutter/engine#40059 )
...
Remove obsolete SkPaint foreground/background attributes from TextStyle
2023-03-03 22:02:47 +00:00
LongCatIsLooong
48c413ae2f
Add new test font ( flutter/engine#39809 )
...
Add new test font
2023-03-03 21:38:01 +00:00
Jackson Gardner
a3dc9e77fb
Skwasm Renderer - initial implementation ( flutter/engine#39072 )
...
Skwasm Renderer - initial implementation
2023-03-02 00:01:04 +00:00
Jim Graham
0fa8cbec8a
Create DlCanvas interface and implement with DisplayListBuilder and SkCanvasAdapter ( flutter/engine#39762 )
...
* Create DlCanvas interface and implement with DisplayListBuilder and SkCanvasAdapter
2023-02-23 22:09:35 -08:00
Jason Simmons
5f09e0fdf0
Remove Libtxt and Minikin ( flutter/engine#39499 )
2023-02-13 17:16:04 +00:00
Jake Schafer
ec42a1d6e0
iOS keyboard animation synchronization ( flutter/engine#37604 )
...
* first keyboard commit
* first keyboard commit
* cleaned up from initial testing
* added keyboard animation stop calculation
* added keyboard animation stop calculation
* lucky updates :)
* type change
* final touches
* final touches
* final touches
* removed KeyboardAnimationView class
* removed KeyboardAnimationView class
* dynamic keyboard spring curve implementation
* broke out spring curve to own objc files
* broke out spring curve to own objc files
* simplified and added test
* modified spring formula to use damping
* added logic for compounding simultaneous animation calls
* remove unnecessary code
* cleanup
* cleanup
* update springCurveIos file
* cleaning up
* simple optimizations
* comment update
* bool update
* credit spring calculation project
* improved setupKeyboardAnimationCureveIfNeeded tests
Improved setupKeyboardAnimationCurveIfNeeded tests
* Optimized compounding animation checks and added new tests
* changed viewport update logic
* Update FlutterViewControllerTest.mm
Updated test nits
* Updated license
* Updated tests
* Cleanup
* Migrated spring class based on React
* Updated syntax
* Update shell/platform/darwin/ios/framework/Source/spring_curve_ios.mm
Co-authored-by: Jenn Magder <magder@google.com>
* Update shell/platform/darwin/ios/framework/Source/spring_curve_ios.h
Co-authored-by: Jenn Magder <magder@google.com>
* Updated naming
* Updated naming
* Optimized spring model calculations
* Improved interpolation accuracy
* Revert "Improved interpolation accuracy"
This reverts commit 6d025129b620db44741f70d659900430d9536628.
* Updated comment
* Updated spring curve comments
* updated to work with third_party spring animation
* updated to use SpringAnimation to/from values
* updated license (removed old files)
* updates
* allow updating springanimation position values
* updated test
* update
* fixes
---------
Co-authored-by: Jenn Magder <magder@google.com>
2023-02-07 01:12:23 +00:00
yaakovschectman
24ce1df7f9
Fire UIA event on Checkbox state change ( flutter/engine#39346 )
...
* Issue property change event
* Test checkbox property
* Formatting
2023-02-03 11:21:25 -05:00
luckysmg
e9254a637b
Add iOS spring animation objc files ( flutter/engine#38801 )
...
* ++
* ++
* ++
* ++
* ++
* ++
* Add tests
* ++
* ++
* ++
* ++
* ++
2023-02-02 00:29:17 +00:00
Mouad Debbar
5fafcca371
[web] Use our own icu_bidi ( flutter/engine#39200 )
2023-01-30 23:29:42 +00:00
Ahmed Ashour
51c0a9ec65
Remove superfluous words from comments ( flutter/engine#39068 )
...
* Remove superfluous words.
* Format
* Duplicate in consecutive lines.
2023-01-24 09:54:19 -08:00
Daco Harkes
59ca77bd1e
Migrate @FfiNative to @Native ( flutter/engine#39034 )
2023-01-24 11:39:19 +00:00
Mouad Debbar
105bb9ab43
[web] Build multiple CanvasKit variants (using toolchain_args) ( flutter/engine#38448 )
...
* [web] New gn for building CanvasKit
* Use toolchain_args to override CanvasKit gn args
* Use correct path for the generated canvaskit files
* Put toolchain close to target
* remove extra toolchains
* remove extra import
* add canvaskit_lite to archive
* fix local canvaskit path in tests
* add some guards using visibility and asserts
* renames
* formatting
* rename mistake
* Add github issue to the TODO
* Update buildroot sha
* clang-tidy error
* skip canvaskit targets when not needed
2023-01-23 20:37:18 +00:00
Chris Bracken
1dd1f02bc4
Extract WideToUTF16String/UTF16StringToWide to FML ( flutter/engine#39020 )
2023-01-19 22:55:47 -08:00
godofredoc
aa2afcdeb5
Revert "Extract WideToUTF16String/UTF16StringToWide to FML ( #39006 )" ( flutter/engine#39019 )
...
This reverts commit d96d942ddc22af628e00ab958ec9860e338ce17f.
2023-01-20 00:45:58 +00:00
Chris Bracken
d96d942ddc
Extract WideToUTF16String/UTF16StringToWide to FML ( flutter/engine#39006 )
...
* Extract WideToUTF16String/UTF16StringToWide to FML
In third_party/accessibility, for string conversion, we use a mix of:
* FML
* third_party/accessibility base string utility functions
* static functions local to the translation unit itself
This moves all conversions between UTF16 and wide strings to FML. Note
that this implementation is only safe on platforms where:
* the size of wchar_t and char16_t are the same
* the encoding of wchar_t and char16_t are both UTF-16
which is the case for Windows, hence why these functions are implemented
in a Windows-specific translation unit (wstring_conversion).
Issue: https://github.com/flutter/flutter/issues/118811
* Migrate UTF16ToWide as well
2023-01-19 23:46:59 +00:00
yaakovschectman
7ed656d596
Merge MSAA alert functionality with UIA ( flutter/engine#38745 )
...
* Use AXFragmentRootWin for MSAA functionality.
Some unused code remains to be removed.
Merge MSAA to AXFragmentRootWin
* Removing unused code
* Remove unused files
* Flip macro
* Formatting
* Licenses
* Make reference
* Disable copy constructor/assignment
* Unused import
* Formatting
* Relocate alert logic
* Remove comment and unused mock
* Fix unit test
* Idempotency
* Formatting
* PR feedback
* Doc comments
* Undo string change for now
* Couple fragment root and alert node
* Formatting
* Add comments
* Pointer to reference
* Typo fix
2023-01-19 13:28:27 -05:00
Ian Hickson
b454e06ec4
Add SpringAnimation.js from React Native ( flutter/engine#38750 )
...
* added react native lib
* update license
Co-authored-by: Jake Schafer <pickle.plaza@gmail.com>
2023-01-11 00:36:23 +00:00
yaakovschectman
834e18e506
Re-enable UIA text/range provider unit tests ( flutter/engine#38718 )
...
* Enable unit tests
* Newline
2023-01-09 15:11:43 -05:00
yaakovschectman
0bbc7cac7b
Consider more roles as text ( flutter/engine#38645 )
2023-01-05 13:45:06 -05:00
yaakovschectman
2c3494009b
Add TextProvider and TextEdit patterns to AXPlatformNodeWin ( flutter/engine#38646 )
...
* Add TextProvider and TextEdit patterns to AXPlatformNodeWin
* Formatting
2023-01-05 09:13:02 -05:00
Loïc Sharma
18a38c535a
Fix build using VS 17.4's C++ STL ( flutter/engine#38614 )
2023-01-04 21:21:46 +00:00