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

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

Issue 2746153005: DevTools: move flow events tracking to TracingModel, support cross-threads case (Closed)
Patch Set: fixed infinite chains of flow events Created 3 years, 9 months 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
Index: third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js
diff --git a/third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js b/third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js
index f772bad6fd11c6ce76be0fc0dd27b25797cf0ded..627d9e5a5bbded3697e850611c26cac67eac1046 100644
--- a/third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js
+++ b/third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js
@@ -957,11 +957,10 @@ PerfUI.FlameChart = class extends PerfUI.ChartViewport {
context.fillStyle = '#7f5050';
context.strokeStyle = '#7f5050';
- var td = this._timelineData();
- var endIndex = td.flowStartTimes.lowerBound(this._timeWindowRight);
-
context.lineWidth = 0.5;
- for (var i = 0; i < endIndex; ++i) {
+
+ var td = this._timelineData();
+ for (var i = 0; i < td.flowStartTimes.length && td.flowStartTimes[i] < this._timeWindowRight; ++i) {
if (!td.flowEndTimes[i] || td.flowEndTimes[i] < this._timeWindowLeft)
continue;
var startX = this._timeToPosition(td.flowStartTimes[i]);
@@ -969,7 +968,6 @@ PerfUI.FlameChart = class extends PerfUI.ChartViewport {
var startY = this._levelToHeight(td.flowStartLevels[i]) + this._barHeight / 2;
var endY = this._levelToHeight(td.flowEndLevels[i]) + this._barHeight / 2;
-
var segment = Math.min((endX - startX) / 4, 40);
var distanceTime = td.flowEndTimes[i] - td.flowStartTimes[i];
var distanceY = (endY - startY) / 10;

Powered by Google App Engine
This is Rietveld 408576698