mirror of
https://github.com/misskey-dev/misskey.git
synced 2025-04-02 13:43:36 +09:00
style: rename
This commit is contained in:
parent
7fb1a3fc81
commit
e421ebf508
@ -9,10 +9,10 @@ export default class IdlingRenderScheduler {
|
|||||||
this.#renderers = new Set();
|
this.#renderers = new Set();
|
||||||
this.#budget = budget;
|
this.#budget = budget;
|
||||||
this.#rafId = 0;
|
this.#rafId = 0;
|
||||||
this.#ricId = requestIdleCallback((deadline) => this.#render(deadline));
|
this.#ricId = requestIdleCallback((deadline) => this.#schedule(deadline));
|
||||||
}
|
}
|
||||||
|
|
||||||
#render(deadline: IdleDeadline): void {
|
#schedule(deadline: IdleDeadline): void {
|
||||||
if (deadline.timeRemaining() > this.#budget) {
|
if (deadline.timeRemaining() > this.#budget) {
|
||||||
this.#rafId = requestAnimationFrame((time) => {
|
this.#rafId = requestAnimationFrame((time) => {
|
||||||
for (const renderer of this.#renderers) {
|
for (const renderer of this.#renderers) {
|
||||||
@ -20,7 +20,7 @@ export default class IdlingRenderScheduler {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.#ricId = requestIdleCallback((arg) => this.#render(arg));
|
this.#ricId = requestIdleCallback((arg) => this.#schedule(arg));
|
||||||
}
|
}
|
||||||
|
|
||||||
add(renderer: FrameRequestCallback): void {
|
add(renderer: FrameRequestCallback): void {
|
||||||
|
Loading…
Reference in New Issue
Block a user