533 Commits

Author SHA1 Message Date
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
Matan Lurey
2681bee9ca Clang tidy-ify DlColor and friends. (flutter/engine#46122)
Closes https://github.com/flutter/flutter/issues/135057.

This is a fair bit more involved than previous changes, just due to the sheer number of implicit conversions.

Highlights:

- Made `public uint32_t argb` `private uint32_t argb_`, and added `argb()` instead.
- Added `ToSk(DlColor)` instead of using implicit conversions.

There were a bunch of places where I had to make a judgement call (particularly in tests) to keep the code a bit "messy", i.e. `DlColor(SK_RED)`, just to make the diff as small as possible and to prevent silly copy and paste bugs. I'd be open to filing a follow-up issue to reduce unnecessary wrapping.
2023-09-20 22:08:07 +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
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
Jonah Williams
62031173dd [Impeller] construct text frames on UI thread. (flutter/engine#45418)
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.

### Skia
```
  "average_frame_build_time_millis": 1.497333333333333,
  "90th_percentile_frame_build_time_millis": 2.038,
  "99th_percentile_frame_build_time_millis": 17.686,
  "worst_frame_build_time_millis": 23.095,
  "missed_frame_build_budget_count": 3,
  "average_frame_rasterizer_time_millis": 5.5078589743589745,
  "stddev_frame_rasterizer_time_millis": 2.226343414420338,
  "90th_percentile_frame_rasterizer_time_millis": 7.481,
  "99th_percentile_frame_rasterizer_time_millis": 19.11,
  "worst_frame_rasterizer_time_millis": 79.799,
  "missed_frame_rasterizer_budget_count": 7,
  "frame_count": 234,
  "frame_rasterizer_count": 234,
  "new_gen_gc_count": 10,
  "old_gen_gc_count": 2,
 ```
 
 ### Impeller (ToT)
 
 ```
   "average_frame_build_time_millis": 1.431575000000001,
  "90th_percentile_frame_build_time_millis": 2.196,
  "99th_percentile_frame_build_time_millis": 14.486,
  "worst_frame_build_time_millis": 23.728,
  "missed_frame_build_budget_count": 2,
  "average_frame_rasterizer_time_millis": 6.536087499999999,
  "stddev_frame_rasterizer_time_millis": 1.9902712500000004,
  "90th_percentile_frame_rasterizer_time_millis": 9.705,
  "99th_percentile_frame_rasterizer_time_millis": 14.727,
  "worst_frame_rasterizer_time_millis": 17.838,
  "missed_frame_rasterizer_budget_count": 1,
  "frame_count": 240,
  "frame_rasterizer_count": 240,
  "new_gen_gc_count": 10,
  "old_gen_gc_count": 2,
  ```
  
  ### Impeller (Patched)
  
  ```
    "average_frame_build_time_millis": 1.4500167364016743,
  "90th_percentile_frame_build_time_millis": 2.478,
  "99th_percentile_frame_build_time_millis": 14.883,
  "worst_frame_build_time_millis": 18.782,
  "missed_frame_build_budget_count": 1,
  "average_frame_rasterizer_time_millis": 5.023033333333336,
  "stddev_frame_rasterizer_time_millis": 1.6445388888888894,
  "90th_percentile_frame_rasterizer_time_millis": 7.814,
  "99th_percentile_frame_rasterizer_time_millis": 13.497,
  "worst_frame_rasterizer_time_millis": 15.008,
  "missed_frame_rasterizer_budget_count": 0,
  "frame_count": 239,
  "frame_rasterizer_count": 240,
  "new_gen_gc_count": 8,
  "old_gen_gc_count": 0,
  ```
2023-09-06 00:50:48 +00:00
Zachary Anderson
aad0b0f680 Revert dl split (flutter/engine#45326)
Reverting for https://github.com/flutter/flutter/issues/133525
fixes: https://github.com/flutter/engine/pull/45326
2023-08-31 17:46:12 +00:00
Dan Field
ffa16ec08f [Impeller] Reland DlAiksCanvas (flutter/engine#45232)
Relands https://github.com/flutter/engine/pull/45131

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

Differences from last time:

- Some minor merge conflict fixes
- Use the RTree to get the bounds instead of recalculating the bounds
- Make the iOS platform view controller implementation use the impeller-aware slices instead of the display list ones. This has been fixed for Android and the desktop embedding, but I missed iOS. The unit tests weren't actually running before I branched for my PR, @zanderso fixed them up separately and this resulted in catching the failures on post submit last time.
2023-08-31 00:29:23 +00:00
Jackson Gardner
fd9e7e8e8f [skwasm] encode PNGs using browser APIs (flutter/engine#45187)
This allows us to remove libpng from skia entirely, which saves us about 25kb brotli compressed.

Note, this should not change any functionality. The existing functionality is covered by the unit tests here: bfcb9d08e8/lib/web_ui/test/ui/image_golden_test.dart (L197-L197)
2023-08-28 23:08:46 +00:00
Matan Lurey
761720dc4c [Impeller] Implement TextDecoration (i.e. dashed lines) (flutter/engine#45041)
Closes https://github.com/flutter/flutter/issues/126673.

Ideally, this would be an `#ifdef`, but currently Impeller is a runtime
flag, for reasons (CI capacity?)

~~To be able to write tests, I'd need
https://github.com/flutter/flutter/issues/133264 completed.~~ Edit:


![life-uh](https://github.com/flutter/engine/assets/168174/c77314e4-f3f9-4b0d-b3f7-5b070ef51308)

## Before

![Screenshot 2023-08-23 at 5 25 40
PM](https://github.com/flutter/engine/assets/168174/40576807-17f2-4f5f-ba56-3cd5771e472d)

## After

<img width="795" alt="Screenshot 2023-08-24 at 9 56 48 AM"
src="https://github.com/flutter/engine/assets/168174/0e33f705-6a71-4468-8ec8-372a2e98624e">
2023-08-27 14:24:30 -07:00
Jonah Williams
a04635d9e6 Revert "[Impeller] DlAiksCanvas as a DlCanvas wrapper for impeller::Canvas" (flutter/engine#45149)
Reverts flutter/engine#45131

This is failing the Impeller variants of the unobstructed platform views tests:

https://ci.chromium.org/ui/p/flutter/builders/prod/Mac%20Production%20Engine%20Drone/132249/overview

```
Failing tests:
	-[UnobstructedPlatformViewTests testPlatformViewsMaxOverlays]
	-[UnobstructedPlatformViewTests testOneOverlay]
	-[UnobstructedPlatformViewTests testOneOverlayPartialIntersection]
	-[UnobstructedPlatformViewTests testTwoIntersectingOverlays]
	-[UnobstructedPlatformViewTests testOneOverlayAndTwoIntersectingOverlays]

** TEST FAILED **
```

We've retried it a few times so I suspect this isn't a flake.
2023-08-26 19:31:39 +00:00
Dan Field
e9b2008748 [Impeller] DlAiksCanvas as a DlCanvas wrapper for impeller::Canvas (flutter/engine#45131)
This is a reland of https://github.com/flutter/engine/pull/44248

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

Changes from last time:

- The `drawPoints` benchmark was failing to render anything meaningful because of an error in `AiksLayer` that resulted in an infinitely sized bounding rectangle poisoning the bounds with `NaN` (this happens, for example, with a `drawPaint` call, which that benchmark happens to use). Added a test covering this and filed https://github.com/flutter/flutter/issues/132770 to explore ways to avoid this in the future.
- There was a bug in `DlAiksCanvas::SaveLayer` where a `nullptr` `paint` but non-`nullptr` `backdrop` was failing to actually save the layer. This resulted in incorrect rendering.
- There was a bug in `impeller::Canvas::DrawPicture` that resulted in incorrect stencil depth counting. That was fixed separately by @bdero, but was the cause of incorrect rendering in some Wonderous screens.
- I've added a simple implementation for `AiksLayer::IsReplacing`. It does not currently compare as deeply as the `DisplayListLayer` version potentially does, but it is good enough to avoid the regression noted in https://github.com/flutter/flutter/issues/132071. That regression was on a benchmark that greatly benefits from partial repaint. With the new implementation, it still gains partial repaint where it previously did not. There is more work that can be done here, filed https://github.com/flutter/flutter/issues/133361 to track that work.

I merged but did not fully integrate the `DisplayListBuilder`/`CanvasToReceiver` work that @flar has done. I have a local experiment with that, but would prefer to see this land and run through the device lab so we get some better comparison numbers for which one performs better.
2023-08-26 05:37:28 +00:00
Jim Graham
5a9d0ee712 Reland "Split DisplayListBuilder into DlCanvas optimizer and DlOp recorder classes #44718" (flutter/engine#45085)
Fixes: https://github.com/flutter/flutter/issues/133200
2023-08-25 00:22:14 +00:00
Jim Graham
5fa5cb698e Revert "Split DisplayListBuilder into DlCanvas optimizer and DlOp recorder classes" (flutter/engine#44968)
Reverts flutter/engine#44718

A rendering issue was discovered in internal testing (b/296975714)
2023-08-22 19:14:48 +00:00
Jim Graham
5774ccf84f Split DisplayListBuilder into DlCanvas optimizer and DlOp recorder classes (flutter/engine#44718)
DisplayListBuilder grew over time from a class that implemented a developer-unfriendly stateful API into one that implemented both the developer-friendly DlCanvas API as well as its original stateful API. Over time, the stateful API was buried under a "testing only" facade.

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

This PR takes a major step along that direction by splitting DisplayListBuilder into essentially a convenience class that marries 2 new classes together to achieve its old functionality:
- `DlCanvasToReceiver` - a class that implements DlCanvas, optimizes common situations, and then sends commands to any object that implements `DlOpReceiver`
- `DlOpRecorder` - an implementation of DlOpReceiver that records the operations in a buffer from which to create a `DisplayList` object
- `DisplayListBuilder` now inherits from DlCanvasToReceiver to get the optimizations and provides it with an instance of `DlOpRecorder` as the receiver that it will send its results to
- Similarly, a `DlCanvasToReceiver` instance could be directed to an `impeller:DlDispatcher` to achieve a more straight-through path from the DlCanvas interface to impeller Pictures.
2023-08-21 07:17:19 +00:00
Jason Simmons
2ae4942db0 Use the Clang unreachable code warning flag in the engine tree (flutter/engine#44458) 2023-08-08 17:40:03 +00:00
Jason Simmons
0413e2710d Revert "[Impeller] DlCanvas implementation wrapping Aiks canvas" (flutter/engine#44466)
This reverts commit 1785eb5cb8cba53da249614158065d1d53f8f863.

See https://github.com/flutter/flutter/issues/132071
2023-08-07 23:59:47 +00:00
Dan Field
1785eb5cb8 [Impeller] DlCanvas implementation wrapping Aiks canvas (flutter/engine#44248)
Fixes https://github.com/flutter/flutter/issues/130141

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

Before this patch, the architecture is something like:

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

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

After this patch, the architecture instead looks like:

## UI Thread

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

## Raster thread

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

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

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

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

This patch does not remove the `impeller::DlDispatcher`, which now would only be used in tests.
2023-08-04 17:35:14 +00:00
LongCatIsLooong
b7472f9a45 Reland #43118 "Add a flag to ParagraphBuilder for rounding hack migration" (flutter/engine#43647)
real diff: aedc37a3e0

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

The incorrect default value (`true` instead of  `false`) was used in the PR and that caused internal test failures. I'll add a test before trying to reland.
2023-07-13 17:54:33 +00:00
LongCatIsLooong
3b27aa3e95 Add a flag to ParagraphBuilder for rounding hack migration (flutter/engine#43118)
The goal is to remove the rounding applied in skparagraph and in the framework: https://github.com/flutter/flutter/issues/31707

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

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-07-12 20:36:45 +00:00
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