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

Unified Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js

Issue 1798253003: Timeline: get collapsible row groups on FlameChart out of experiment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased test as "Main Thread" header is no longer an entry Created 4 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/main/Main.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/timeline/TimelineFlameChart.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js
index 5edb64b23eeb1873e809a8084dc980989751b97a..edad6f520856227d6fcf5bbea13259cdba11a834 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js
@@ -262,7 +262,6 @@ WebInspector.TimelineFlameChartDataProviderBase.prototype = {
* @enum {symbol}
*/
WebInspector.TimelineFlameChartEntryType = {
- Header: Symbol("Header"),
Frame: Symbol("Frame"),
Event: Symbol("Event"),
InteractionRecord: Symbol("InteractionRecord"),
@@ -359,7 +358,7 @@ WebInspector.TimelineFlameChartDataProvider.prototype = {
reset: function()
{
WebInspector.TimelineFlameChartDataProviderBase.prototype.reset.call(this);
- /** @type {!Array<!WebInspector.TracingModel.Event|!WebInspector.TimelineFrame|!WebInspector.TimelineIRModel.Phases|null>} */
+ /** @type {!Array<!WebInspector.TracingModel.Event|!WebInspector.TimelineFrame|!WebInspector.TimelineIRModel.Phases>} */
this._entryData = [];
/** @type {!Array<!WebInspector.TimelineFlameChartEntryType>} */
this._entryTypeByLevel = [];
@@ -387,27 +386,22 @@ WebInspector.TimelineFlameChartDataProvider.prototype = {
this._currentLevel = 0;
this._appendFrameBars(this._frameModel.frames());
this._appendInteractionRecords();
- this._appendThreadTimelineData(WebInspector.UIString("Main Thread"), this._model.mainThreadEvents(), this._model.mainThreadAsyncEvents(), true);
- if (Runtime.experiments.isEnabled("gpuTimeline"))
- this._appendGPUEvents();
var threads = this._model.virtualThreads();
- var compositorThreads;
- var otherThreads;
- if (Runtime.experiments.isEnabled("timelineCollapsible")) {
- compositorThreads = threads.filter(thread => thread.name.startsWith("CompositorTileWorker"));
- otherThreads = threads.filter(thread => !thread.name.startsWith("CompositorTileWorker"));
- } else {
- compositorThreads = [];
- otherThreads = threads;
- }
- otherThreads.forEach(thread => this._appendThreadTimelineData(thread.name, thread.events, thread.asyncEventsByGroup));
+ var compositorThreads = threads.filter(thread => thread.name.startsWith("CompositorTileWorker"));
+ var otherThreads = threads.filter(thread => !thread.name.startsWith("CompositorTileWorker"));
if (compositorThreads.length) {
this._appendHeader(WebInspector.UIString("Rasterizer Threads"), this._headerLevel1);
for (var i = 0; i < compositorThreads.length; ++i)
this._appendSyncEvents(compositorThreads[i].events, WebInspector.UIString("Rasterizer Thread %d", i), this._headerLevel2);
}
+ this._appendThreadTimelineData(WebInspector.UIString("Main Thread"), this._model.mainThreadEvents(), this._model.mainThreadAsyncEvents(), true);
+ if (Runtime.experiments.isEnabled("gpuTimeline"))
+ this._appendGPUEvents();
+
+ otherThreads.forEach(thread => this._appendThreadTimelineData(thread.name, thread.events, thread.asyncEventsByGroup));
+
/**
* @param {!WebInspector.TimelineFlameChartMarker} a
* @param {!WebInspector.TimelineFlameChartMarker} b
@@ -656,8 +650,6 @@ WebInspector.TimelineFlameChartDataProvider.prototype = {
}
if (type === WebInspector.TimelineFlameChartEntryType.Frame)
return "white";
- if (type === WebInspector.TimelineFlameChartEntryType.Header)
- return "#aaa";
if (type === WebInspector.TimelineFlameChartEntryType.InteractionRecord)
return WebInspector.TimelineUIUtils.interactionPhaseColor(/** @type {!WebInspector.TimelineIRModel.Phases} */ (this._entryData[entryIndex]));
return "";
@@ -747,24 +739,7 @@ WebInspector.TimelineFlameChartDataProvider.prototype = {
*/
_appendHeader: function(title, style, expanded)
{
- if (Runtime.experiments.isEnabled("timelineCollapsible"))
- this._timelineData.groups.push({startLevel: this._currentLevel, name: title, expanded: expanded, style: style});
- else
- this._appendHeaderRecord(title)
- },
-
- /**
- * @param {string} title
- */
- _appendHeaderRecord: function(title)
- {
- var index = this._entryData.length;
- this._entryIndexToTitle[index] = title;
- this._entryData.push(null);
- this._entryTypeByLevel[this._currentLevel] = WebInspector.TimelineFlameChartEntryType.Header;
- this._timelineData.entryLevels[index] = this._currentLevel++;
- this._timelineData.entryTotalTimes[index] = this._timeSpan;
- this._timelineData.entryStartTimes[index] = this._minimumBoundary;
+ this._timelineData.groups.push({startLevel: this._currentLevel, name: title, expanded: expanded, style: style});
},
/**
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/main/Main.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698