TextureWarmer

A class that schedules a background draw of a Layout or Drawable. Drawing a Layout in the background ensures that the glyph caches are warmed up and ready for drawing the same Layout on a real Canvas. This will substantially reduce drawing times for big chunks of text. On the other hand over-using text warming might rotate the glyphs cache too quickly and diminish the optimization. Similarly, for Drawable starting on art it will be put in a texture cache of RenderNode, which will speed up drawing.

Types

Link copied to clipboard
object Companion
Link copied to clipboard
class WarmDrawable(val drawable: Drawable, val width: Int, val height: Int)

Properties

Link copied to clipboard

Functions

Link copied to clipboard

Schedules a Drawable to be drawn in the background. This warms up the texture cache for that Drawable.

Link copied to clipboard
fun warmLayout(layout: Layout)

Schedules a Layout to be drawn in the background. This warms up the Glyph cache for that Layout.