mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-06-24 02:14:17 +00: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:
parent
572a3c15c6
commit
35f37a64a9
1 changed files with 0 additions and 2 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue