// Package layertree provides the Chrome DevTools Protocol// commands, types, and events for the LayerTree domain.//// Generated by the cdproto-gen command.
package layertree// Code generated by cdproto-gen. DO NOT EDIT.import ()// CompositingReasonsParams provides the reasons why the given layer was// composited.typeCompositingReasonsParamsstruct { LayerID LayerID`json:"layerId"`// The id of the layer for which we want to get the reasons it was composited.}// CompositingReasons provides the reasons why the given layer was// composited.//// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-compositingReasons//// parameters://// layerID - The id of the layer for which we want to get the reasons it was composited.func ( LayerID) *CompositingReasonsParams {return &CompositingReasonsParams{LayerID: , }}// CompositingReasonsReturns return values.typeCompositingReasonsReturnsstruct { CompositingReasons []string`json:"compositingReasons,omitempty"`// A list of strings specifying reasons for the given layer to become composited. CompositingReasonIDs []string`json:"compositingReasonIds,omitempty"`// A list of strings specifying reason IDs for the given layer to become composited.}// Do executes LayerTree.compositingReasons against the provided context.//// returns://// compositingReasons - A list of strings specifying reasons for the given layer to become composited.// compositingReasonIDs - A list of strings specifying reason IDs for the given layer to become composited.func ( *CompositingReasonsParams) ( context.Context) ( []string, []string, error) {// executevarCompositingReasonsReturns = cdp.Execute(, CommandCompositingReasons, , &)if != nil {returnnil, nil, }return .CompositingReasons, .CompositingReasonIDs, nil}// DisableParams disables compositing tree inspection.typeDisableParamsstruct{}// Disable disables compositing tree inspection.//// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-disablefunc () *DisableParams {return &DisableParams{}}// Do executes LayerTree.disable against the provided context.func ( *DisableParams) ( context.Context) ( error) {returncdp.Execute(, CommandDisable, nil, nil)}// EnableParams enables compositing tree inspection.typeEnableParamsstruct{}// Enable enables compositing tree inspection.//// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-enablefunc () *EnableParams {return &EnableParams{}}// Do executes LayerTree.enable against the provided context.func ( *EnableParams) ( context.Context) ( error) {returncdp.Execute(, CommandEnable, nil, nil)}// LoadSnapshotParams returns the snapshot identifier.typeLoadSnapshotParamsstruct { Tiles []*PictureTile`json:"tiles"`// An array of tiles composing the snapshot.}// LoadSnapshot returns the snapshot identifier.//// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-loadSnapshot//// parameters://// tiles - An array of tiles composing the snapshot.func ( []*PictureTile) *LoadSnapshotParams {return &LoadSnapshotParams{Tiles: , }}// LoadSnapshotReturns return values.typeLoadSnapshotReturnsstruct { SnapshotID SnapshotID`json:"snapshotId,omitempty"`// The id of the snapshot.}// Do executes LayerTree.loadSnapshot against the provided context.//// returns://// snapshotID - The id of the snapshot.func ( *LoadSnapshotParams) ( context.Context) ( SnapshotID, error) {// executevarLoadSnapshotReturns = cdp.Execute(, CommandLoadSnapshot, , &)if != nil {return"", }return .SnapshotID, nil}// MakeSnapshotParams returns the layer snapshot identifier.typeMakeSnapshotParamsstruct { LayerID LayerID`json:"layerId"`// The id of the layer.}// MakeSnapshot returns the layer snapshot identifier.//// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-makeSnapshot//// parameters://// layerID - The id of the layer.func ( LayerID) *MakeSnapshotParams {return &MakeSnapshotParams{LayerID: , }}// MakeSnapshotReturns return values.typeMakeSnapshotReturnsstruct { SnapshotID SnapshotID`json:"snapshotId,omitempty"`// The id of the layer snapshot.}// Do executes LayerTree.makeSnapshot against the provided context.//// returns://// snapshotID - The id of the layer snapshot.func ( *MakeSnapshotParams) ( context.Context) ( SnapshotID, error) {// executevarMakeSnapshotReturns = cdp.Execute(, CommandMakeSnapshot, , &)if != nil {return"", }return .SnapshotID, nil}// ProfileSnapshotParams [no description].typeProfileSnapshotParamsstruct { SnapshotID SnapshotID`json:"snapshotId"`// The id of the layer snapshot. MinRepeatCount int64`json:"minRepeatCount,omitempty"`// The maximum number of times to replay the snapshot (1, if not specified). MinDuration float64`json:"minDuration,omitempty"`// The minimum duration (in seconds) to replay the snapshot. ClipRect *dom.Rect`json:"clipRect,omitempty"`// The clip rectangle to apply when replaying the snapshot.}// ProfileSnapshot [no description].//// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-profileSnapshot//// parameters://// snapshotID - The id of the layer snapshot.func ( SnapshotID) *ProfileSnapshotParams {return &ProfileSnapshotParams{SnapshotID: , }}// WithMinRepeatCount the maximum number of times to replay the snapshot (1,// if not specified).func ( ProfileSnapshotParams) ( int64) *ProfileSnapshotParams { .MinRepeatCount = return &}// WithMinDuration the minimum duration (in seconds) to replay the snapshot.func ( ProfileSnapshotParams) ( float64) *ProfileSnapshotParams { .MinDuration = return &}// WithClipRect the clip rectangle to apply when replaying the snapshot.func ( ProfileSnapshotParams) ( *dom.Rect) *ProfileSnapshotParams { .ClipRect = return &}// ProfileSnapshotReturns return values.typeProfileSnapshotReturnsstruct { Timings []PaintProfile`json:"timings,omitempty"`// The array of paint profiles, one per run.}// Do executes LayerTree.profileSnapshot against the provided context.//// returns://// timings - The array of paint profiles, one per run.func ( *ProfileSnapshotParams) ( context.Context) ( []PaintProfile, error) {// executevarProfileSnapshotReturns = cdp.Execute(, CommandProfileSnapshot, , &)if != nil {returnnil, }return .Timings, nil}// ReleaseSnapshotParams releases layer snapshot captured by the back-end.typeReleaseSnapshotParamsstruct { SnapshotID SnapshotID`json:"snapshotId"`// The id of the layer snapshot.}// ReleaseSnapshot releases layer snapshot captured by the back-end.//// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-releaseSnapshot//// parameters://// snapshotID - The id of the layer snapshot.func ( SnapshotID) *ReleaseSnapshotParams {return &ReleaseSnapshotParams{SnapshotID: , }}// Do executes LayerTree.releaseSnapshot against the provided context.func ( *ReleaseSnapshotParams) ( context.Context) ( error) {returncdp.Execute(, CommandReleaseSnapshot, , nil)}// ReplaySnapshotParams replays the layer snapshot and returns the resulting// bitmap.typeReplaySnapshotParamsstruct { SnapshotID SnapshotID`json:"snapshotId"`// The id of the layer snapshot. FromStep int64`json:"fromStep,omitempty"`// The first step to replay from (replay from the very start if not specified). ToStep int64`json:"toStep,omitempty"`// The last step to replay to (replay till the end if not specified). Scale float64`json:"scale,omitempty"`// The scale to apply while replaying (defaults to 1).}// ReplaySnapshot replays the layer snapshot and returns the resulting// bitmap.//// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-replaySnapshot//// parameters://// snapshotID - The id of the layer snapshot.func ( SnapshotID) *ReplaySnapshotParams {return &ReplaySnapshotParams{SnapshotID: , }}// WithFromStep the first step to replay from (replay from the very start if// not specified).func ( ReplaySnapshotParams) ( int64) *ReplaySnapshotParams { .FromStep = return &}// WithToStep the last step to replay to (replay till the end if not// specified).func ( ReplaySnapshotParams) ( int64) *ReplaySnapshotParams { .ToStep = return &}// WithScale the scale to apply while replaying (defaults to 1).func ( ReplaySnapshotParams) ( float64) *ReplaySnapshotParams { .Scale = return &}// ReplaySnapshotReturns return values.typeReplaySnapshotReturnsstruct { DataURL string`json:"dataURL,omitempty"`// A data: URL for resulting image.}// Do executes LayerTree.replaySnapshot against the provided context.//// returns://// dataURL - A data: URL for resulting image.func ( *ReplaySnapshotParams) ( context.Context) ( string, error) {// executevarReplaySnapshotReturns = cdp.Execute(, CommandReplaySnapshot, , &)if != nil {return"", }return .DataURL, nil}// SnapshotCommandLogParams replays the layer snapshot and returns canvas// log.typeSnapshotCommandLogParamsstruct { SnapshotID SnapshotID`json:"snapshotId"`// The id of the layer snapshot.}// SnapshotCommandLog replays the layer snapshot and returns canvas log.//// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-snapshotCommandLog//// parameters://// snapshotID - The id of the layer snapshot.func ( SnapshotID) *SnapshotCommandLogParams {return &SnapshotCommandLogParams{SnapshotID: , }}// SnapshotCommandLogReturns return values.typeSnapshotCommandLogReturnsstruct { CommandLog []easyjson.RawMessage`json:"commandLog,omitempty"`// The array of canvas function calls.}// Do executes LayerTree.snapshotCommandLog against the provided context.//// returns://// commandLog - The array of canvas function calls.func ( *SnapshotCommandLogParams) ( context.Context) ( []easyjson.RawMessage, error) {// executevarSnapshotCommandLogReturns = cdp.Execute(, CommandSnapshotCommandLog, , &)if != nil {returnnil, }return .CommandLog, nil}// Command names.const (CommandCompositingReasons = "LayerTree.compositingReasons"CommandDisable = "LayerTree.disable"CommandEnable = "LayerTree.enable"CommandLoadSnapshot = "LayerTree.loadSnapshot"CommandMakeSnapshot = "LayerTree.makeSnapshot"CommandProfileSnapshot = "LayerTree.profileSnapshot"CommandReleaseSnapshot = "LayerTree.releaseSnapshot"CommandReplaySnapshot = "LayerTree.replaySnapshot"CommandSnapshotCommandLog = "LayerTree.snapshotCommandLog")
The pages are generated with Goldsv0.8.2. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.