Tungsten v0.1.0 Tungsten.CDP.LayerTree View Source

LayerTree

This domain has no documentation

Link to this section Summary

Link to this section Types

Link to this type

cdp_layer_id_type() View Source
cdp_layer_id_type() :: String.t()

LayerTree.LayerId

Unique Layer identifier.

Link to this type

cdp_layer_type() View Source
cdp_layer_type() :: %{
  :layer_id => cdp_layer_id_type(),
  optional(:parent_layer_id) => cdp_layer_id_type(),
  optional(:backend_node_id) => Tungsten.CDP.DOM.cdp_backend_node_id_type(),
  :offset_x => integer() | float(),
  :offset_y => integer() | float(),
  :width => integer() | float(),
  :height => integer() | float(),
  optional(:transform) => [integer() | float()],
  optional(:anchor_x) => integer() | float(),
  optional(:anchor_y) => integer() | float(),
  optional(:anchor_z) => integer() | float(),
  :paint_count => integer(),
  :draws_content => boolean(),
  optional(:invisible) => boolean(),
  optional(:scroll_rects) => [cdp_scroll_rect_type()],
  optional(:sticky_position_constraint) => cdp_sticky_position_constraint_type()
}

LayerTree.Layer

Information about a compositing layer.

Link to this type

cdp_paint_profile_type() View Source
cdp_paint_profile_type() :: [integer() | float()]

LayerTree.PaintProfile

Array of timings, one per paint step.

Link to this type

cdp_picture_tile_type() View Source
cdp_picture_tile_type() :: %{
  x: integer() | float(),
  y: integer() | float(),
  picture: String.t()
}

LayerTree.PictureTile

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

Link to this type

cdp_scroll_rect_type() View Source
cdp_scroll_rect_type() :: %{
  rect: Tungsten.CDP.DOM.cdp_rect_type(),
  type: :wheel_event_handler | :touch_event_handler | :repaints_on_scroll
}

LayerTree.ScrollRect

Rectangle where scrolling happens on the main thread.

Link to this type

cdp_snapshot_id_type() View Source
cdp_snapshot_id_type() :: String.t()

LayerTree.SnapshotId

Unique snapshot identifier.

Link to this type

cdp_sticky_position_constraint_type() View Source
cdp_sticky_position_constraint_type() :: %{
  :sticky_box_rect => Tungsten.CDP.DOM.cdp_rect_type(),
  :containing_block_rect => Tungsten.CDP.DOM.cdp_rect_type(),
  optional(:nearest_layer_shifting_sticky_box) => cdp_layer_id_type(),
  optional(:nearest_layer_shifting_containing_block) => cdp_layer_id_type()
}

LayerTree.StickyPositionConstraint

Sticky position constraints.

Link to this section Functions

Link to this function

compositing_reasons(session, parameters, options \\ []) View Source
compositing_reasons(
  GenServer.server(),
  %{layer_id: cdp_layer_id_type()},
  Tungsten.Connection.exec_options()
) :: {:ok, %{compositing_reasons: [String.t()]}} | {:error, term()}

LayerTree.compositingReasons

Provides the reasons why the given layer was composited.

Link to this function

disable(session, parameters \\ %{}, options \\ []) View Source
disable(GenServer.server(), map(), Tungsten.Connection.exec_options()) ::
  {:ok, map()} | {:error, term()}

LayerTree.disable

Disables compositing tree inspection.

Link to this function

enable(session, parameters \\ %{}, options \\ []) View Source
enable(GenServer.server(), map(), Tungsten.Connection.exec_options()) ::
  {:ok, map()} | {:error, term()}

LayerTree.enable

Enables compositing tree inspection.

Link to this function

load_snapshot(session, parameters, options \\ []) View Source
load_snapshot(
  GenServer.server(),
  %{tiles: [cdp_picture_tile_type()]},
  Tungsten.Connection.exec_options()
) :: {:ok, %{snapshot_id: cdp_snapshot_id_type()}} | {:error, term()}

LayerTree.loadSnapshot

Returns the snapshot identifier.

Link to this function

make_snapshot(session, parameters, options \\ []) View Source
make_snapshot(
  GenServer.server(),
  %{layer_id: cdp_layer_id_type()},
  Tungsten.Connection.exec_options()
) :: {:ok, %{snapshot_id: cdp_snapshot_id_type()}} | {:error, term()}

LayerTree.makeSnapshot

Returns the layer snapshot identifier.

Link to this function

profile_snapshot(session, parameters, options \\ []) View Source
profile_snapshot(
  GenServer.server(),
  %{
    :snapshot_id => cdp_snapshot_id_type(),
    optional(:min_repeat_count) => integer(),
    optional(:min_duration) => integer() | float(),
    optional(:clip_rect) => Tungsten.CDP.DOM.cdp_rect_type()
  },
  Tungsten.Connection.exec_options()
) :: {:ok, %{timings: [cdp_paint_profile_type()]}} | {:error, term()}

LayerTree.profileSnapshot

This command has no documentation

Link to this function

release_snapshot(session, parameters, options \\ []) View Source
release_snapshot(
  GenServer.server(),
  %{snapshot_id: cdp_snapshot_id_type()},
  Tungsten.Connection.exec_options()
) :: {:ok, map()} | {:error, term()}

LayerTree.releaseSnapshot

Releases layer snapshot captured by the back-end.

Link to this function

replay_snapshot(session, parameters, options \\ []) View Source
replay_snapshot(
  GenServer.server(),
  %{
    :snapshot_id => cdp_snapshot_id_type(),
    optional(:from_step) => integer(),
    optional(:to_step) => integer(),
    optional(:scale) => integer() | float()
  },
  Tungsten.Connection.exec_options()
) :: {:ok, %{data_url: String.t()}} | {:error, term()}

LayerTree.replaySnapshot

Replays the layer snapshot and returns the resulting bitmap.

Link to this function

snapshot_command_log(session, parameters, options \\ []) View Source
snapshot_command_log(
  GenServer.server(),
  %{snapshot_id: cdp_snapshot_id_type()},
  Tungsten.Connection.exec_options()
) :: {:ok, %{command_log: [map()]}} | {:error, term()}

LayerTree.snapshotCommandLog

Replays the layer snapshot and returns canvas log.