18 Commits

Author SHA1 Message Date
Brandon DeRosier
30fe68f402 [Impeller] Don't cull readbacks outside the damage rect. (flutter/engine#46705)
Resolves https://github.com/flutter/flutter/issues/136058.

The damage rect properly expands to include the backdrop filter readback area to a certain extent, but it suddenly gets excluded once it no longer partially overlaps with the damage rect. This caused the illusion of EntityPass improperly culling the backdrop entity, leading me into a bit of a wild goose chase.

Before:

https://github.com/flutter/engine/assets/919017/94b8c077-0945-4a2c-96e0-27230d980c38

After:

https://github.com/flutter/engine/assets/919017/f1c78365-6e9b-46cb-9e69-33472d488831
2023-10-10 20:55:05 +00:00
Jonah Williams
02bee3abf0 [Impeller] Avoid inserting additional save layers based on clip configuration. (flutter/engine#43759)
Fixes https://github.com/flutter/flutter/issues/130775

On the Skia backend, antiAliasWithSaveLayer is the highest fidelity clipping option. In the Impeller backend, there isn't any difference in how we clip, since the stencil buffer is always used. Nevertheless we were still inserting the save layer, which results in an extra offscreen texture and is wasteful.

Track if impeller is enabled in the diff/preroll/paint context and avoid inserting a save layer.
2023-07-18 17:21:42 +00:00
Jim Graham
77514c4f43 Use full 4x4 matrix transforms in TransformLayer (flutter/engine#43536)
Fixes: https://github.com/flutter/flutter/issues/82961
Fixes: https://github.com/flutter/flutter/issues/113346

The fix was a simple fallout from the previous work to add support for SkM44 throughout the DL and Diff mechanisms (see https://github.com/flutter/flutter/issues/82955, https://github.com/flutter/flutter/issues/116198, https://github.com/flutter/engine/pull/37394)

Tested with its own existing and new unit tests as well as the test case from https://github.com/flutter/flutter/issues/113346
2023-07-11 01:55:07 +00:00
Jonah Williams
dfff522046 Remove physical model layer (flutter/engine#41593)
Removes the physical model layer and associated engine code. This was already deprecated and removed in the framework. By removing it in the engine, we can also remove the need for layer tree diff/paint/preroll to have the device pixel ratio. This will simplify some of the multi-view work

Fixes https://github.com/flutter/flutter/issues/125720
2023-05-03 20:28:53 +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
Matej Knopp
066c6c6d8f Use DisplayListMatrixClipTracker in DiffContext (flutter/engine#38010) 2023-02-10 20:50:28 +00:00
gaaclarke
cb4c9f4727 Clang-tidy: made verbose print out commands and fixed quoting problem for warnings as errors (flutter/engine#37015) 2022-10-26 08:19:12 +00:00
gaaclarke
e41c775200 Removed instances of unnecessary values (flutter/engine#36221) 2022-09-26 21:28:04 +00:00
Jonah Williams
614a9bde21 Revert "DiffContext: Remove transform_override" (flutter/engine#36285) 2022-09-26 20:56:20 +00:00
Jonah Williams
c4d3db0133 add pixel snapping conditional on presence of raster cache (flutter/engine#35981) 2022-09-09 01:10:01 +00:00
Matej Knopp
89c5675052 DiffContext: Remove transform_override (flutter/engine#35601)
This has been originally added to account for different
parts of rendering process applying integer CTM  inconsistently. With Integer CTM removed this is dead code.
2022-08-27 09:13:04 +02:00
Matej Knopp
190cee38d1 Specify clip alignment for partial repaint (flutter/engine#31359)
* Specify clip alignment for partial repaint
2022-03-31 23:53:42 +02:00
Matej Knopp
7e8fc6005e Fix partial repaint when TextureLayer is inside retained layer (flutter/engine#29482) 2021-11-02 15:40:48 -07:00
Matej Knopp
66a708c874 Enable partial repaint for iOS/Metal (flutter/engine#28801) 2021-11-02 07:20:01 -07:00
Matej Knopp
9fcd8ab06f ImageFilterLayer should adjust child layer bounds during diffing (flutter/engine#29317) 2021-10-27 09:07:08 -07:00
Matej Knopp
ee25910702 Take SUPPORT_FRACTIONAL_TRANSLATION into account when diffing layers (flutter/engine#29001)
* Take SUPPORT_FRACTIONAL_TRANSLATION into account when diffing layers

* Store cull_rect in device coordinates

This removes the need to update cull rect coordinates when overriding transform
and is also consistent with how Layer::needs_painting() works.

* Use original transform for culling, but overriden transform to get paint coordinates.

This is to replicate the paint process during diffing, where layers are culled first and only then after paint the matrix is overriden.

* Rewrite AddLayerBounds based on @flar's suggestions
2021-10-12 18:44:50 +02:00
Zachary Anderson
422f4b85e7 Add missing license headers (flutter/engine#26988) 2021-06-26 09:19:10 -07:00
Matej Knopp
7de5184eb9 Add DiffContext (flutter/engine#21824) 2021-02-18 14:41:01 -08:00