Class LayerTreeImpl

java.lang.Object
io.webfolder.cdp.command.LayerTreeImpl
All Implemented Interfaces:
LayerTree

public class LayerTreeImpl
extends java.lang.Object
implements LayerTree
  • Constructor Summary

    Constructors 
    Constructor Description
    LayerTreeImpl​(SessionInvocationHandler handler)  
  • Method Summary

    Modifier and Type Method Description
    java.util.List<java.lang.String> compositingReasons​(java.lang.String layerId)
    Provides the reasons why the given layer was composited.
    void disable()
    Disables compositing tree inspection.
    void enable()
    Enables compositing tree inspection.
    java.lang.String loadSnapshot​(java.util.List<PictureTile> tiles)
    Returns the snapshot identifier.
    java.lang.String makeSnapshot​(java.lang.String layerId)
    Returns the layer snapshot identifier.
    java.util.List<java.lang.Double> profileSnapshot​(java.lang.String snapshotId)  
    java.util.List<java.lang.Double> profileSnapshot​(java.lang.String snapshotId, java.lang.Integer minRepeatCount, java.lang.Double minDuration, Rect clipRect)  
    void releaseSnapshot​(java.lang.String snapshotId)
    Releases layer snapshot captured by the back-end.
    java.lang.String replaySnapshot​(java.lang.String snapshotId)
    Replays the layer snapshot and returns the resulting bitmap.
    java.lang.String replaySnapshot​(java.lang.String snapshotId, java.lang.Integer fromStep, java.lang.Integer toStep, java.lang.Double scale)
    Replays the layer snapshot and returns the resulting bitmap.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • compositingReasons

      public java.util.List<java.lang.String> compositingReasons​(java.lang.String layerId)
      Description copied from interface: LayerTree
      Provides the reasons why the given layer was composited.
      Specified by:
      compositingReasons in interface LayerTree
      Parameters:
      layerId - The id of the layer for which we want to get the reasons it was composited.
      Returns:
      A list of strings specifying reasons for the given layer to become composited.
    • disable

      public void disable()
      Description copied from interface: LayerTree
      Disables compositing tree inspection.
      Specified by:
      disable in interface LayerTree
    • enable

      public void enable()
      Description copied from interface: LayerTree
      Enables compositing tree inspection.
      Specified by:
      enable in interface LayerTree
    • loadSnapshot

      public java.lang.String loadSnapshot​(java.util.List<PictureTile> tiles)
      Description copied from interface: LayerTree
      Returns the snapshot identifier.
      Specified by:
      loadSnapshot in interface LayerTree
      Parameters:
      tiles - An array of tiles composing the snapshot.
      Returns:
      The id of the snapshot.
    • makeSnapshot

      public java.lang.String makeSnapshot​(java.lang.String layerId)
      Description copied from interface: LayerTree
      Returns the layer snapshot identifier.
      Specified by:
      makeSnapshot in interface LayerTree
      Parameters:
      layerId - The id of the layer.
      Returns:
      The id of the layer snapshot.
    • profileSnapshot

      public java.util.List<java.lang.Double> profileSnapshot​(java.lang.String snapshotId, java.lang.Integer minRepeatCount, java.lang.Double minDuration, Rect clipRect)
      Specified by:
      profileSnapshot in interface LayerTree
    • releaseSnapshot

      public void releaseSnapshot​(java.lang.String snapshotId)
      Description copied from interface: LayerTree
      Releases layer snapshot captured by the back-end.
      Specified by:
      releaseSnapshot in interface LayerTree
      Parameters:
      snapshotId - The id of the layer snapshot.
    • replaySnapshot

      public java.lang.String replaySnapshot​(java.lang.String snapshotId, java.lang.Integer fromStep, java.lang.Integer toStep, java.lang.Double scale)
      Description copied from interface: LayerTree
      Replays the layer snapshot and returns the resulting bitmap.
      Specified by:
      replaySnapshot in interface LayerTree
      Parameters:
      snapshotId - The id of the layer snapshot.
      fromStep - The first step to replay from (replay from the very start if not specified).
      toStep - The last step to replay to (replay till the end if not specified).
      scale - The scale to apply while replaying (defaults to 1).
      Returns:
      A data: URL for resulting image.
    • profileSnapshot

      public java.util.List<java.lang.Double> profileSnapshot​(java.lang.String snapshotId)
      Specified by:
      profileSnapshot in interface LayerTree
    • replaySnapshot

      public java.lang.String replaySnapshot​(java.lang.String snapshotId)
      Description copied from interface: LayerTree
      Replays the layer snapshot and returns the resulting bitmap.
      Specified by:
      replaySnapshot in interface LayerTree
      Parameters:
      snapshotId - The id of the layer snapshot.
      Returns:
      A data: URL for resulting image.