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:
George Kulakowski 2015-12-03 14:36:00 -08:00
parent 36b02aecb8
commit a371cceee1

View File

@ -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));
}
}