QmlProfiler: optimized timeline display

Change-Id: I0d7cf110356ef5f805b81a5fc39dca3870765ea3
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Christiaan Janssen
2011-10-26 11:32:01 +02:00
parent 38ad15a772
commit bf4dfd5e74
14 changed files with 730 additions and 464 deletions

View File

@@ -107,13 +107,17 @@ TiledCanvas {
}
function drawBackgroundBars( ctxt, region ) {
var barHeight = Math.round(labels.height / labels.rowCount);
var cumulatedHeight = 0;
for (var i=0; i<labels.rowCount; i++) {
ctxt.fillStyle = i%2 ? "#f3f3f3" : "white"
ctxt.strokeStyle = i%2 ? "#f3f3f3" : "white"
ctxt.fillRect(0, i * barHeight, width, barHeight);
var barHeight = labels.rowExpanded[i] ?
qmlEventList.uniqueEventsOfType(i) * root.singleRowHeight :
qmlEventList.maxNestingForType(i) * root.singleRowHeight;
ctxt.fillStyle = i%2 ? "#f0f0f0" : "white"
ctxt.strokeStyle = i%2 ? "#f0f0f0" : "white"
ctxt.fillRect(0, cumulatedHeight, width, barHeight);
cumulatedHeight += barHeight;
}
ctxt.fillStyle = "white";
ctxt.fillStyle = "#f5f5f5";
ctxt.fillRect(0, labels.height, width, height - labels.height);
}
}