summaryrefslogtreecommitdiff
path: root/src/proxyClient.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/proxyClient.js')
-rw-r--r--src/proxyClient.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/proxyClient.js b/src/proxyClient.js
index 30fe3850..90949673 100644
--- a/src/proxyClient.js
+++ b/src/proxyClient.js
@@ -22,6 +22,25 @@ window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequest
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame ||
renderFrame;
+/*
+var trueRAF = window.requestAnimationFrame;
+var lastRAF = 0;
+var meanFPS = 0;
+window.requestAnimationFrame = function(func) {
+ trueRAF(function() {
+ var now = performance.now();
+ if (lastRAF > 0) {
+ var diff = now - lastRAF;
+ var fps = 1000/diff;
+ meanFPS = 0.99*meanFPS + 0.1*fps;
+ dump('client fps ' + meanFPS + '\n');
+ }
+ lastRAF = now;
+ func();
+ });
+}
+*/
+
// end render
// Frame throttling