share animation frame with renderService (#3796)

This commit is contained in:
Megan Rogge
2022-05-17 09:52:46 -07:00
committed by GitHub
parent eec53261e0
commit de5df69333
6 changed files with 40 additions and 8 deletions
@@ -51,7 +51,7 @@ export class BufferDecorationRenderer extends Disposable {
if (this._animationFrame !== undefined) {
return;
}
this._animationFrame = window.requestAnimationFrame(() => {
this._animationFrame = this._renderService.addRefreshCallback(() => {
this.refreshDecorations();
this._animationFrame = undefined;
});