From a371cceee19c11ec542065a02f61894a3d79fc20 Mon Sep 17 00:00:00 2001 From: George Kulakowski Date: Thu, 3 Dec 2015 14:36:00 -0800 Subject: [PATCH] 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 --- sky/shell/ui/animator.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sky/shell/ui/animator.cc b/sky/shell/ui/animator.cc index 9734cb0d499..02b6c116fa4 100644 --- a/sky/shell/ui/animator.cc +++ b/sky/shell/ui/animator.cc @@ -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)); } }