diff --git a/engine/src/flutter/lib/ui/painting.dart b/engine/src/flutter/lib/ui/painting.dart index d3e91ab5b7a..b5676ccd58e 100644 --- a/engine/src/flutter/lib/ui/painting.dart +++ b/engine/src/flutter/lib/ui/painting.dart @@ -4051,12 +4051,11 @@ class FragmentProgram extends NativeFieldWrapperClass1 { }); } - // TODO(zra): This is part of a soft transition of the framework to this - // API, which pushes the asset load to an asynchronous operation. - static Future fromAssetAsync(String assetKey) { - return Future.microtask(() => FragmentProgram.fromAsset(assetKey)); - } - + // This is a cache of shaders that have been loaded by + // FragmentProgram.fromAsset. It holds weak references to the FragmentPrograms + // so that the case where an in-use program is requested again can be fast, + // but programs that are no longer referenced are not retained because of the + // cache. static Map> _shaderRegistry = >{};