Skip to content

Commit

Permalink
ui: remove unnecessary full redraws
Browse files Browse the repository at this point in the history
note/pid hovering affects only the canvas and doesn't require
full redraws. This reduces the number of full redraws while
panning.

Change-Id: I59ff02603b71bb95b007fe17e483704c308666a6
  • Loading branch information
primiano committed Nov 14, 2024
1 parent cf95cb6 commit 33e2344
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ui/src/core/timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class TimelineImpl implements Timeline {

set highlightedSliceId(x) {
this._highlightedSliceId = x;
raf.scheduleFullRedraw();
raf.scheduleCanvasRedraw();
}

get hoveredNoteTimestamp() {
Expand All @@ -55,7 +55,7 @@ export class TimelineImpl implements Timeline {

set hoveredNoteTimestamp(x) {
this._hoveredNoteTimestamp = x;
raf.scheduleFullRedraw();
raf.scheduleCanvasRedraw();
}

get hoveredUtid() {
Expand All @@ -64,7 +64,7 @@ export class TimelineImpl implements Timeline {

set hoveredUtid(x) {
this._hoveredUtid = x;
raf.scheduleFullRedraw();
raf.scheduleCanvasRedraw();
}

get hoveredPid() {
Expand All @@ -73,7 +73,7 @@ export class TimelineImpl implements Timeline {

set hoveredPid(x) {
this._hoveredPid = x;
raf.scheduleFullRedraw();
raf.scheduleCanvasRedraw();
}

// This is used to calculate the tracks within a Y range for area selection.
Expand Down

0 comments on commit 33e2344

Please sign in to comment.