| OLD | NEW |
| 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 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1019 var groups = this._rawTimelineData.groups || []; | 1019 var groups = this._rawTimelineData.groups || []; |
| 1020 this._visibleLevelOffsets = new Uint32Array(levelCount + 1); | 1020 this._visibleLevelOffsets = new Uint32Array(levelCount + 1); |
| 1021 this._visibleLevels = new Uint16Array(levelCount); | 1021 this._visibleLevels = new Uint16Array(levelCount); |
| 1022 this._groupOffsets = new Uint32Array(groups.length + 1); | 1022 this._groupOffsets = new Uint32Array(groups.length + 1); |
| 1023 | 1023 |
| 1024 var groupIndex = -1; | 1024 var groupIndex = -1; |
| 1025 var currentOffset = this._rulerEnabled ? PerfUI.FlameChart.HeaderHeight : 2; | 1025 var currentOffset = this._rulerEnabled ? PerfUI.FlameChart.HeaderHeight : 2; |
| 1026 var visible = true; | 1026 var visible = true; |
| 1027 /** @type !Array<{nestingLevel: number, visible: boolean}> */ | 1027 /** @type !Array<{nestingLevel: number, visible: boolean}> */ |
| 1028 var groupStack = [{nestingLevel: -1, visible: true}]; | 1028 var groupStack = [{nestingLevel: -1, visible: true}]; |
| 1029 var lastGroupLevel = Math.max(levelCount, groups.peekLast().startLevel + 1); | 1029 var lastGroupLevel = Math.max(levelCount, groups.length ? groups.peekLast().
startLevel + 1 : 0); |
| 1030 for (var level = 0; level < lastGroupLevel; ++level) { | 1030 for (var level = 0; level < lastGroupLevel; ++level) { |
| 1031 while (groupIndex < groups.length - 1 && level === groups[groupIndex + 1].
startLevel) { | 1031 while (groupIndex < groups.length - 1 && level === groups[groupIndex + 1].
startLevel) { |
| 1032 ++groupIndex; | 1032 ++groupIndex; |
| 1033 var style = groups[groupIndex].style; | 1033 var style = groups[groupIndex].style; |
| 1034 var nextLevel = true; | 1034 var nextLevel = true; |
| 1035 while (groupStack.peekLast().nestingLevel >= style.nestingLevel) { | 1035 while (groupStack.peekLast().nestingLevel >= style.nestingLevel) { |
| 1036 groupStack.pop(); | 1036 groupStack.pop(); |
| 1037 nextLevel = false; | 1037 nextLevel = false; |
| 1038 } | 1038 } |
| 1039 var thisGroupIsVisible = | 1039 var thisGroupIsVisible = |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1529 } | 1529 } |
| 1530 | 1530 |
| 1531 /** | 1531 /** |
| 1532 * @override | 1532 * @override |
| 1533 * @return {number} | 1533 * @return {number} |
| 1534 */ | 1534 */ |
| 1535 boundarySpan() { | 1535 boundarySpan() { |
| 1536 return this._maximumBoundaries - this._minimumBoundaries; | 1536 return this._maximumBoundaries - this._minimumBoundaries; |
| 1537 } | 1537 } |
| 1538 }; | 1538 }; |
| OLD | NEW |