Allow PhysicalShapeLayer raster cache on non-Fuchsia platforms #51515
Copy link
Copy link
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: performanceRelates to speed or footprint issues (see "perf:" labels)Relates to speed or footprint issues (see "perf:" labels)customer: fuchsiaengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.perf: memoryPerformance issues related to memoryPerformance issues related to memoryperf: speedPerformance issues related to (mostly rendering) speedPerformance issues related to (mostly rendering) speed
Description
This would improve the performance of ListView with material list items like Card. See #35592 (comment) for an example. Specifically, the shadows of the PhysicalShapeLayer could be costly to rasterize.
This issue would be a sub-issue of #23535
We might need to either
- expose a flag to let developers specify whether to raster cache so we won't blow the memory by raster caching all
PhysicalShapeLayer. - set a threshold similar to picture raster cache so we only start caching when the same layer gets rasterized multiple times.
Hence, we should not only write performance tests for the speed, but also for memory.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: performanceRelates to speed or footprint issues (see "perf:" labels)Relates to speed or footprint issues (see "perf:" labels)customer: fuchsiaengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.perf: memoryPerformance issues related to memoryPerformance issues related to memoryperf: speedPerformance issues related to (mostly rendering) speedPerformance issues related to (mostly rendering) speed
Activity
liyuqian commentedon Feb 26, 2020
CC @dnfield @flar who have worked on related issues.
dnfield commentedon Feb 26, 2020
I am not sure about this anymore, but doesn't Scenic do something special with physical shape layers? Is that compatbile with raster caching on our end?
liyuqian commentedon Feb 26, 2020
Scenic now has a switch to not do something special with the
PhysicalShapeLayer. Previously, it doesn't have such a switch and it's always doing something special.In case that it's doing something special, Flutter always enables layer raster cache for
PhysicalShapeLayerbecause scenic is going to create a separate surface forPhysicalShapeLayeranyway, so preserving such surface as the raster cache has no extra memory cost.If scenic turns on the switch to not do something special, then the raster cache of normal Flutter would kick in (if we're to implement it).
dnfield commentedon Feb 26, 2020
Ahh cool, thanks. I don't think I know enough about the raster cache beyond that to have a meaningful opinion here - but why would we be concerned about the physical shape layer dominating it?
dnfield commentedon Feb 27, 2020
Talked offline - it sounds like we should opt for the second option, which is basically how the picture raster cache works, and for which we don't think we have any memory issues currently. My question about dominating was coming from the incorrect idea that we'd somehow be evicting picture layers by doing this.
github-actions commentedon Mar 30, 2023
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.