| Index: Source/devtools/front_end/LayerTreeModel.js
|
| diff --git a/Source/devtools/front_end/LayerTreeModel.js b/Source/devtools/front_end/LayerTreeModel.js
|
| index df1d656582229d4025e05f76bcc50c14d33ac4e0..ee6899ff4f0cca5ec09e77342b0b15c8bfd48043 100644
|
| --- a/Source/devtools/front_end/LayerTreeModel.js
|
| +++ b/Source/devtools/front_end/LayerTreeModel.js
|
| @@ -97,7 +97,7 @@ WebInspector.LayerTreeModel.prototype = {
|
| this._root = null;
|
| if (error) {
|
| console.error("LayerTreeAgent.getLayers(): " + error);
|
| - return;
|
| + layers = [];
|
| }
|
| this._repopulate(layers);
|
| for (var i = 0; i < this._pendingRequestLayersCallbacks.length; ++i)
|
| @@ -168,7 +168,7 @@ WebInspector.Layer = function(layerPayload)
|
|
|
| WebInspector.Layer.prototype = {
|
| /**
|
| - * @return {string?}
|
| + * @return {string}
|
| */
|
| id: function()
|
| {
|
| @@ -292,6 +292,35 @@ WebInspector.Layer.prototype = {
|
| },
|
|
|
| /**
|
| + * @return {number}
|
| + */
|
| + paintCount: function()
|
| + {
|
| + return this._layerPayload.paintCount;
|
| + },
|
| +
|
| + /**
|
| + * @param {function(Array.<string>?)} callback
|
| + */
|
| + requestCompositingReasons: function(callback)
|
| + {
|
| + /**
|
| + * @param {string?} error
|
| + * @param {LayerTreeAgent.CompositingReasons} compositingReasons
|
| + */
|
| + function callbackWrapper(error, compositingReasons)
|
| + {
|
| + if (error) {
|
| + console.error("LayerTreeAgent.reasonsForCompositingLayer(): " + error);
|
| + callback(null);
|
| + return;
|
| + }
|
| + callback(Object.keys(compositingReasons || {}));
|
| + }
|
| + LayerTreeAgent.reasonsForCompositingLayer(this.id(), callbackWrapper.bind(this));
|
| + },
|
| +
|
| + /**
|
| * @param {LayerTreeAgent.Layer} layerPayload
|
| */
|
| _reset: function(layerPayload)
|
|
|