diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-06-13 11:32:35 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-06-13 11:32:35 -0700 |
commit | b653efa58b67621469a56686365f99121e41e2f5 (patch) | |
tree | 3c1fd94841c43e0a112b573fbc9ed60ff6cd8c83 | |
parent | 36dcdb881a4e5cec00b90c2cf1af06b86cef0e58 (diff) |
standardize glut idle timeout to minimum 4ms, so it is consistent in workers and on the main thread, where 4ms is in the HTML5 spec
-rw-r--r-- | src/library_glut.js | 2 | ||||
-rw-r--r-- | tests/test_browser.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/library_glut.js b/src/library_glut.js index 3fe6b6a6..d5f1b7b0 100644 --- a/src/library_glut.js +++ b/src/library_glut.js @@ -383,7 +383,7 @@ var LibraryGLUT = { function callback() { if (GLUT.idleFunc) { Runtime.dynCall('v', GLUT.idleFunc); - Browser.safeSetTimeout(callback, 0); + Browser.safeSetTimeout(callback, 4); // HTML spec specifies a 4ms minimum delay on the main thread; workers might get more, but we standardize here } } if (!GLUT.idleFunc) { diff --git a/tests/test_browser.py b/tests/test_browser.py index e2baf756..257a6430 100644 --- a/tests/test_browser.py +++ b/tests/test_browser.py @@ -1309,7 +1309,7 @@ keydown(100);keyup(100); // trigger the end def test_glgears_long(self): for proxy in [0, 1]: print 'proxy', proxy - self.btest('hello_world_gles.c', expected=map(str, range(30, 15000)), args=['-DHAVE_BUILTIN_SINCOS', '-DLONGTEST'] + (['--proxy-to-worker'] if proxy else [])) + self.btest('hello_world_gles.c', expected=map(str, range(30, 500)), args=['-DHAVE_BUILTIN_SINCOS', '-DLONGTEST'] + (['--proxy-to-worker'] if proxy else [])) def test_glgears_animation(self): es2_suffix = ['', '_full', '_full_944'] |