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

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

Issue 2690603003: Timeline: streamline flame chart views update logic (Closed)
Patch Set: moar fixes Created 3 years, 10 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
OLDNEW
1 /** 1 /**
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 this._draw(this._offsetWidth, this._offsetHeight); 1194 this._draw(this._offsetWidth, this._offsetHeight);
1195 if (!this.isDragging()) 1195 if (!this.isDragging())
1196 this._updateHighlight(); 1196 this._updateHighlight();
1197 } 1197 }
1198 1198
1199 /** 1199 /**
1200 * @override 1200 * @override
1201 */ 1201 */
1202 reset() { 1202 reset() {
1203 super.reset(); 1203 super.reset();
1204 this._rawTimelineData = null;
1205 this._rawTimelineDataLength = 0;
1204 this._highlightedMarkerIndex = -1; 1206 this._highlightedMarkerIndex = -1;
1205 this._highlightedEntryIndex = -1; 1207 this._highlightedEntryIndex = -1;
1206 this._selectedEntryIndex = -1; 1208 this._selectedEntryIndex = -1;
1207 /** @type {!Map<string,!Map<string,number>>} */ 1209 /** @type {!Map<string,!Map<string,number>>} */
1208 this._textWidth = new Map(); 1210 this._textWidth = new Map();
1209 this.update(); 1211 this.scheduleUpdate();
1210 } 1212 }
1211 1213
1212 _enabled() { 1214 _enabled() {
1213 return this._rawTimelineDataLength !== 0; 1215 return this._rawTimelineDataLength !== 0;
1214 } 1216 }
1215 }; 1217 };
1216 1218
1217 PerfUI.FlameChart.HeaderHeight = 15; 1219 PerfUI.FlameChart.HeaderHeight = 15;
1218 1220
1219 PerfUI.FlameChart.MinimalTimeWindowMs = 0.5; 1221 PerfUI.FlameChart.MinimalTimeWindowMs = 0.5;
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
1520 } 1522 }
1521 1523
1522 /** 1524 /**
1523 * @override 1525 * @override
1524 * @return {number} 1526 * @return {number}
1525 */ 1527 */
1526 boundarySpan() { 1528 boundarySpan() {
1527 return this._maximumBoundaries - this._minimumBoundaries; 1529 return this._maximumBoundaries - this._minimumBoundaries;
1528 } 1530 }
1529 }; 1531 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698