| 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/rect.html"> | 8 <link rel="import" href="/tracing/base/math/rect.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/region.html"> | 10 <link rel="import" href="/tracing/extras/chrome/cc/region.html"> |
| 11 <link rel="import" href="/tracing/extras/chrome/cc/tile_coverage_rect.html"> | 11 <link rel="import" href="/tracing/extras/chrome/cc/tile_coverage_rect.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 tr.exportTo('tr.e.cc', function() { | 17 tr.exportTo('tr.e.cc', function() { |
| 18 var constants = tr.e.cc.constants; | 18 var constants = tr.e.cc.constants; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 47 this, ['layerId', 'layerQuad']); | 47 this, ['layerId', 'layerQuad']); |
| 48 tr.e.cc.moveOptionalFieldsFromArgsToToplevel( | 48 tr.e.cc.moveOptionalFieldsFromArgsToToplevel( |
| 49 this, ['children', 'maskLayer', 'replicaLayer', | 49 this, ['children', 'maskLayer', 'replicaLayer', |
| 50 'idealContentsScale', 'geometryContentsScale', | 50 'idealContentsScale', 'geometryContentsScale', |
| 51 'layoutRects', 'usingGpuRasterization']); | 51 'layoutRects', 'usingGpuRasterization']); |
| 52 | 52 |
| 53 // Leave gpu memory usage in both places. | 53 // Leave gpu memory usage in both places. |
| 54 this.gpuMemoryUsageInBytes = this.args.gpuMemoryUsage; | 54 this.gpuMemoryUsageInBytes = this.args.gpuMemoryUsage; |
| 55 | 55 |
| 56 // Leave bounds in both places. | 56 // Leave bounds in both places. |
| 57 this.bounds = tr.b.Rect.fromXYWH( | 57 this.bounds = tr.b.math.Rect.fromXYWH( |
| 58 0, 0, | 58 0, 0, |
| 59 this.args.bounds.width, this.args.bounds.height); | 59 this.args.bounds.width, this.args.bounds.height); |
| 60 | 60 |
| 61 if (this.args.animationBounds) { | 61 if (this.args.animationBounds) { |
| 62 // AnimationBounds[2] and [5] are the Z-component of the box. | 62 // AnimationBounds[2] and [5] are the Z-component of the box. |
| 63 this.animationBoundsRect = tr.b.Rect.fromXYWH( | 63 this.animationBoundsRect = tr.b.math.Rect.fromXYWH( |
| 64 this.args.animationBounds[0], this.args.animationBounds[1], | 64 this.args.animationBounds[0], this.args.animationBounds[1], |
| 65 this.args.animationBounds[3], this.args.animationBounds[4]); | 65 this.args.animationBounds[3], this.args.animationBounds[4]); |
| 66 } | 66 } |
| 67 | 67 |
| 68 // After Slimming Paint v2, compositor no longer knows hierarchy | 68 // After Slimming Paint v2, compositor no longer knows hierarchy |
| 69 // information. If the children value is undefined, the tracing | 69 // information. If the children value is undefined, the tracing |
| 70 // data comes from the new version of cc, otherwise we set the | 70 // data comes from the new version of cc, otherwise we set the |
| 71 // parentLayer as we did before SPv2. | 71 // parentLayer as we did before SPv2. |
| 72 if (this.children) { | 72 if (this.children) { |
| 73 for (var i = 0; i < this.children.length; i++) | 73 for (var i = 0; i < this.children.length; i++) |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 'CounterLayer' | 199 'CounterLayer' |
| 200 ] | 200 ] |
| 201 }); | 201 }); |
| 202 | 202 |
| 203 return { | 203 return { |
| 204 LayerImplSnapshot, | 204 LayerImplSnapshot, |
| 205 PictureLayerImplSnapshot, | 205 PictureLayerImplSnapshot, |
| 206 }; | 206 }; |
| 207 }); | 207 }); |
| 208 </script> | 208 </script> |
| OLD | NEW |