Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(457)

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui_lazy/FlameChart.js

Issue 2517463005: Timeline: nuke flow events experiment (Closed)
Patch Set: also removed flow events support from FlameChart Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/ui_lazy/FlameChart.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui_lazy/FlameChart.js b/third_party/WebKit/Source/devtools/front_end/ui_lazy/FlameChart.js
index 3ceb8f8d5b721ad2a5dd2e495ed4af322bd39d50..1864d79f0f4d7c555c5f6762bb4a233eb5e17389 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui_lazy/FlameChart.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui_lazy/FlameChart.js
@@ -658,8 +658,6 @@ UI.FlameChart = class extends UI.ChartViewport {
context.fillText(text, barX + textPadding, barY + textBaseHeight);
}
- this._drawFlowEvents(context, width, height);
-
context.restore();
UI.TimelineGrid.drawCanvasGrid(context, this._calculator, 3);
@@ -887,55 +885,6 @@ UI.FlameChart = class extends UI.ChartViewport {
}
}
- /**
- * @param {!CanvasRenderingContext2D} context
- * @param {number} height
- * @param {number} width
- */
- _drawFlowEvents(context, width, height) {
- var timelineData = this._timelineData();
- var timeWindowRight = this._timeWindowRight;
- var timeWindowLeft = this._timeWindowLeft;
- var flowStartTimes = timelineData.flowStartTimes;
- var flowEndTimes = timelineData.flowEndTimes;
- var flowStartLevels = timelineData.flowStartLevels;
- var flowEndLevels = timelineData.flowEndLevels;
- var flowCount = flowStartTimes.length;
- var endIndex = flowStartTimes.lowerBound(timeWindowRight);
-
- var color = [];
- var fadeColorsCount = 8;
- for (var i = 0; i <= fadeColorsCount; ++i)
- color[i] = 'rgba(128, 0, 0, ' + i / fadeColorsCount + ')';
- var fadeColorsRange = color.length;
- var minimumFlowDistancePx = 15;
- var flowArcHeight = 4 * this._barHeight;
- var colorIndex = 0;
- context.lineWidth = 0.5;
- for (var i = 0; i < endIndex; ++i) {
- if (flowEndTimes[i] < timeWindowLeft)
- continue;
- var startX = this._timeToPosition(flowStartTimes[i]);
- var endX = this._timeToPosition(flowEndTimes[i]);
- if (endX - startX < minimumFlowDistancePx)
- continue;
- if (startX < -minimumFlowDistancePx && endX > width + minimumFlowDistancePx)
- continue;
- // Assign a trasparent color if the flow is small enough or if the previous color was a transparent color.
- if (endX - startX < minimumFlowDistancePx + fadeColorsRange || colorIndex !== color.length - 1) {
- colorIndex = Math.min(fadeColorsRange - 1, Math.floor(endX - startX - minimumFlowDistancePx));
- context.strokeStyle = color[colorIndex];
- }
- var startY = this._levelToHeight(flowStartLevels[i]) + this._barHeight;
- var endY = this._levelToHeight(flowEndLevels[i]);
- context.beginPath();
- context.moveTo(startX, startY);
- var arcHeight = Math.max(Math.sqrt(Math.abs(startY - endY)), flowArcHeight) + 5;
- context.bezierCurveTo(startX, startY + arcHeight, endX, endY + arcHeight, endX, endY + this._barHeight);
- context.stroke();
- }
- }
-
_drawMarkers() {
var markers = this._timelineData().markers;
var left = this._markerIndexBeforeTime(this._calculator.minimumBoundary());
@@ -1254,10 +1203,6 @@ UI.FlameChart.TimelineData = class {
this.groups = groups;
/** @type {!Array.<!UI.FlameChartMarker>} */
this.markers = [];
- this.flowStartTimes = [];
- this.flowStartLevels = [];
- this.flowEndTimes = [];
- this.flowEndLevels = [];
}
};
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698