gpu_cache: fix tree removal on row clear
Created by: alexheretic
Fixes a bug introduced in 0.5
where glyph removals could be missed causing potential index lookup panics.
// 0.5, could search in the wrong partition for removal
for (spec, ..) in row.glyphs {
if let Some(ref mut c) = self.all_glyphs.get_mut(&font_glyph) {
c.remove(&spec);
}
}
I've also added a little more documentation & naming to help the readability of gpu_cache. Also noticed we never use ByteArray2d
data after uploading to the gpu, so we can save some heap after this pr.
The most recent performance improvements regress a little with this pr, but not by as much as recent gains.