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

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

Issue 2750133003: Revert of DevTools: move flow events tracking to TracingModel, support cross-threads case (Closed)
Patch Set: 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 627d9e5a5bbded3697e850611c26cac67eac1046..f772bad6fd11c6ce76be0fc0dd27b25797cf0ded 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,16 +957,18 @@
context.fillStyle = '#7f5050';
context.strokeStyle = '#7f5050';
+ var td = this._timelineData();
+ var endIndex = td.flowStartTimes.lowerBound(this._timeWindowRight);
+
context.lineWidth = 0.5;
-
- var td = this._timelineData();
- for (var i = 0; i < td.flowStartTimes.length && td.flowStartTimes[i] < this._timeWindowRight; ++i) {
+ for (var i = 0; i < endIndex; ++i) {
if (!td.flowEndTimes[i] || td.flowEndTimes[i] < this._timeWindowLeft)
continue;
var startX = this._timeToPosition(td.flowStartTimes[i]);
var endX = this._timeToPosition(td.flowEndTimes[i]);
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];

Powered by Google App Engine
This is Rietveld 408576698