DrawCacheModifier
Interface
Common
@JvmDefaultWithCompatibility
interface DrawCacheModifier : DrawModifier
DrawModifier
implementation that supports building a cache of objects to be referenced across
draw calls
Functions
fun onBuildCache(params: BuildDrawCacheParams)
Callback invoked to re-build objects to be re-used across draw calls. This is useful to
conditionally recreate objects only if the size of the drawing environment changes, or if
state parameters that are inputs to objects change. This method is guaranteed to be called
before DrawModifier.draw
.
Parameters
params | The params to be used to build the cache. |