Methods

Chrome DevTools

LayerTree.compositingReasons #

Provides the reasons why the given layer was composited.

Parameters

layerId
LayerId

The id of the layer for which we want to get the reasons it was composited.

Return object

compositingReasons
array[ string ]

A list of strings specifying reasons for the given layer to become composited.

compositingReasonIds
array[ string ]

A list of strings specifying reason IDs for the given layer to become composited.


Chrome DevTools

LayerTree.disable #

Disables compositing tree inspection.


Chrome DevTools

LayerTree.enable #

Enables compositing tree inspection.


Chrome DevTools

LayerTree.loadSnapshot #

Returns the snapshot identifier.

Parameters

tiles
array[ PictureTile ]

An array of tiles composing the snapshot.

Return object

snapshotId
SnapshotId

The id of the snapshot.


Chrome DevTools

LayerTree.makeSnapshot #

Returns the layer snapshot identifier.

Parameters

layerId
LayerId

The id of the layer.

Return object

snapshotId
SnapshotId

The id of the layer snapshot.


Chrome DevTools

LayerTree.profileSnapshot #

Parameters

snapshotId
SnapshotId

The id of the layer snapshot.

minRepeatCount
Optional
integer

The maximum number of times to replay the snapshot (1, if not specified).

minDuration
Optional
number

The minimum duration (in seconds) to replay the snapshot.

clipRect
Optional
DOM.Rect

The clip rectangle to apply when replaying the snapshot.

Return object

timings
array[ PaintProfile ]

The array of paint profiles, one per run.


Chrome DevTools

LayerTree.releaseSnapshot #

Releases layer snapshot captured by the back-end.

Parameters

snapshotId
SnapshotId

The id of the layer snapshot.


Chrome DevTools

LayerTree.replaySnapshot #

Replays the layer snapshot and returns the resulting bitmap.

Parameters

snapshotId
SnapshotId

The id of the layer snapshot.

fromStep
Optional
integer

The first step to replay from (replay from the very start if not specified).

toStep
Optional
integer

The last step to replay to (replay till the end if not specified).

scale
Optional
number

The scale to apply while replaying (defaults to 1).

Return object

dataURL
string

A data: URL for resulting image.


Chrome DevTools

LayerTree.snapshotCommandLog #

Replays the layer snapshot and returns canvas log.

Parameters

snapshotId
SnapshotId

The id of the layer snapshot.

Return object

commandLog
array[ object ]

The array of canvas function calls.

Events

Chrome DevTools

LayerTree.layerPainted #

Parameters

layerId
LayerId

The id of the painted layer.

clip
DOM.Rect

Clip rectangle.


Chrome DevTools

LayerTree.layerTreeDidChange #

Parameters

layers
Optional
array[ Layer ]

Layer tree, absent if not in the compositing mode.

Types

Chrome DevTools

LayerTree.Layer #

Information about a compositing layer.

Type: object

Properties

layerId
LayerId

The unique id for this layer.

parentLayerId
Optional
LayerId

The id of parent (not present for root).

backendNodeId
Optional
DOM.BackendNodeId

The backend id for the node associated with this layer.

offsetX
number

Offset from parent layer, X coordinate.

offsetY
number

Offset from parent layer, Y coordinate.

width
number

Layer width.

height
number

Layer height.

transform
Optional
array[ number ]

Transformation matrix for layer, default is identity matrix

anchorX
Optional
number

Transform anchor point X, absent if no transform specified

anchorY
Optional
number

Transform anchor point Y, absent if no transform specified

anchorZ
Optional
number

Transform anchor point Z, absent if no transform specified

paintCount
integer

Indicates how many time this layer has painted.

drawsContent
boolean

Indicates whether this layer hosts any content, rather than being used for transform/scrolling purposes only.

invisible
Optional
boolean

Set if layer is not visible.

scrollRects
Optional
array[ ScrollRect ]

Rectangles scrolling on main thread only.

stickyPositionConstraint
Optional
StickyPositionConstraint

Sticky position constraint information


Chrome DevTools

LayerTree.LayerId #

Unique Layer identifier.

Type: string


Chrome DevTools

LayerTree.PaintProfile #

Array of timings, one per paint step.

Type: array[ number ]


Chrome DevTools

LayerTree.PictureTile #

Serialized fragment of layer picture along with its offset within the layer.

Type: object

Properties

x
number

Offset from owning layer left boundary

y
number

Offset from owning layer top boundary

picture
string

Base64-encoded snapshot data. (Encoded as a base64 string when passed over JSON)


Chrome DevTools

LayerTree.ScrollRect #

Rectangle where scrolling happens on the main thread.

Type: object

Properties

rect
DOM.Rect

Rectangle itself.

type
string

Reason for rectangle to force scrolling on the main thread

Allowed values: RepaintsOnScroll, TouchEventHandler, WheelEventHandler


Chrome DevTools

LayerTree.SnapshotId #

Unique snapshot identifier.

Type: string


Chrome DevTools

LayerTree.StickyPositionConstraint #

Sticky position constraints.

Type: object

Properties

stickyBoxRect
DOM.Rect

Layout rectangle of the sticky element before being shifted

containingBlockRect
DOM.Rect

Layout rectangle of the containing block of the sticky element

nearestLayerShiftingStickyBox
Optional
LayerId

The nearest sticky layer that shifts the sticky box

nearestLayerShiftingContainingBlock
Optional
LayerId

The nearest sticky layer that shifts the containing block