■ ■ ■ ■ ■ ■
alacritty/src/renderer/text/atlas.rs
| skipped 258 lines |
259 | 259 | | match atlas[*current_atlas].insert(rasterized, active_tex) { |
260 | 260 | | Ok(glyph) => glyph, |
261 | 261 | | Err(AtlasInsertError::Full) => { |
| 262 | + | // Get the context type before adding a new Atlas. |
| 263 | + | let is_gles_context = atlas[*current_atlas].is_gles_context; |
| 264 | + | |
| 265 | + | // Advance the current Atlas index. |
262 | 266 | | *current_atlas += 1; |
263 | 267 | | if *current_atlas == atlas.len() { |
264 | | - | let new = Atlas::new(ATLAS_SIZE, atlas[*current_atlas].is_gles_context); |
| 268 | + | let new = Atlas::new(ATLAS_SIZE, is_gles_context); |
265 | 269 | | *active_tex = 0; // Atlas::new binds a texture. Ugh this is sloppy. |
266 | 270 | | atlas.push(new); |
267 | 271 | | } |
| skipped 34 lines |