| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (c) 2013 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2013 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/bbox2.html"> | 8 <link rel="import" href="/tracing/base/math/bbox2.html"> |
| 9 <link rel="import" href="/tracing/extras/chrome/cc/constants.html"> | 9 <link rel="import" href="/tracing/extras/chrome/cc/constants.html"> |
| 10 <link rel="import" href="/tracing/extras/chrome/cc/layer_tree_impl.html"> | 10 <link rel="import" href="/tracing/extras/chrome/cc/layer_tree_impl.html"> |
| 11 <link rel="import" href="/tracing/extras/chrome/cc/util.html"> | 11 <link rel="import" href="/tracing/extras/chrome/cc/util.html"> |
| 12 <link rel="import" href="/tracing/model/object_instance.html"> | 12 <link rel="import" href="/tracing/model/object_instance.html"> |
| 13 | 13 |
| 14 <script> | 14 <script> |
| 15 'use strict'; | 15 'use strict'; |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * @fileoverview Provides the LayerTreeHostImpl model-level objects. | 18 * @fileoverview Provides the LayerTreeHostImpl model-level objects. |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 var tileHistory = this.allTileHistories_[tileID]; | 156 var tileHistory = this.allTileHistories_[tileID]; |
| 157 scales[tileHistory.contentsScale] = true; | 157 scales[tileHistory.contentsScale] = true; |
| 158 } | 158 } |
| 159 this.allContentsScales_ = Object.keys(scales); | 159 this.allContentsScales_ = Object.keys(scales); |
| 160 return this.allContentsScales_; | 160 return this.allContentsScales_; |
| 161 }, | 161 }, |
| 162 | 162 |
| 163 get allLayersBBox() { | 163 get allLayersBBox() { |
| 164 if (this.allLayersBBox_) | 164 if (this.allLayersBBox_) |
| 165 return this.allLayersBBox_; | 165 return this.allLayersBBox_; |
| 166 var bbox = new tr.b.BBox2(); | 166 var bbox = new tr.b.math.BBox2(); |
| 167 function handleTree(tree) { | 167 function handleTree(tree) { |
| 168 tree.renderSurfaceLayerList.forEach(function(layer) { | 168 tree.renderSurfaceLayerList.forEach(function(layer) { |
| 169 bbox.addQuad(layer.layerQuad); | 169 bbox.addQuad(layer.layerQuad); |
| 170 }); | 170 }); |
| 171 } | 171 } |
| 172 this.snapshots.forEach(function(lthi) { | 172 this.snapshots.forEach(function(lthi) { |
| 173 handleTree(lthi.activeTree); | 173 handleTree(lthi.activeTree); |
| 174 if (lthi.pendingTree) | 174 if (lthi.pendingTree) |
| 175 handleTree(lthi.pendingTree); | 175 handleTree(lthi.pendingTree); |
| 176 }); | 176 }); |
| 177 this.allLayersBBox_ = bbox; | 177 this.allLayersBBox_ = bbox; |
| 178 return this.allLayersBBox_; | 178 return this.allLayersBBox_; |
| 179 } | 179 } |
| 180 }; | 180 }; |
| 181 | 181 |
| 182 ObjectInstance.subTypes.register( | 182 ObjectInstance.subTypes.register( |
| 183 LayerTreeHostImplInstance, | 183 LayerTreeHostImplInstance, |
| 184 {typeName: 'cc::LayerTreeHostImpl'}); | 184 {typeName: 'cc::LayerTreeHostImpl'}); |
| 185 | 185 |
| 186 return { | 186 return { |
| 187 LayerTreeHostImplSnapshot, | 187 LayerTreeHostImplSnapshot, |
| 188 LayerTreeHostImplInstance, | 188 LayerTreeHostImplInstance, |
| 189 }; | 189 }; |
| 190 }); | 190 }); |
| 191 </script> | 191 </script> |
| OLD | NEW |