57 Commits

Author SHA1 Message Date
Yegor
5987563e4a
enable more tests in web mode (#141791)
- Unskip `text_style_test` for CanvasKit.
- Remove no longer necessary `kIsWeb` checks in a few tests.

This PR depends on https://github.com/flutter/engine/pull/49786, which rolled into the framework. If the engine PR needs to be reverted, this PR will need to be reverted too.
2024-01-18 23:55:33 +00:00
Yegor
00032569a1
[web] prepare layers_test.dart for https://github.com/flutter/engine/pull/49786 (#141731)
This disables the expectation for `TileMode` stringification because
https://github.com/flutter/engine/pull/49786 is about to fix it (as in,
the test would fail when the engine fix lands).
2024-01-17 18:53:33 -08:00
Michael Goderbauer
4534a24c09
Reapply "Dynamic view sizing" (#140165) (#140918)
This reverts commit
d24c01bd0c.

The original change was reverted because it caused some apps to get
stuck on the splash screen on some phones.

An investigation determined that this was due to a rounding error.
Example: The device reports a physical size of 1008.0 x 2198.0 with a
dpr of 1.912500023841858. Flutter would translate that to a logical size
of 527.0588169589221 x 1149.2810314243163 and use that as the input for
its layout algorithm. Since the constraints here are tight, the layout
algorithm would determine that the resulting logical size of the root
render object must be 527.0588169589221 x 1149.2810314243163.
Translating this back to physical pixels by applying the dpr resulted in
a physical size of 1007.9999999999999 x 2198.0 for the frame. Android
now rejected that frame because it didn't match the expected size of
1008.0 x 2198.0 and since no frame had been rendered would never take
down the splash screen.

Prior to dynamically sized views, this wasn't an issue because we would
hard-code the frame size to whatever the requested size was.

Changes in this PR over the original PR:

* The issue has been fixed now by constraining the calculated physical
size to the input physical constraints which makes sure that we always
end up with a size that is acceptable to the operating system.
* The `ViewConfiguration` was refactored to use the slightly more
convenient `BoxConstraints` over the `ViewConstraints` to represent
constraints. Both essentially represent the same thing, but
`BoxConstraints` are more powerful and we avoid a couple of translations
between the two by translating the` ViewConstraints` from the
`FlutterView` to `BoxConstraints` directly when the `ViewConfiguration`
is created.

All changes over the original PR are contained in the second commit of
this PR.

Fixes b/316813075
Part of https://github.com/flutter/flutter/issues/134501.
2024-01-09 14:10:43 -08:00
Yegor
1fb95ba41b
[web] Fix and unskip a few more CanvasKit tests (#140821)
Fix and unskip the following CanvasKit tests:

- `test/painting/decoration_test.dart`
- `test/rendering/layers_test.dart`
- `test/widgets/app_overrides_test.dart`
2024-01-04 23:26:38 +00:00
Michael Goderbauer
16e6be8b39
Inline AbstractNode into SemanticsNode and Layer (#128467) 2023-06-14 09:36:41 -07:00
Jonah Williams
12b3023e98
[framework] delete physical model layer. (#125719)
Engine PR: https://github.com/flutter/engine/pull/41593

This must land first

We should remove these, as they've been deprecated for a while. On the engine side of things, the physical model layer is the only one which requires the device pixel ratio, so deleting it will allow us to simplify the layer tree code in https://github.com/flutter/engine/pull/41559
2023-05-02 16:03:56 +00:00
Michael Goderbauer
25a2dfb302
Rename RenderView.window to RenderView.view (#124060) 2023-04-04 11:22:22 -07:00
Michael Goderbauer
473fa38f77
Reland "Remove references to BindingBase.window (#122119 & #122341)" (#122412)
Reland "Remove references to BindingBase.window (#122119 & #122341)"
2023-03-14 16:48:07 +00:00
Casey Hillers
1f42612323
Revert PRs relating to single window assumption (#122369)
* Revert "Remove references to BindingBase.window (#122119)"

This reverts commit c7681f00cf1fb1c63bebb27d715f29feb77b78b7.

* Revert "Remove another reference to BindingBase.window (#122341)"

This reverts commit 6ec444506375cfa94535a45c2320e01094c295e0.

* Revert "Reland (2): Removes single window assumptions from `flutter_test` (#122233)"

This reverts commit eb3d317ea06e59fadc379210f5c6e685505d8e0f.

* Revert "Remove single view assumption from TestViewConfiguration (#122352)"

This reverts commit 927289fb4e5b25a71f794bc808a8c31554859a50.

* Revert "Updates `flutter/test/cupertino` to no longer use `TestWindow` (#122325)"

This reverts commit 67e17e45f05271c6c409183c1d33806683cb9e4d.

* Revert "Updates `flutter/test/gestures` to no longer reference `TestWindow` (#122327)"

This reverts commit c2a5111cc0f9bcb104982b38a1a0a9c4210b601f.

* Revert "Updates `flutter/test/rendering` to no longer use `TestWindow` (#122347)"

This reverts commit 28b65e089b3f8e8c21572cd8a73184858b6360c3.

* Revert "Updates `flutter_localizations/test` to stop using `TestWindow` (#122321)"

This reverts commit 01367d52d7886f51a8921c9dc4a8e4c541686e98.
2023-03-09 22:53:38 -08:00
Michael Goderbauer
c7681f00cf
Remove references to BindingBase.window (#122119)
Remove references to BindingBase.window
2023-03-09 19:14:34 +00:00
Jonah Williams
44d3181deb
[framework] remove restriction on texture layer rasterization (#109900) 2022-08-20 03:06:23 +00:00
Jonah Williams
9ae37030ae
Use toPictureSync for faster zoom page transition (#106621) 2022-07-22 15:58:04 +00:00
Dan Field
1c852cedaa
Do not assert callbacks contains key if disposed (#104292) 2022-05-20 14:51:14 -07:00
Dan Field
d54cdf9e18
Add a mechanism to observe layer tree composition. (#103378) 2022-05-17 11:22:11 -07:00
Phil Quitslund
bca071815f
rename local functions with _s (#102615) 2022-04-27 09:14:57 -07:00
ColdPaleLight
94d7f5e672
Refactor 'FakeSceneBuilder' to use 'NoSuchMethod Forwarding' (#101970) 2022-04-15 20:59:07 -07:00
wangying
38542d284c
Add some debug properties to BackdropFilterLayer (#101101) 2022-04-11 09:59:08 -07:00
Michael Goderbauer
7f2c1cd772
Use PlatformDispatcher.instance over window where possible (#99496) 2022-03-03 14:46:16 -08:00
Ian Hickson
ab89ce285f
Clean up the bindings APIs. (#89451) 2022-02-03 14:55:15 -08:00
chunhtai
28ca7bd789
Allow current leader of layerlink to detach before the previous leade… (#96810) 2022-01-24 11:50:11 -08:00
Michael Goderbauer
d290763941
enable more retained rendering opportunities for LeaderLayer (#96486) 2022-01-11 18:20:14 -08:00
chunhtai
e17a1858e5
LayerLink can temporary allow multiple leaders (#95977) 2022-01-07 17:50:10 -08:00
Michael Goderbauer
065c0feaaf
Do not crash on LeaderLayer.applyTransform after retained rendering (#96144) 2022-01-07 16:25:20 -08:00
Dan Field
fa8e3e6877
Reland "Ensure the engineLayer is disposed when an OpacityLayer is disabled"" (#96295) 2022-01-07 10:55:05 -08:00
Ren You
a607a60b4a
Revert "Ensure the engineLayer is disposed when an OpacityLayer is disabled (#94280)" (#94743)
This reverts commit c567f8439bcc7728fad5480848b2e2b2ff429df2.
2021-12-06 12:05:50 -08:00
Jason C.H
c567f8439b
Ensure the engineLayer is disposed when an OpacityLayer is disabled (#94280) 2021-12-03 16:34:02 -08:00
Michael Goderbauer
ca788d8941
Leader not always dirty (#92598) 2021-10-28 10:35:03 -07:00
Michael Goderbauer
210a905f21
Remove unused offset from Layer.addToScene/addChildrenToScene (#91753) 2021-10-14 12:48:06 -07:00
Ian Hickson
66dd2add7e
Add some more new lints (#91659) 2021-10-12 11:33:04 -07:00
Dan Field
528f77dc99
Opacity fix (#90017)
* Make sure Opacity widgets/layers do not drop the offset
2021-09-13 19:10:15 -07:00
Darren Austin
225a43d941
Updated skipped tests for rendering directory. (#87700) 2021-08-05 11:32:48 -07:00
Jonah Williams
7f26dbe0d4
[flutter] remove elevation checker (#86837) 2021-07-21 21:51:06 -07:00
Dan Field
4d9a3753a4
Assert disposed layers are not reused (#85798) 2021-07-07 14:26:04 -07:00
Dan Field
025397ae3f
Release retained resources from layers/dispose pictures (#84740) 2021-06-25 12:01:03 -07:00
Alexandre Ardhuin
59fc92168a
add missing trailing commas (#81065) 2021-04-23 22:47:40 +02:00
Michael Goderbauer
7b251f5f37
Enable use_function_type_syntax_for_parameters lint (#77163) 2021-03-04 08:59:17 -08:00
Alexandre Ardhuin
d546e1d311
fix for upcoming lint use_named_constants (#74788) 2021-01-27 20:20:44 +01:00
Kate Lovett
019e90f7df
[NNBD] Migrates some rendering tests (#67449) 2020-10-07 16:27:06 -07:00
Kate Lovett
ea777fea1b
Skip Audit - Rendering Library (#58640) 2020-07-09 13:36:03 -07:00
Jason Simmons
5cf0d73764
In layers_test create a canvas to start recording on the PictureRecorder (#60660) 2020-07-07 17:44:02 -07:00
Alexandre Ardhuin
4d7525f05c
Opt out nnbd in packages/flutter (#59186)
* add language version 2.8 in packages/flutter

* enable non-nullable analyzer flag
2020-06-11 14:11:30 +02:00
liyuqian
2ccf3f877d
Print more layer debug info (#49679) 2020-01-30 09:33:01 -08:00
Alexandre Ardhuin
4f9b6cf017
enable lint prefer_final_in_for_each (#47724) 2020-01-07 16:32:04 +01:00
Ian Hickson
449f4a6673
License update (#45373)
* Update project.pbxproj files to say Flutter rather than Chromium

Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.

* Update the copyright notice checker to require a standard notice on all files

* Update copyrights on Dart files. (This was a mechanical commit.)

* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.

Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).

* Clean up the copyrights in non-Dart files. (Manual edits.)

Also, make sure templates don't have copyrights.

* Fix some more ORGANIZATIONNAMEs
2019-11-27 15:04:02 -08:00
liyuqian
264082f34f
Print clipBehavior while debugging ClipXXXLayer (#45716)
Fixes https://github.com/flutter/flutter/issues/45587
2019-11-27 12:48:03 -08:00
Yegor
21a18fbe16
enable rendering rests on the Web (#42773) 2019-10-15 15:25:47 -07:00
Yegor
34c692659e
Teach render objects to reuse engine layers (#36402)
Teach Layer and its implementations, RenderObject and its implementations, and PaintingContext to reuse engine layers. The idea is that a concrete RenderObject creates a Layer and holds on to it as long as it needs it (i.e. when it is composited, and the layer type does not change). In return, each Layer object holds on to an EngineLayer and reports it to the engine via addRetained and oldLayer. This allows the Web engine to reuse DOM elements across frames. Without it, each frame drops all previously rendered HTML and regenerates it from scratch.
2019-08-16 15:27:12 -07:00
Dan Field
7a20148548
Add colorFilterLayer/Widget (#35468) 2019-07-11 15:49:51 -07:00
Alexandre Ardhuin
b5ce06163c
enable lint use_full_hex_values_for_flutter_colors (#35056) 2019-06-25 17:58:19 +02:00
Jonah Williams
ca14af6b92
Compatibility pass on flutter/rendering tests for JavaScript compilation. (5) (#33355) 2019-06-10 17:29:46 -07:00