renderer/metal: use memset to clear bg cell rows

This commit is contained in:
Qwerasd
2024-08-08 19:05:42 -04:00
parent d68906563e
commit 732483c08a

View File

@ -195,9 +195,7 @@ pub const Contents = struct {
pub fn clear(self: *Contents, y: terminal.size.CellCountInt) void { pub fn clear(self: *Contents, y: terminal.size.CellCountInt) void {
assert(y < self.size.rows); assert(y < self.size.rows);
for (self.bg_cells[y * self.size.columns ..][0..self.size.columns]) |*cell| { @memset(self.bg_cells[y * self.size.columns ..][0..self.size.columns], .{ 0, 0, 0, 0 });
cell.* = .{ 0, 0, 0, 0 };
}
// We have a special list containing the cursor cell at the start // We have a special list containing the cursor cell at the start
// of our fg row pool, so we need to add 1 to the y to get the // of our fg row pool, so we need to add 1 to the y to get the