Commit 13f90caf authored by caseq@chromium.org's avatar caseq@chromium.org

DevTools: fix rendering of markers on flame chart

Under certain conditions, we used to have a cross-like image
taking the entire canvas instead of several rows of markers.

BUG=

Review URL: https://codereview.chromium.org/235913011

git-svn-id: svn://svn.chromium.org/blink/trunk@171483 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 24bf8ef6
......@@ -625,6 +625,7 @@ WebInspector.FlameChart.prototype = {
var barLevel = entryLevels[entryIndex];
var barY = this._levelToHeight(barLevel);
if (isNaN(entryTotalTimes[entryIndex])) {
context.moveTo(barX + this._markerRadius, barY + barHeight / 2);
context.arc(barX, barY + barHeight / 2, this._markerRadius, 0, Math.PI * 2);
markerIndices[nextMarkerIndex++] = entryIndex;
} else {
......@@ -637,16 +638,17 @@ WebInspector.FlameChart.prototype = {
}
context.strokeStyle = "rgb(0, 0, 0)";
context.beginPath();
for (var m = 0; m < nextMarkerIndex; ++m) {
var entryIndex = markerIndices[m];
var entryOffset = entryOffsets[entryIndex];
var barX = this._offsetToPosition(entryOffset);
var barLevel = entryLevels[entryIndex];
var barY = this._levelToHeight(barLevel);
context.beginPath();
context.moveTo(barX + this._markerRadius, barY + barHeight / 2);
context.arc(barX, barY + barHeight / 2, this._markerRadius, 0, Math.PI * 2);
context.stroke();
}
context.stroke();
context.textBaseline = "alphabetic";
......
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