LayerTree

class LayerTree(cdp: CDP) : Domain

Constructors

Link copied to clipboard
constructor(cdp: CDP)

Types

Link copied to clipboard
@Serializable
data class CompositingReasonsParameter(val layerId: String)
Link copied to clipboard
@Serializable
data class CompositingReasonsReturn(val compositingReasons: List<String>, val compositingReasonIds: List<String>)
Link copied to clipboard
@Serializable
data class Layer(val layerId: String, val parentLayerId: String? = null, val backendNodeId: Int? = null, val offsetX: Double, val offsetY: Double, val width: Double, val height: Double, val transform: List<Double>? = null, val anchorX: Double? = null, val anchorY: Double? = null, val anchorZ: Double? = null, val paintCount: Int, val drawsContent: Boolean, val invisible: Boolean? = null, val scrollRects: List<LayerTree.ScrollRect>? = null, val stickyPositionConstraint: LayerTree.StickyPositionConstraint? = null)

Information about a compositing layer.

Link copied to clipboard
@Serializable
data class LayerPaintedParameter(val layerId: String, val clip: DOM.Rect)
Link copied to clipboard
@Serializable
data class LayerTreeDidChangeParameter(val layers: List<LayerTree.Layer>? = null)
Link copied to clipboard
@Serializable
data class LoadSnapshotParameter(val tiles: List<LayerTree.PictureTile>)
Link copied to clipboard
@Serializable
data class LoadSnapshotReturn(val snapshotId: String)
Link copied to clipboard
@Serializable
data class MakeSnapshotParameter(val layerId: String)
Link copied to clipboard
@Serializable
data class MakeSnapshotReturn(val snapshotId: String)
Link copied to clipboard
@Serializable
data class PictureTile(val x: Double, val y: Double, val picture: String)

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

Link copied to clipboard
@Serializable
data class ProfileSnapshotParameter(val snapshotId: String, val minRepeatCount: Int? = null, val minDuration: Double? = null, val clipRect: DOM.Rect? = null)
Link copied to clipboard
@Serializable
data class ProfileSnapshotReturn(val timings: List<List<Double>>)
Link copied to clipboard
@Serializable
data class ReleaseSnapshotParameter(val snapshotId: String)
Link copied to clipboard
@Serializable
data class ReplaySnapshotParameter(val snapshotId: String, val fromStep: Int? = null, val toStep: Int? = null, val scale: Double? = null)
Link copied to clipboard
@Serializable
data class ReplaySnapshotReturn(val dataURL: String)
Link copied to clipboard
@Serializable
data class ScrollRect(val rect: DOM.Rect, val type: String)

Rectangle where scrolling happens on the main thread.

Link copied to clipboard
@Serializable
data class SnapshotCommandLogParameter(val snapshotId: String)
Link copied to clipboard
@Serializable
data class SnapshotCommandLogReturn(val commandLog: List<Map<String, JsonElement>>)
Link copied to clipboard
@Serializable
data class StickyPositionConstraint(val stickyBoxRect: DOM.Rect, val containingBlockRect: DOM.Rect, val nearestLayerShiftingStickyBox: String? = null, val nearestLayerShiftingContainingBlock: String? = null)

Sticky position constraints.

Properties

Functions

Link copied to clipboard

Provides the reasons why the given layer was composited.

Link copied to clipboard
suspend fun disable(mode: CommandMode = CommandMode.DEFAULT)

Disables compositing tree inspection.

Link copied to clipboard
suspend fun enable(mode: CommandMode = CommandMode.DEFAULT)

Enables compositing tree inspection.

Link copied to clipboard

Returns the snapshot identifier.

Link copied to clipboard

Returns the layer snapshot identifier.

Link copied to clipboard
suspend fun profileSnapshot(snapshotId: String, minRepeatCount: Int? = null, minDuration: Double? = null, clipRect: DOM.Rect? = null): LayerTree.ProfileSnapshotReturn
Link copied to clipboard
suspend fun releaseSnapshot(snapshotId: String)
suspend fun releaseSnapshot(args: LayerTree.ReleaseSnapshotParameter, mode: CommandMode = CommandMode.DEFAULT)

Releases layer snapshot captured by the back-end.

Link copied to clipboard
suspend fun replaySnapshot(snapshotId: String, fromStep: Int? = null, toStep: Int? = null, scale: Double? = null): LayerTree.ReplaySnapshotReturn

Replays the layer snapshot and returns the resulting bitmap.

Link copied to clipboard

Replays the layer snapshot and returns canvas log.