public class GlyphWarmer extends Object
Layout
. 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.Modifier and Type | Method and Description |
---|---|
static GlyphWarmer |
getInstance() |
void |
warmLayout(Layout layout)
Schedules a
Layout to be drawn in the background. |
public static GlyphWarmer getInstance()
GlyphWarmer
instance.public void warmLayout(Layout layout)
Layout
to be drawn in the background. This warms up the Glyph cache for
that Layout
.