The initial RenderableAsset implementation served as the primary way to implement an Android asset, followed by DecodableAsset and SuspendableAsset extensions to provide automatic data decoding and suspendable rendering lifecycle respectively. Both RenderableAsset and DecodableAsset have been deprecated in favor of SuspendableAsset, as the intended way to write an asset, and should be consolidated into a single implementation on the next major.
There are some existing challenges with SuspendableAsset, where the primary render API is blocking, requiring some additional plugins and caveats to consume SuspendableAsset effectively. As a part of consolidating into a single RenderableAsset implementation, the entire asset lifecycle becomes supsendable. To take advantage of the benefits of suspension, render should also be made suspend, allowing full suspension, parallel asset rendering/inflation, and efficient cancellation of stale renders.
The initial
RenderableAssetimplementation served as the primary way to implement an Android asset, followed byDecodableAssetandSuspendableAssetextensions to provide automatic data decoding and suspendable rendering lifecycle respectively. BothRenderableAssetandDecodableAssethave been deprecated in favor ofSuspendableAsset, as the intended way to write an asset, and should be consolidated into a single implementation on the next major.There are some existing challenges with
SuspendableAsset, where the primaryrenderAPI is blocking, requiring some additional plugins and caveats to consumeSuspendableAsseteffectively. As a part of consolidating into a singleRenderableAssetimplementation, the entire asset lifecycle becomes supsendable. To take advantage of the benefits of suspension,rendershould also be made suspend, allowing full suspension, parallel asset rendering/inflation, and efficient cancellation of stale renders.