Revert label failed due to conflicts
`FlutterFragmentTest.java` was the only file that had merge issues, everything else is the output of `git revert 802e5d2cd3c9e73f336e3fe43487b64a5fdf98d8`
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
We can set the minimum stroke width to 0.5 to guarantee at least one hit of 4x MSAA coverage. This doesn't fix stroke fidelity issues but it does make it a bit better.
https://github.com/flutter/flutter/issues/144313
Upgrades every `androidx` dependency in the `src/third_party/android_embedding_dependencies` bundle to the latest version, except the `lifecycle` group*. Tested running a couple of apps as well because when updating these dependencies in the past I've been able to build the engine but then flutter run fail when trying to run an app.
Fixes https://github.com/flutter/flutter/issues/129307, also unblocks a feature that will eventually be needed for Scribe.
[*]`2.8.0` is the latest there, but I ran into an issue with dexing when I tried to upgrade, due to b/336164417, an AGP bug that had its fix backported to all >`8.0.0` versions, but we still support less than that so we will have to wait on that upgrade.
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Multiple fixes to text rendering that match skia behavior on almost all bugs I've found, except for the glyphs are still _slightly_ too fine for some CJK text. The fixes are:
1. Compute the gylph size in the typographer context, using text size * scale factor text, instead of computing smaller bounds and scaling it up. This was not accurate and as a result we would positon glyphs incorrect by multiple pixels sometimes, causing uneven rows.
2. Match Skia's rounding behavior. previously we were rounding in multiple places, Skia rounds once. This is important to prevent jumping.
3. Use 4 subpixel X positions for rendering. This is the big one that ensures the visible layout matches exactly. Adds support for Y, both, and none positioning too. I couldn't find any examples of just Y or both. Some fonts may specify that have no subpixel positioning. So we don't bother to compute it for those.
Fixes https://github.com/flutter/flutter/issues/138386 / mostly, except slightly not bold enough.
Fixes https://github.com/flutter/flutter/issues/147577 / mostly, except slightly not bold enough.
Fixes https://github.com/flutter/flutter/issues/140475
Fixes https://github.com/flutter/flutter/issues/141467
Fixes https://github.com/flutter/flutter/issues/135523
Fixes https://github.com/flutter/flutter/issues/127815
Introduces a sentinel value `kTextHeightNone` for `ui.TextStyle.height` which can be used to "unset" the current `TextStyle.height` (and for consistency, it applies to `StructStyle.height` and `ParagraphStyle.height` too). Documentation of `TextStyle.height` can be found [here](https://main-api.flutter.dev/flutter/painting/TextStyle/height.html) (the one from `painting` library not `dart:ui`).
part of https://github.com/flutter/flutter/issues/58765: currently `TextStyle.height` uses `null` as the sentinel value for "no height multiplier specified, use the font height", which has conflicting semantics: it means the height multiplier is not set (so the span height is determined by font metrics) but in reality it also means the height should inherit from its parent span (or in `copyWith` context, it means do not override the height).
The new sentinel value `kTextHeightNone` is currently set to `0.0`. This is because skparagraph internally uses 0 for "no height multiplier", so using 0 should minimize the behavior change:
62f369c759/modules/skparagraph/src/Run.cpp (L65-L67)
This MAY still change the current behavior: for consistency setting `StructStyle.height` / `ParagraphStyle.height` to the sentinel value also unsets the height multiplier which may not be the current behavior.
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Resolves https://github.com/flutter/flutter/issues/134748.
This was a really fun experiment. I learned a lot from it, and it
genuinely helped me solve some coverage-related problems, but the
reality is it was too little too late -- by the time we had this
capture system, we had already solved most of the problems that would
have benefitted from this.
It's been a few months since I've used or extended the capabilities of
this capture system for something, and I don't have the spare
time/energy to give it the love it needs to realize the vision I had
for it. I still almost exclusively use a combination of native frame
captures and print debugging to solve problems.
RIP in peace.
This reverts commit 104eb98e62. (https://github.com/flutter/engine/pull/52680)
The snapshot's transform is provided to the pipeline. If the vertices are based on the coverage rectangle, then that will apply the snapshot's transform twice.
Fixes https://github.com/flutter/flutter/issues/148213
This PR changes from using a different GN pool for each non-compiler tool, to using one GN pool for everything.
Additionally, since we are no longer linking remotely in any configuration, this PR uses the pool for linking.
ObjC and impellerc tasks also do not (yet) run on RBE, so they are also now governed by the pool.
Needs https://github.com/flutter/buildroot/pull/856
I found this while migrating `FlutterPlatformViews_Internal.mm` to ARC https://github.com/flutter/engine/pull/52535. I'll land this first.
```objc
if (_backdropFilterView != visualEffectView) {
_backdropFilterView = [visualEffectView retain];
}
```
should instead be something like:
```objc
if (_backdropFilterView != visualEffectView) {
id oldBackdropFilterView = _backdropFilterView;
_backdropFilterView = [visualEffectView retain];
[oldBackdropFilterView release];
}
```
But that's already what the built-in MRC `nonatomic, retain` property setter does, so use that instead.
Added a test that passes on this PR and fails on main.
Based on https://github.com/flutter/engine/pull/52510
Work towards https://github.com/flutter/flutter/issues/138798
Change IPoint destination_origin to IRect destination_region, which allows us to specify an area smaller than the entire texture to replace. This will eventually allow us to only upload individual glyphs. This fixes the cubemap issue I previously hit: each face needs to track initialization separately.
Resolves https://github.com/flutter/flutter/issues/134748.
This was a really fun experiment. I learned a lot from it, and it genuinely helped me solve some coverage-related problems, but the reality is it was too little too late -- by the time we had this capture system, we had already solved most of the problems that would have benefitted from this.
It's been a few months since I've used or extended the capabilities of this capture system for something, and I don't have the spare time/energy to give it the love it needs to realize the vision I had for it. I still almost exclusively use a combination of native frame captures and print debugging to solve problems.
RIP in peace.
I added this feature a long time ago on a rainy afternoon, and @gaaclarke mentioned that it's being removed from the framework anyway. We should just remove this if that's the case.
Workaround for https://github.com/flutter/flutter/issues/136112
If the glyph scale is too large, say in the hundreds or thousands, then glyph itself will likely be too big to fit in the atlas. Instead of failing to render - clamp the scale (not the size, which is bounds * scale) to a much lower scaling parameter.
We only use this for drawPoints, a rarely used API. On local tests, this is just as fast with the CPU backend implementations.
While this was intended to be the first in a series of compute based rendering experiments, it hasn't really been worth the carrying cost. So lets shrink the complexity and and remove another shader to boot.
Fixes https://github.com/flutter/flutter/issues/147184
In order to land https://github.com/flutter/engine/pull/52303 , we need to finally fix the advanced blend draw vertices combo. Right now a ColorFilter is used for advanced blends which doesn't work if there are overlapping vertices.
See also: https://github.com/flutter/flutter/issues/145707
The issue was fixed for drawVertices/drawAtlas pipeline blends using the porterduff shader. This extends this to advanced blends, but since drawVertices/atlas with an advanced blend is uncommon and because we don't 15 new shader variants, just add one special uber shader.
Part of https://github.com/flutter/flutter/issues/131345
Works to prevent future outages like https://github.com/flutter/flutter/issues/147180.
Also added an explicit `--no-skia-gold` flag to use when we don't want Skia Gold used, and used it in the one place we decided (in internal chat) it made sense, `mac_unopt.json` (was added in 674874e613 for validation-layers testing only).
I suspect that the change to clear the surface is the result of the
scenario app instability. just a guess: the screenshots looks like we're
missing the platform view. maybe the clearing of the surface is causing
an extra frame to be pushed. That frame is getting picked up in the
golden due to a race condition that is hard to hit locally
Testing disabling of this functionality in the golden test. If this pass
a real fix involves some sort of hook into the rendering to verify it
has fully completed before screenshotting.
Found that these intermediates added a non-trivial amount of artifacts to the out directory. Folks run our of space because of the size of intermediates sometimes and this just exacerbates that problem.
Reverts: flutter/engine#51229
Initiated by: gmackall
Reason for reverting: blocking engine->framework roll (I missed some framework code referencing the v1 embedding).
Original PR Author: gmackall
Reviewed By: {matanlurey, reidbaker}
This change reverts the following previous change:
Fixes https://github.com/flutter/flutter/issues/143531
Also fixes a random typo I found
~TODO to test this~ (no more todo):
-~test the framework against this as well, probably with a dummy PR changing the engine commit to my branch if this is possible~ not possible, made a best effort removal of framework code in https://github.com/flutter/flutter/pull/144726.
-~figure out if the old embedding is used in g3 at all~ removed all uses
-~figure out exactly what the ShimPluginRegistry/ShimRegistrar are doing, and if fully deleting them was right~ (see https://github.com/flutter/engine/pull/51229#issuecomment-1981757743)
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Finishes part 2 of https://github.com/flutter/flutter/issues/145263.
This required fixing a python script to use the version of Java obtained
through the DEPS file rather than one assumed to exist in the
environment.
Reverted in https://github.com/flutter/engine/pull/51679 due to https://github.com/flutter/flutter/issues/144109
The foreground blend cases where using the coverage rect to determine the resulting position and UVs. this only worked if the CTM was scale translate, in rotation/skew/perspective cases the coverage rect is incorrect for choosing the texture coordinate position. Instead of positioning w/ coverage, use the snapshot transform which includes the scale/translation and correctly applies other transforms.
Reverts: flutter/engine#51921
Initiated by: zanderso
Reason for reverting: This Dart roll is blocking the roll of the engine to the framework. Unblocking the rolls depends on addressing https://github.com/flutter/flutter/issues/146164.
Original PR Author: jason-simmons
Reviewed By: {zanderso, jonahwilliams}
This change reverts the following previous change:
The Dart SDK is now only building an AOT snapshot for the frontend server (see https://dart-review.googlesource.com/c/sdk/+/359100)
Fixes https://github.com/flutter/flutter/issues/145707
Part of https://github.com/flutter/flutter/issues/131345
If we're drawing vertices with per-color, a non-advanced blend, and a texture (with or without coordinates), use the porter duff shader to perform the blend without creating a sub render pass. IN addition to being more performant, this eliminates any potential rendering bugs caused by overlapping vertices.
This is not yet fixed for advanced blends.