mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Make RequestFrame less janky in the no vsync case
Instead of spamming the MessageLoop, guess that 16ms is a good amount of time to wait
This commit is contained in:
parent
36b02aecb8
commit
a371cceee1
@ -43,9 +43,10 @@ void Animator::RequestFrame() {
|
||||
}
|
||||
|
||||
if (!AwaitVSync()) {
|
||||
base::MessageLoop::current()->PostTask(
|
||||
base::MessageLoop::current()->PostDelayedTask(
|
||||
FROM_HERE,
|
||||
base::Bind(&Animator::BeginFrame, weak_factory_.GetWeakPtr(), 0));
|
||||
base::Bind(&Animator::BeginFrame, weak_factory_.GetWeakPtr(), 0),
|
||||
base::TimeDelta::FromMilliseconds(16));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user