mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-17 01:06:08 +03:00
coretext: address TODO
This commit is contained in:
@ -171,8 +171,10 @@ pub const Face = struct {
|
||||
return error.InvalidAtlasFormat;
|
||||
}
|
||||
|
||||
// Our buffer for rendering
|
||||
// TODO(perf): cache this buffer
|
||||
// Our buffer for rendering. We could cache this but glyph rasterization
|
||||
// usually stabilizes pretty quickly and is very infrequent so I think
|
||||
// the allocation overhead is acceptable compared to the cost of
|
||||
// caching it forever or having to deal with a cache lifetime.
|
||||
var buf = try alloc.alloc(u8, width * height * color.depth);
|
||||
defer alloc.free(buf);
|
||||
@memset(buf, 0);
|
||||
|
Reference in New Issue
Block a user