metal: continue to render if single cell fails

This commit is contained in:
Mitchell Hashimoto
2022-11-25 15:30:03 -08:00
parent 1062a39681
commit f01930695a

View File

@ -772,7 +772,7 @@ fn rebuildCells(
var iter = self.font_shaper.runIterator(self.font_group, row); var iter = self.font_shaper.runIterator(self.font_group, row);
while (try iter.next(self.alloc)) |run| { while (try iter.next(self.alloc)) |run| {
for (try self.font_shaper.shape(run)) |shaper_cell| { for (try self.font_shaper.shape(run)) |shaper_cell| {
assert(try self.updateCell( if (self.updateCell(
term_selection, term_selection,
screen, screen,
row.getCell(shaper_cell.x), row.getCell(shaper_cell.x),
@ -780,7 +780,15 @@ fn rebuildCells(
run, run,
shaper_cell.x, shaper_cell.x,
y, y,
)); )) |update| {
assert(update);
} else |err| {
log.warn("error building cell, will be invalid x={} y={}, err={}", .{
shaper_cell.x,
y,
err,
});
}
} }
} }