Repository navigation
Commit fae5d0d
authored
[Impeller] Do not clamp the local coverage limit to the root render target (flutter#195860)
`Canvas::GetLocalCoverageLimit()` intersected its result with the root
render target. Inside a subpass this is too tight: content outside the
root RT can still end up on-screen, for example when an ancestor
`SaveLayer` has a matrix image filter that translates it. Both callers
were affected:
- `DrawDisplayList` uses the limit as its cull rect, so a nested
DisplayList (e.g. a `dart:ui` Picture) drawn off-screen inside such a
layer was culled.
- `SaveLayer` uses the limit to size the subpass, so a child `SaveLayer`
inside such a layer lost its off-screen content.
This PR removes the root RT intersection. The limit is now bounded only
by the current pass texture and the clip. On the root pass the pass
texture is the root RT, so the result there is unchanged. Subpass
textures in the affected cases can be larger, because they now have to
hold the content that the ancestor filter moves on-screen.
Tests:
- `DrawDisplayListInTranslatedSaveLayerIsNotCulled`: a circle drawn
through `DrawDisplayList` inside a translated SaveLayer.
- `NestedSaveLayerInTranslatedSaveLayerIsNotCulled`: a circle drawn
inside a child SaveLayer inside a translated SaveLayer.
Each test also draws a control circle directly into the parent layer.
Before the fix only the control circle renders.
Both scenarios reproduce with plain `dart:ui` on Flutter 3.38.3
(`flutter test --enable-impeller`): the circle is missing on Impeller
and present on Skia. See
flutter#195859.
Fixes flutter#1958591 parent 9e1d055 commit fae5d0d
2 files changed
Lines changed: 66 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2861 | 2861 | | |
2862 | 2862 | | |
2863 | 2863 | | |
| 2864 | + | |
| 2865 | + | |
| 2866 | + | |
| 2867 | + | |
| 2868 | + | |
| 2869 | + | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
| 2875 | + | |
| 2876 | + | |
| 2877 | + | |
| 2878 | + | |
| 2879 | + | |
| 2880 | + | |
| 2881 | + | |
| 2882 | + | |
| 2883 | + | |
| 2884 | + | |
| 2885 | + | |
| 2886 | + | |
| 2887 | + | |
| 2888 | + | |
| 2889 | + | |
| 2890 | + | |
| 2891 | + | |
| 2892 | + | |
| 2893 | + | |
| 2894 | + | |
| 2895 | + | |
| 2896 | + | |
| 2897 | + | |
| 2898 | + | |
| 2899 | + | |
| 2900 | + | |
| 2901 | + | |
| 2902 | + | |
| 2903 | + | |
| 2904 | + | |
| 2905 | + | |
| 2906 | + | |
| 2907 | + | |
| 2908 | + | |
| 2909 | + | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
| 2916 | + | |
| 2917 | + | |
| 2918 | + | |
| 2919 | + | |
| 2920 | + | |
| 2921 | + | |
| 2922 | + | |
2864 | 2923 | | |
2865 | 2924 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1814 | 1814 | | |
1815 | 1815 | | |
1816 | 1816 | | |
1817 | | - | |
1818 | | - | |
1819 | | - | |
1820 | | - | |
1821 | | - | |
1822 | | - | |
1823 | | - | |
1824 | | - | |
1825 | | - | |
1826 | | - | |
1827 | | - | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
1828 | 1824 | | |
1829 | 1825 | | |
1830 | 1826 | | |
| |||
0 commit comments