diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-06-12 17:33:27 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-06-12 17:33:27 -0700 |
commit | 0d5ff87c339d119eefcf515a3ff7ea4b0649cef9 (patch) | |
tree | 564f924baa99244b108f721a56a0cbcbdea58b2d | |
parent | e141881ad1b43a1cf5ab9a570b52f11ce5befc62 (diff) |
test for long-running proxied gl
-rw-r--r-- | src/webGLWorker.js | 4 | ||||
-rw-r--r-- | tests/test_browser.py | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/webGLWorker.js b/src/webGLWorker.js index 4ccc8d55..f7058a51 100644 --- a/src/webGLWorker.js +++ b/src/webGLWorker.js @@ -605,6 +605,7 @@ function WebGLWorker() { }; // Setup + var dropped = 0; var postMainLoop = Module['postMainLoop']; Module['postMainLoop'] = function() { if (postMainLoop) postMainLoop(); @@ -612,6 +613,9 @@ function WebGLWorker() { if (Math.abs(frameId - clientFrameId) <= 3) { // only send if not throttling postMessage({ target: 'gl', op: 'render', commandBuffer: commandBuffer }); + } else { + //dropped++; + //if (dropped % 1000 === 0) dump('dropped: ' + [dropped, frameId, Math.round(100*dropped/frameId) + '%\n']); } commandBuffer = []; }; diff --git a/tests/test_browser.py b/tests/test_browser.py index 94f048cf..91d13068 100644 --- a/tests/test_browser.py +++ b/tests/test_browser.py @@ -1307,7 +1307,9 @@ keydown(100);keyup(100); // trigger the end message='You should see animating gears.') def test_glgears_long(self): - self.btest('hello_world_gles.c', expected=map(str, range(30, 1000)), args=['-DHAVE_BUILTIN_SINCOS', '-DLONGTEST']) + for proxy in [0, 1]: + print 'proxy', proxy + self.btest('hello_world_gles.c', expected=map(str, range(30, 10000)), args=['-DHAVE_BUILTIN_SINCOS', '-DLONGTEST'] + (['--proxy-to-worker'] if proxy else [])) def test_glgears_animation(self): es2_suffix = ['', '_full', '_full_944'] |