Jim Graham 8cbaba6a03 Lazily allocate RasterCacheItems only when caching is enabled (flutter/engine#45211)
Fixes https://github.com/flutter/flutter/issues/133377

The default allocation of RasterCacheItems in the layer tree was showing up in profiles of apps running on Impeller which don't actually use the raster cache.

In order to eliminate the overhead of those allocations, RasterCacheItems are now lazily allocated only when the layers encounter an actual raster_cache during the Preroll phase.
2023-08-31 20:32:06 +00:00
..