render method
Calls renderGlyph
for every glyph that has changed since the last call
to render.
Implementation
void render(RenderGlyph renderGlyph) {
for (var y = 0; y < height; y++) {
for (var x = 0; x < width; x++) {
var glyph = _changedGlyphs.get(x, y);
// Only draw glyphs that are different since the last call.
if (glyph == null) continue;
renderGlyph(x, y, glyph);
// It's up to date now.
_glyphs.set(x, y, glyph);
_changedGlyphs.set(x, y, null);
}
}
}