| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (c) 2015 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
| 5 found in the LICENSE file. | 5 found in the LICENSE file. |
| 6 --> | 6 --> |
| 7 | 7 |
| 8 <link rel="import" href="/tracing/base/color.html"> | 8 <link rel="import" href="/tracing/base/color.html"> |
| 9 <link rel="import" href="/tracing/base/quad.html"> | 9 <link rel="import" href="/tracing/base/quad.html"> |
| 10 <link rel="import" href="/tracing/base/raf.html"> | 10 <link rel="import" href="/tracing/base/raf.html"> |
| (...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1145 this.infoBar_.removeAllButtons(); | 1145 this.infoBar_.removeAllButtons(); |
| 1146 this.infoBar_.message = ''; | 1146 this.infoBar_.message = ''; |
| 1147 this.infoBar_.visible = false; | 1147 this.infoBar_.visible = false; |
| 1148 } | 1148 } |
| 1149 }, | 1149 }, |
| 1150 | 1150 |
| 1151 getWhatRasterized_: function() { | 1151 getWhatRasterized_: function() { |
| 1152 var lthi = this.layerTreeImpl_.layerTreeHostImpl; | 1152 var lthi = this.layerTreeImpl_.layerTreeHostImpl; |
| 1153 var renderProcess = lthi.objectInstance.parent; | 1153 var renderProcess = lthi.objectInstance.parent; |
| 1154 var tasks = []; | 1154 var tasks = []; |
| 1155 renderProcess.iterateAllEvents(function(event) { | 1155 for (var event of renderProcess.getDescendantEvents()) { |
| 1156 if (!(event instanceof tr.model.Slice)) | 1156 if (!(event instanceof tr.model.Slice)) |
| 1157 return; | 1157 continue; |
| 1158 | 1158 |
| 1159 var tile = tr.e.cc.getTileFromRasterTaskSlice(event); | 1159 var tile = tr.e.cc.getTileFromRasterTaskSlice(event); |
| 1160 if (tile === undefined) | 1160 if (tile === undefined) |
| 1161 return false; | 1161 continue; |
| 1162 | 1162 |
| 1163 if (tile.containingSnapshot == lthi) | 1163 if (tile.containingSnapshot == lthi) |
| 1164 tasks.push(event); | 1164 tasks.push(event); |
| 1165 }, this); | 1165 } |
| 1166 return tasks; | 1166 return tasks; |
| 1167 }, | 1167 }, |
| 1168 | 1168 |
| 1169 updateWhatRasterizedLinkState_: function() { | 1169 updateWhatRasterizedLinkState_: function() { |
| 1170 var tasks = this.getWhatRasterized_(); | 1170 var tasks = this.getWhatRasterized_(); |
| 1171 if (tasks.length) { | 1171 if (tasks.length) { |
| 1172 Polymer.dom(this.whatRasterizedLink_).textContent = | 1172 Polymer.dom(this.whatRasterizedLink_).textContent = |
| 1173 tasks.length + ' raster tasks'; | 1173 tasks.length + ' raster tasks'; |
| 1174 this.whatRasterizedLink_.style.display = ''; | 1174 this.whatRasterizedLink_.style.display = ''; |
| 1175 } else { | 1175 } else { |
| 1176 Polymer.dom(this.whatRasterizedLink_).textContent = ''; | 1176 Polymer.dom(this.whatRasterizedLink_).textContent = ''; |
| 1177 this.whatRasterizedLink_.style.display = 'none'; | 1177 this.whatRasterizedLink_.style.display = 'none'; |
| 1178 } | 1178 } |
| 1179 }, | 1179 }, |
| 1180 | 1180 |
| 1181 onWhatRasterizedLinkClicked_: function() { | 1181 onWhatRasterizedLinkClicked_: function() { |
| 1182 var tasks = this.getWhatRasterized_(); | 1182 var tasks = this.getWhatRasterized_(); |
| 1183 var event = new tr.model.RequestSelectionChangeEvent(); | 1183 var event = new tr.model.RequestSelectionChangeEvent(); |
| 1184 event.selection = new tr.model.EventSet(tasks); | 1184 event.selection = new tr.model.EventSet(tasks); |
| 1185 this.dispatchEvent(event); | 1185 this.dispatchEvent(event); |
| 1186 } | 1186 } |
| 1187 }; | 1187 }; |
| 1188 | 1188 |
| 1189 return { | 1189 return { |
| 1190 LayerTreeQuadStackView: LayerTreeQuadStackView | 1190 LayerTreeQuadStackView: LayerTreeQuadStackView |
| 1191 }; | 1191 }; |
| 1192 }); | 1192 }); |
| 1193 </script> | 1193 </script> |
| OLD | NEW |