summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-06-12 17:33:27 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-06-12 17:33:27 -0700
commit0d5ff87c339d119eefcf515a3ff7ea4b0649cef9 (patch)
tree564f924baa99244b108f721a56a0cbcbdea58b2d /src
parente141881ad1b43a1cf5ab9a570b52f11ce5befc62 (diff)
test for long-running proxied gl
Diffstat (limited to 'src')
-rw-r--r--src/webGLWorker.js4
1 files changed, 4 insertions, 0 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 = [];
};