Interface ILayerTree
[Experimental("BIDICDP001")]
public interface ILayerTree
Properties
LayerPainted
IEventSource<LayerPaintedEventArgs> LayerPainted { get; }
Property Value
- IEventSource<LayerPaintedEventArgs>
Remarks
Event args (LayerPaintedEventArgs):
- LayerId - The id of the painted layer.
- Clip - Clip rectangle.
LayerTreeDidChange
IEventSource<LayerTreeDidChangeEventArgs> LayerTreeDidChange { get; }
Property Value
- IEventSource<LayerTreeDidChangeEventArgs>
Remarks
Event args (LayerTreeDidChangeEventArgs):
- Layers - Layer tree, absent if not in the compositing mode.
Methods
CompositingReasonsAsync(LayerId, string?, CancellationToken)
Provides the reasons why the given layer was composited.
Task<CompositingReasonsResult> CompositingReasonsAsync(LayerId layerId, string? session = null, CancellationToken cancellationToken = default)
Parameters
layerIdLayerIdThe id of the layer for which we want to get the reasons it was composited.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<CompositingReasonsResult>
A task representing the asynchronous operation, containing a CompositingReasonsResult.
DisableAsync(string?, CancellationToken)
Disables compositing tree inspection.
Task<DisableResult> DisableAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<DisableResult>
A task representing the asynchronous operation, containing a DisableResult.
EnableAsync(string?, CancellationToken)
Enables compositing tree inspection.
Task<EnableResult> EnableAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<EnableResult>
A task representing the asynchronous operation, containing a EnableResult.
LoadSnapshotAsync(ImmutableArray<PictureTile>, string?, CancellationToken)
Returns the snapshot identifier.
Task<LoadSnapshotResult> LoadSnapshotAsync(ImmutableArray<PictureTile> tiles, string? session = null, CancellationToken cancellationToken = default)
Parameters
tilesImmutableArray<PictureTile>An array of tiles composing the snapshot.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<LoadSnapshotResult>
A task representing the asynchronous operation, containing a LoadSnapshotResult.
MakeSnapshotAsync(LayerId, string?, CancellationToken)
Returns the layer snapshot identifier.
Task<MakeSnapshotResult> MakeSnapshotAsync(LayerId layerId, string? session = null, CancellationToken cancellationToken = default)
Parameters
layerIdLayerIdThe id of the layer.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<MakeSnapshotResult>
A task representing the asynchronous operation, containing a MakeSnapshotResult.
ProfileSnapshotAsync(SnapshotId, long?, double?, Rect?, string?, CancellationToken)
Task<ProfileSnapshotResult> ProfileSnapshotAsync(SnapshotId snapshotId, long? minRepeatCount = null, double? minDuration = null, Rect? clipRect = null, string? session = null, CancellationToken cancellationToken = default)
Parameters
snapshotIdSnapshotIdThe id of the layer snapshot.
minRepeatCountlong?The maximum number of times to replay the snapshot (1, if not specified).
minDurationdouble?The minimum duration (in seconds) to replay the snapshot.
clipRectRectThe clip rectangle to apply when replaying the snapshot.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<ProfileSnapshotResult>
A task representing the asynchronous operation, containing a ProfileSnapshotResult.
ReleaseSnapshotAsync(SnapshotId, string?, CancellationToken)
Releases layer snapshot captured by the back-end.
Task<ReleaseSnapshotResult> ReleaseSnapshotAsync(SnapshotId snapshotId, string? session = null, CancellationToken cancellationToken = default)
Parameters
snapshotIdSnapshotIdThe id of the layer snapshot.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<ReleaseSnapshotResult>
A task representing the asynchronous operation, containing a ReleaseSnapshotResult.
ReplaySnapshotAsync(SnapshotId, long?, long?, double?, string?, CancellationToken)
Replays the layer snapshot and returns the resulting bitmap.
Task<ReplaySnapshotResult> ReplaySnapshotAsync(SnapshotId snapshotId, long? fromStep = null, long? toStep = null, double? scale = null, string? session = null, CancellationToken cancellationToken = default)
Parameters
snapshotIdSnapshotIdThe id of the layer snapshot.
fromSteplong?The first step to replay from (replay from the very start if not specified).
toSteplong?The last step to replay to (replay till the end if not specified).
scaledouble?The scale to apply while replaying (defaults to 1).
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<ReplaySnapshotResult>
A task representing the asynchronous operation, containing a ReplaySnapshotResult.
SnapshotCommandLogAsync(SnapshotId, string?, CancellationToken)
Replays the layer snapshot and returns canvas log.
Task<SnapshotCommandLogResult> SnapshotCommandLogAsync(SnapshotId snapshotId, string? session = null, CancellationToken cancellationToken = default)
Parameters
snapshotIdSnapshotIdThe id of the layer snapshot.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<SnapshotCommandLogResult>
A task representing the asynchronous operation, containing a SnapshotCommandLogResult.