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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 for (var i = 0; i < requestedNodeIds.length; ++i) { | 244 for (var i = 0; i < requestedNodeIds.length; ++i) { |
245 var nodeId = nodeIds[i]; | 245 var nodeId = nodeIds[i]; |
246 if (nodeId) | 246 if (nodeId) |
247 this._backendNodeIdToNodeId[requestedNodeIds[i]] = nodeI
d; | 247 this._backendNodeIdToNodeId[requestedNodeIds[i]] = nodeI
d; |
248 } | 248 } |
249 } | 249 } |
250 callback(); | 250 callback(); |
251 } | 251 } |
252 }, | 252 }, |
253 | 253 |
| 254 /** |
| 255 * @param {!Object} viewportSize |
| 256 */ |
| 257 setViewportSize: function(viewportSize) |
| 258 { |
| 259 this._viewportSize = viewportSize; |
| 260 }, |
| 261 |
| 262 /** |
| 263 * @return {!Object | undefined} |
| 264 */ |
| 265 viewportSize: function() |
| 266 { |
| 267 return this._viewportSize; |
| 268 }, |
| 269 |
254 __proto__: WebInspector.TargetAwareObject.prototype | 270 __proto__: WebInspector.TargetAwareObject.prototype |
255 }; | 271 }; |
256 | 272 |
257 /** | 273 /** |
258 * @constructor | 274 * @constructor |
259 * @extends {WebInspector.LayerTreeBase} | 275 * @extends {WebInspector.LayerTreeBase} |
260 * @param {!WebInspector.Target} target | 276 * @param {!WebInspector.Target} target |
261 */ | 277 */ |
262 WebInspector.TracingLayerTree = function(target) | 278 WebInspector.TracingLayerTree = function(target) |
263 { | 279 { |
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1111 }, | 1127 }, |
1112 | 1128 |
1113 __proto__: WebInspector.DeferredLayerTree.prototype | 1129 __proto__: WebInspector.DeferredLayerTree.prototype |
1114 }; | 1130 }; |
1115 | 1131 |
1116 /** | 1132 /** |
1117 * @constructor | 1133 * @constructor |
1118 * @extends {WebInspector.DeferredLayerTree} | 1134 * @extends {WebInspector.DeferredLayerTree} |
1119 * @param {!WebInspector.Target} target | 1135 * @param {!WebInspector.Target} target |
1120 * @param {!WebInspector.TracingLayerPayload} root | 1136 * @param {!WebInspector.TracingLayerPayload} root |
| 1137 * @param {!Object} viewportSize |
1121 */ | 1138 */ |
1122 WebInspector.DeferredTracingLayerTree = function(target, root) | 1139 WebInspector.DeferredTracingLayerTree = function(target, root, viewportSize) |
1123 { | 1140 { |
1124 WebInspector.DeferredLayerTree.call(this, target); | 1141 WebInspector.DeferredLayerTree.call(this, target); |
1125 this._root = root; | 1142 this._root = root; |
| 1143 this._viewportSize = viewportSize; |
1126 } | 1144 } |
1127 | 1145 |
1128 WebInspector.DeferredTracingLayerTree.prototype = { | 1146 WebInspector.DeferredTracingLayerTree.prototype = { |
1129 /** | 1147 /** |
1130 * @param {function(!WebInspector.LayerTreeBase)} callback | 1148 * @param {function(!WebInspector.LayerTreeBase)} callback |
1131 */ | 1149 */ |
1132 resolve: function(callback) | 1150 resolve: function(callback) |
1133 { | 1151 { |
1134 var result = new WebInspector.TracingLayerTree(this._target); | 1152 var result = new WebInspector.TracingLayerTree(this._target); |
| 1153 result.setViewportSize(this._viewportSize); |
1135 result.setLayers(this._root, callback.bind(null, result)); | 1154 result.setLayers(this._root, callback.bind(null, result)); |
1136 }, | 1155 }, |
1137 | 1156 |
1138 __proto__: WebInspector.DeferredLayerTree.prototype | 1157 __proto__: WebInspector.DeferredLayerTree.prototype |
1139 }; | 1158 }; |
1140 | 1159 |
1141 /** | 1160 /** |
1142 * @constructor | 1161 * @constructor |
1143 * @implements {LayerTreeAgent.Dispatcher} | 1162 * @implements {LayerTreeAgent.Dispatcher} |
1144 * @param {!WebInspector.LayerTreeModel} layerTreeModel | 1163 * @param {!WebInspector.LayerTreeModel} layerTreeModel |
(...skipping 14 matching lines...) Expand all Loading... |
1159 | 1178 |
1160 /** | 1179 /** |
1161 * @param {!LayerTreeAgent.LayerId} layerId | 1180 * @param {!LayerTreeAgent.LayerId} layerId |
1162 * @param {!DOMAgent.Rect} clipRect | 1181 * @param {!DOMAgent.Rect} clipRect |
1163 */ | 1182 */ |
1164 layerPainted: function(layerId, clipRect) | 1183 layerPainted: function(layerId, clipRect) |
1165 { | 1184 { |
1166 this._layerTreeModel._layerPainted(layerId, clipRect); | 1185 this._layerTreeModel._layerPainted(layerId, clipRect); |
1167 } | 1186 } |
1168 } | 1187 } |
OLD | NEW |