forked from qt-creator/qt-creator
QmlProfiler: disabled FPS display (for now)
Change-Id: Ib35d3833e7d360b924ecaaaf46ae5c65f3bd7b8e Reviewed-by: Kai Koehne Reviewed-on: http://codereview.qt.nokia.com/434 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
committed by
Kai Koehne
parent
d103bb7a60
commit
e463874ca6
@@ -39,6 +39,7 @@ var frameFps = [ ];
|
|||||||
var valuesdone = false;
|
var valuesdone = false;
|
||||||
var xmargin = 0;
|
var xmargin = 0;
|
||||||
var ymargin = 0;
|
var ymargin = 0;
|
||||||
|
var drawFpsGraph = false;
|
||||||
|
|
||||||
var names = [ "Painting", "Compiling", "Creating", "Binding", "Handling Signal"]
|
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.
|
//### 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
|
if (drawFpsGraph) {
|
||||||
var heightScale = height / 60;
|
//draw fps overlay
|
||||||
ctxt.beginPath();
|
var heightScale = height / 60;
|
||||||
ctxt.moveTo(0,0);
|
ctxt.beginPath();
|
||||||
for (var i = 1; i < values.length; ++i) {
|
ctxt.moveTo(0,0);
|
||||||
var xx = (values[i] - ranges[0].start) * spacing + xmargin;
|
for (var i = 1; i < values.length; ++i) {
|
||||||
ctxt.lineTo(xx, height - frameFps[i-1]*heightScale)
|
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)
|
function plot(canvas, ctxt, region)
|
||||||
|
|||||||
Reference in New Issue
Block a user