Commit e463874c authored by Christiaan Janssen's avatar Christiaan Janssen Committed by Kai Koehne
Browse files

QmlProfiler: disabled FPS display (for now)

Change-Id: Ib35d3833e7d360b924ecaaaf46ae5c65f3bd7b8e
Reviewed-by: Kai Koehne
Reviewed-on: http://codereview.qt.nokia.com/434

Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarKai Koehne <kai.koehne@nokia.com>
parent d103bb7a
......@@ -39,6 +39,7 @@ var frameFps = [ ];
var valuesdone = false;
var xmargin = 0;
var ymargin = 0;
var drawFpsGraph = false;
var names = [ "Painting", "Compiling", "Creating", "Binding", "Handling Signal"]
//### need better way to manipulate color from QML. In the meantime, these need to be kept in sync.
......@@ -113,21 +114,23 @@ function drawData(canvas, ctxt, region)
}
}
//draw fps overlay
var heightScale = height / 60;
ctxt.beginPath();
ctxt.moveTo(0,0);
for (var i = 1; i < values.length; ++i) {
var xx = (values[i] - ranges[0].start) * spacing + xmargin;
ctxt.lineTo(xx, height - frameFps[i-1]*heightScale)
if (drawFpsGraph) {
//draw fps overlay
var heightScale = height / 60;
ctxt.beginPath();
ctxt.moveTo(0,0);
for (var i = 1; i < values.length; ++i) {
var xx = (values[i] - ranges[0].start) * spacing + xmargin;
ctxt.lineTo(xx, height - frameFps[i-1]*heightScale)
}
ctxt.lineTo(width, 0);
ctxt.closePath();
var grad = ctxt.createLinearGradient(0, 0, 0, canvas.canvasSize.height);
grad.addColorStop(0, "rgba(255,128,128,.5)");
grad.addColorStop(1, "rgba(255,0,0,.5)");
ctxt.fillStyle = grad;
ctxt.fill();
}
ctxt.lineTo(width, 0);
ctxt.closePath();
var grad = ctxt.createLinearGradient(0, 0, 0, canvas.canvasSize.height);
grad.addColorStop(0, "rgba(255,128,128,.5)");
grad.addColorStop(1, "rgba(255,0,0,.5)");
ctxt.fillStyle = grad;
ctxt.fill();
}
function plot(canvas, ctxt, region)
......
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