CDPotion.Domain.LayerTree (cdpotion v0.1.0)

Summary

Functions

Provides the reasons why the given layer was composited.

Disables compositing tree inspection.

Enables compositing tree inspection.

Returns the snapshot identifier.

Returns the layer snapshot identifier.

Parameters:

  • snapshotId:SnapshotId: The id of the layer snapshot.
  • minRepeatCount:integer: (Optional) The maximum number of times to replay the snapshot (1, if not specified).
  • minDuration:number: (Optional) The minimum duration (in seconds) to replay the snapshot.
  • clipRect:DOM.Rect: (Optional) The clip rectangle to apply when replaying the snapshot.

Releases layer snapshot captured by the back-end.

Replays the layer snapshot and returns the resulting bitmap.

Replays the layer snapshot and returns canvas log.

Functions

Link to this function

compositing_reasons(layer_id)

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.

Disables compositing tree inspection.

Enables compositing tree inspection.

Link to this function

load_snapshot(tiles)

Returns the snapshot identifier.

Parameters:

  • tiles:array: An array of tiles composing the snapshot.
Link to this function

make_snapshot(layer_id)

Returns the layer snapshot identifier.

Parameters:

  • layerId:LayerId: The id of the layer.
Link to this function

profile_snapshot(snapshot_id, min_repeat_count \\ nil, min_duration \\ nil, clip_rect \\ nil)

Parameters:

  • snapshotId:SnapshotId: The id of the layer snapshot.
  • minRepeatCount:integer: (Optional) The maximum number of times to replay the snapshot (1, if not specified).
  • minDuration:number: (Optional) The minimum duration (in seconds) to replay the snapshot.
  • clipRect:DOM.Rect: (Optional) The clip rectangle to apply when replaying the snapshot.
Link to this function

release_snapshot(snapshot_id)

Releases layer snapshot captured by the back-end.

Parameters:

  • snapshotId:SnapshotId: The id of the layer snapshot.
Link to this function

replay_snapshot(snapshot_id, from_step \\ nil, to_step \\ nil, scale \\ nil)

Replays the layer snapshot and returns the resulting bitmap.

Parameters:

  • snapshotId:SnapshotId: The id of the layer snapshot.
  • fromStep:integer: (Optional) The first step to replay from (replay from the very start if not specified).
  • toStep:integer: (Optional) The last step to replay to (replay till the end if not specified).
  • scale:number: (Optional) The scale to apply while replaying (defaults to 1).
Link to this function

snapshot_command_log(snapshot_id)

Replays the layer snapshot and returns canvas log.

Parameters:

  • snapshotId:SnapshotId: The id of the layer snapshot.