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

Side by Side Diff: Source/devtools/front_end/TimelineTracingView.js

Issue 224843014: DevTools: support importing layer tree from trace snapshots. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased, removed redundant transform handling code Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/LayersPanel.js ('k') | Source/devtools/front_end/modules.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 The Chromium Authors. All rights reserved. 2 * Copyright 2014 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /** 7 /**
8 * @constructor 8 * @constructor
9 * @implements {WebInspector.TimelineModeView} 9 * @implements {WebInspector.TimelineModeView}
10 * @implements {WebInspector.FlameChartDelegate} 10 * @implements {WebInspector.FlameChartDelegate}
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 this._delegate.showInDetails("", document.createTextNode("")); 98 this._delegate.showInDetails("", document.createTextNode(""));
99 return; 99 return;
100 } 100 }
101 var contentHelper = new WebInspector.TimelineDetailsContentHelper(null, null, false); 101 var contentHelper = new WebInspector.TimelineDetailsContentHelper(null, null, false);
102 contentHelper.appendTextRow(WebInspector.UIString("Name"), record.name); 102 contentHelper.appendTextRow(WebInspector.UIString("Name"), record.name);
103 contentHelper.appendTextRow(WebInspector.UIString("Category"), record.ca tegory); 103 contentHelper.appendTextRow(WebInspector.UIString("Category"), record.ca tegory);
104 contentHelper.appendTextRow(WebInspector.UIString("Start"), Number.milli sToString(this._dataProvider._toTimelineTime(record.startTime - this._tracingMod el.minimumRecordTime()), true)); 104 contentHelper.appendTextRow(WebInspector.UIString("Start"), Number.milli sToString(this._dataProvider._toTimelineTime(record.startTime - this._tracingMod el.minimumRecordTime()), true));
105 contentHelper.appendTextRow(WebInspector.UIString("Duration"), Number.mi llisToString(this._dataProvider._toTimelineTime(record.duration), true)); 105 contentHelper.appendTextRow(WebInspector.UIString("Duration"), Number.mi llisToString(this._dataProvider._toTimelineTime(record.duration), true));
106 if (!Object.isEmpty(record.args)) 106 if (!Object.isEmpty(record.args))
107 contentHelper.appendElementRow(WebInspector.UIString("Arguments"), t his._formatArguments(record.args)); 107 contentHelper.appendElementRow(WebInspector.UIString("Arguments"), t his._formatArguments(record.args));
108 108 function reveal()
109 {
110 WebInspector.Revealer.reveal(new WebInspector.TracingLayerSnapshot(r ecord.args["snapshot"]["active_tree"]["root_layer"]));
111 }
112 if (record.name === "cc::LayerTreeHostImpl") {
113 var link = document.createElement("span");
114 link.classList.add("revealable-link");
115 link.textContent = "show";
116 link.addEventListener("click", reveal, false);
117 contentHelper.appendElementRow(WebInspector.UIString("Layer tree"), link);
118 }
109 this._delegate.showInDetails(WebInspector.UIString("Selected Event"), co ntentHelper.element); 119 this._delegate.showInDetails(WebInspector.UIString("Selected Event"), co ntentHelper.element);
110 }, 120 },
111 121
112 /** 122 /**
113 * @param {!Object} args 123 * @param {!Object} args
114 * @return {!Element} 124 * @return {!Element}
115 */ 125 */
116 _formatArguments: function(args) 126 _formatArguments: function(args)
117 { 127 {
118 var table = document.createElement("table"); 128 var table = document.createElement("table");
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 /** 521 /**
512 * @param {string} string 522 * @param {string} string
513 * @return {string} 523 * @return {string}
514 */ 524 */
515 colorForString: function(string) 525 colorForString: function(string)
516 { 526 {
517 var hash = WebInspector.TraceViewPalette._stringHash(string); 527 var hash = WebInspector.TraceViewPalette._stringHash(string);
518 return this._palette[hash % this._palette.length]; 528 return this._palette[hash % this._palette.length];
519 } 529 }
520 }; 530 };
OLDNEW
« no previous file with comments | « Source/devtools/front_end/LayersPanel.js ('k') | Source/devtools/front_end/modules.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698