Skip to content

Commit

Permalink
add comment on deallocation
Browse files Browse the repository at this point in the history
  • Loading branch information
raphamorim committed Jul 20, 2024
1 parent cab39e9 commit 264fe93
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sugarloaf/src/components/rich_text/image_cache/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ impl ImageCache {
ImageId::new(entry.generation, entry_index as u32, request.has_alpha)
}

// Evaluate if does make sense to deallocate from atlas and if yes, which case?
// considering that a terminal uses a short/limited of glyphs compared to a wide text editor
// if deallocate an image then is necessary to cleanup cache of draw_layout fn
/// Deallocates the specified image.
pub fn deallocate(&mut self, image: ImageId) -> Option<()> {
let entry = self.entries.get_mut(image.index())?;
Expand Down

0 comments on commit 264fe93

Please sign in to comment.