mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-04-29 03:00:14 -04:00
viz: remove useless ctx.save and restore calls (#11996)
It's a UI no-op since we always set the styles right before drawing.
This commit is contained in:
@@ -295,7 +295,6 @@ async function renderProfiler() {
|
||||
function render(transform) {
|
||||
zoomLevel = transform;
|
||||
rectLst.length = 0;
|
||||
ctx.save();
|
||||
ctx.clearRect(0, 0, canvas.clientWidth, canvas.clientHeight);
|
||||
// rescale to match current zoom
|
||||
const xscale = d3.scaleLinear().domain([0, dur]).range([0, canvas.clientWidth]);
|
||||
@@ -376,7 +375,6 @@ async function renderProfiler() {
|
||||
drawLine(ctx, [x, x], [0, canvas.clientHeight], { color:m.color });
|
||||
ctx.fillText(m.name, x+2, 1);
|
||||
}
|
||||
ctx.restore();
|
||||
}
|
||||
|
||||
function resize() {
|
||||
|
||||
Reference in New Issue
Block a user