DrawCacheModifier
-
Cmn
interface DrawCacheModifier : DrawModifier
DrawModifier implementation that supports building a cache of objects to be referenced across draw calls
Summary
Public functions |
||
|---|---|---|
Unit |
onBuildCache(params: BuildDrawCacheParams)Callback invoked to re-build objects to be re-used across draw calls. |
Cmn
|
Inherited functions |
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||
|
Public functions
onBuildCache
fun onBuildCache(params: BuildDrawCacheParams): Unit
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: BuildDrawCacheParams |
The params to be used to build the cache. |