Index: third_party/WebKit/Source/core/inspector/protocol/LayerTree.json |
diff --git a/third_party/WebKit/Source/core/inspector/protocol/LayerTree.json b/third_party/WebKit/Source/core/inspector/protocol/LayerTree.json |
new file mode 100644 |
index 0000000000000000000000000000000000000000..dba1cdd50ea0155c1f2efd40973a1cf2bb803f06 |
--- /dev/null |
+++ b/third_party/WebKit/Source/core/inspector/protocol/LayerTree.json |
@@ -0,0 +1,382 @@ |
+{ |
+ "domain": "LayerTree", |
+ "version": { |
+ "major": "1", |
+ "minor": "1" |
+ }, |
+ "hidden": true, |
+ "dependencies": [ |
+ "DOM" |
+ ], |
+ "types": [ |
+ { |
+ "id": "LayerId", |
+ "type": "string", |
+ "description": "Unique Layer identifier." |
+ }, |
+ { |
+ "id": "SnapshotId", |
+ "type": "string", |
+ "description": "Unique snapshot identifier." |
+ }, |
+ { |
+ "id": "ScrollRect", |
+ "type": "object", |
+ "description": "Rectangle where scrolling happens on the main thread.", |
+ "properties": [ |
+ { |
+ "name": "rect", |
+ "$ref": "DOM.Rect", |
+ "description": "Rectangle itself." |
+ }, |
+ { |
+ "name": "type", |
+ "type": "string", |
+ "enum": [ |
+ "RepaintsOnScroll", |
+ "TouchEventHandler", |
+ "WheelEventHandler" |
+ ], |
+ "description": "Reason for rectangle to force scrolling on the main thread" |
+ } |
+ ] |
+ }, |
+ { |
+ "id": "PictureTile", |
+ "type": "object", |
+ "description": "Serialized fragment of layer picture along with its offset within the layer.", |
+ "properties": [ |
+ { |
+ "name": "x", |
+ "type": "number", |
+ "description": "Offset from owning layer left boundary" |
+ }, |
+ { |
+ "name": "y", |
+ "type": "number", |
+ "description": "Offset from owning layer top boundary" |
+ }, |
+ { |
+ "name": "picture", |
+ "type": "string", |
+ "description": "Base64-encoded snapshot data." |
+ } |
+ ] |
+ }, |
+ { |
+ "id": "Layer", |
+ "type": "object", |
+ "description": "Information about a compositing layer.", |
+ "properties": [ |
+ { |
+ "name": "layerId", |
+ "$ref": "LayerId", |
+ "description": "The unique id for this layer." |
+ }, |
+ { |
+ "name": "parentLayerId", |
+ "$ref": "LayerId", |
+ "optional": true, |
+ "description": "The id of parent (not present for root)." |
+ }, |
+ { |
+ "name": "backendNodeId", |
+ "$ref": "DOM.BackendNodeId", |
+ "optional": true, |
+ "description": "The backend id for the node associated with this layer." |
+ }, |
+ { |
+ "name": "offsetX", |
+ "type": "number", |
+ "description": "Offset from parent layer, X coordinate." |
+ }, |
+ { |
+ "name": "offsetY", |
+ "type": "number", |
+ "description": "Offset from parent layer, Y coordinate." |
+ }, |
+ { |
+ "name": "width", |
+ "type": "number", |
+ "description": "Layer width." |
+ }, |
+ { |
+ "name": "height", |
+ "type": "number", |
+ "description": "Layer height." |
+ }, |
+ { |
+ "name": "transform", |
+ "type": "array", |
+ "items": { |
+ "type": "number" |
+ }, |
+ "minItems": 16, |
+ "maxItems": 16, |
+ "optional": true, |
+ "description": "Transformation matrix for layer, default is identity matrix" |
+ }, |
+ { |
+ "name": "anchorX", |
+ "type": "number", |
+ "optional": true, |
+ "description": "Transform anchor point X, absent if no transform specified" |
+ }, |
+ { |
+ "name": "anchorY", |
+ "type": "number", |
+ "optional": true, |
+ "description": "Transform anchor point Y, absent if no transform specified" |
+ }, |
+ { |
+ "name": "anchorZ", |
+ "type": "number", |
+ "optional": true, |
+ "description": "Transform anchor point Z, absent if no transform specified" |
+ }, |
+ { |
+ "name": "paintCount", |
+ "type": "integer", |
+ "description": "Indicates how many time this layer has painted." |
+ }, |
+ { |
+ "name": "drawsContent", |
+ "type": "boolean", |
+ "description": "Indicates whether this layer hosts any content, rather than being used for transform/scrolling purposes only." |
+ }, |
+ { |
+ "name": "invisible", |
+ "type": "boolean", |
+ "optional": true, |
+ "description": "Set if layer is not visible." |
+ }, |
+ { |
+ "name": "scrollRects", |
+ "type": "array", |
+ "items": { |
+ "$ref": "ScrollRect" |
+ }, |
+ "optional": true, |
+ "description": "Rectangles scrolling on main thread only." |
+ } |
+ ] |
+ }, |
+ { |
+ "id": "PaintProfile", |
+ "type": "array", |
+ "description": "Array of timings, one per paint step.", |
+ "items": { |
+ "type": "number", |
+ "description": "A time in seconds since the end of previous step (for the first step, time since painting started)" |
+ } |
+ } |
+ ], |
+ "commands": [ |
+ { |
+ "name": "enable", |
+ "description": "Enables compositing tree inspection." |
+ }, |
+ { |
+ "name": "disable", |
+ "description": "Disables compositing tree inspection." |
+ }, |
+ { |
+ "name": "compositingReasons", |
+ "parameters": [ |
+ { |
+ "name": "layerId", |
+ "$ref": "LayerId", |
+ "description": "The id of the layer for which we want to get the reasons it was composited." |
+ } |
+ ], |
+ "description": "Provides the reasons why the given layer was composited.", |
+ "returns": [ |
+ { |
+ "name": "compositingReasons", |
+ "type": "array", |
+ "items": { |
+ "type": "string" |
+ }, |
+ "description": "A list of strings specifying reasons for the given layer to become composited." |
+ } |
+ ] |
+ }, |
+ { |
+ "name": "makeSnapshot", |
+ "parameters": [ |
+ { |
+ "name": "layerId", |
+ "$ref": "LayerId", |
+ "description": "The id of the layer." |
+ } |
+ ], |
+ "description": "Returns the layer snapshot identifier.", |
+ "returns": [ |
+ { |
+ "name": "snapshotId", |
+ "$ref": "SnapshotId", |
+ "description": "The id of the layer snapshot." |
+ } |
+ ] |
+ }, |
+ { |
+ "name": "loadSnapshot", |
+ "parameters": [ |
+ { |
+ "name": "tiles", |
+ "type": "array", |
+ "items": { |
+ "$ref": "PictureTile" |
+ }, |
+ "minItems": 1, |
+ "description": "An array of tiles composing the snapshot." |
+ } |
+ ], |
+ "description": "Returns the snapshot identifier.", |
+ "returns": [ |
+ { |
+ "name": "snapshotId", |
+ "$ref": "SnapshotId", |
+ "description": "The id of the snapshot." |
+ } |
+ ] |
+ }, |
+ { |
+ "name": "releaseSnapshot", |
+ "parameters": [ |
+ { |
+ "name": "snapshotId", |
+ "$ref": "SnapshotId", |
+ "description": "The id of the layer snapshot." |
+ } |
+ ], |
+ "description": "Releases layer snapshot captured by the back-end." |
+ }, |
+ { |
+ "name": "profileSnapshot", |
+ "parameters": [ |
+ { |
+ "name": "snapshotId", |
+ "$ref": "SnapshotId", |
+ "description": "The id of the layer snapshot." |
+ }, |
+ { |
+ "name": "minRepeatCount", |
+ "type": "integer", |
+ "optional": true, |
+ "description": "The maximum number of times to replay the snapshot (1, if not specified)." |
+ }, |
+ { |
+ "name": "minDuration", |
+ "type": "number", |
+ "optional": true, |
+ "description": "The minimum duration (in seconds) to replay the snapshot." |
+ }, |
+ { |
+ "name": "clipRect", |
+ "$ref": "DOM.Rect", |
+ "optional": true, |
+ "description": "The clip rectangle to apply when replaying the snapshot." |
+ } |
+ ], |
+ "returns": [ |
+ { |
+ "name": "timings", |
+ "type": "array", |
+ "items": { |
+ "$ref": "PaintProfile" |
+ }, |
+ "description": "The array of paint profiles, one per run." |
+ } |
+ ] |
+ }, |
+ { |
+ "name": "replaySnapshot", |
+ "parameters": [ |
+ { |
+ "name": "snapshotId", |
+ "$ref": "SnapshotId", |
+ "description": "The id of the layer snapshot." |
+ }, |
+ { |
+ "name": "fromStep", |
+ "type": "integer", |
+ "optional": true, |
+ "description": "The first step to replay from (replay from the very start if not specified)." |
+ }, |
+ { |
+ "name": "toStep", |
+ "type": "integer", |
+ "optional": true, |
+ "description": "The last step to replay to (replay till the end if not specified)." |
+ }, |
+ { |
+ "name": "scale", |
+ "type": "number", |
+ "optional": true, |
+ "description": "The scale to apply while replaying (defaults to 1)." |
+ } |
+ ], |
+ "description": "Replays the layer snapshot and returns the resulting bitmap.", |
+ "returns": [ |
+ { |
+ "name": "dataURL", |
+ "type": "string", |
+ "description": "A data: URL for resulting image." |
+ } |
+ ] |
+ }, |
+ { |
+ "name": "snapshotCommandLog", |
+ "parameters": [ |
+ { |
+ "name": "snapshotId", |
+ "$ref": "SnapshotId", |
+ "description": "The id of the layer snapshot." |
+ } |
+ ], |
+ "description": "Replays the layer snapshot and returns canvas log.", |
+ "returns": [ |
+ { |
+ "name": "commandLog", |
+ "type": "array", |
+ "items": { |
+ "type": "object" |
+ }, |
+ "description": "The array of canvas function calls." |
+ } |
+ ] |
+ } |
+ ], |
+ "events": [ |
+ { |
+ "name": "layerTreeDidChange", |
+ "parameters": [ |
+ { |
+ "name": "layers", |
+ "type": "array", |
+ "items": { |
+ "$ref": "Layer" |
+ }, |
+ "optional": true, |
+ "description": "Layer tree, absent if not in the comspositing mode." |
+ } |
+ ] |
+ }, |
+ { |
+ "name": "layerPainted", |
+ "parameters": [ |
+ { |
+ "name": "layerId", |
+ "$ref": "LayerId", |
+ "description": "The id of the painted layer." |
+ }, |
+ { |
+ "name": "clip", |
+ "$ref": "DOM.Rect", |
+ "description": "Clip rectangle." |
+ } |
+ ] |
+ } |
+ ] |
+} |