Commit 601f29b4 authored by Christiaan Janssen's avatar Christiaan Janssen Committed by Kai Koehne

QmlProfiler: skip computing fps when not going to display them

Change-Id: I808f8a3b1cb6243f7df40bb1747d9ca92fb80380
Reviewed-on: http://codereview.qt.nokia.com/455Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarKai Koehne <kai.koehne@nokia.com>
parent 15e950d4
......@@ -59,11 +59,13 @@ function reset()
function calcFps()
{
if (values.length)
frameFps = new Array(values.length - 1);
for (var i = 0; i < values.length - 1; ++i) {
var frameTime = (values[i + 1] - values[i]) / 1000000;
frameFps[i] = 1000 / frameTime;
if (drawFpsGraph) {
if (values.length)
frameFps = new Array(values.length - 1);
for (var i = 0; i < values.length - 1; ++i) {
var frameTime = (values[i + 1] - values[i]) / 1000000;
frameFps[i] = 1000 / frameTime;
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment