summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webkitclient_impl.h
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-16 07:34:40 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-16 07:34:40 +0000
commit08f42e7193c00c18cb2bfb28aa1e4958c8e08fdd (patch)
treee53ac4db28cf5f2a016e44542bf6e0646cac464e /webkit/glue/webkitclient_impl.h
parentb4bbe9ad1ec0320b73e0914a6fc24ac514b30844 (diff)
downloadchromium_src-08f42e7193c00c18cb2bfb28aa1e4958c8e08fdd.zip
chromium_src-08f42e7193c00c18cb2bfb28aa1e4958c8e08fdd.tar.gz
chromium_src-08f42e7193c00c18cb2bfb28aa1e4958c8e08fdd.tar.bz2
Pump the WebCore Timer queue before running animation callbacks
This works around a bug in the Mac UI message pump (72007) that can lead to starvation of delayed tasks. To avoid starving WebCore timers indefinitely when using requestAnimationFrame, this patch explicitly pumps the WebCore Timer queue one each animate() call. BUG=71735 TEST=open the WebGL aquarium demo (http://webglsamples.googlecode.com/hg/aquarium/aquarium.html) and click on the * next to "Change View". The animation should always happen without multi-second delays. Review URL: http://codereview.chromium.org/6524030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75078 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webkitclient_impl.h')
-rw-r--r--webkit/glue/webkitclient_impl.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/webkit/glue/webkitclient_impl.h b/webkit/glue/webkitclient_impl.h
index 302a99f..1c4f9c7 100644
--- a/webkit/glue/webkitclient_impl.h
+++ b/webkit/glue/webkitclient_impl.h
@@ -76,12 +76,15 @@ class WebKitClientImpl : public WebKit::WebKitClient {
void SuspendSharedTimer();
void ResumeSharedTimer();
- private:
+ // Hack for http://crbug.com/71735.
+ // TODO(jamesr): move this back to the private section once
+ // http://crbug.com/72007 is fixed.
void DoTimeout() {
if (shared_timer_func_ && !shared_timer_suspended_)
shared_timer_func_();
}
+ private:
MessageLoop* main_loop_;
base::OneShotTimer<WebKitClientImpl> shared_timer_;
void (*shared_timer_func_)();