Documentation ¶
Overview ¶
Package headlessexperimental implements the HeadlessExperimental domain. This domain provides experimental commands only supported in headless mode.
Index ¶
- func NewClient(conn *rpcc.Conn) *domainClient
- type BeginFrameArgs
- func (a *BeginFrameArgs) SetDeadline(deadline runtime.Timestamp) *BeginFrameArgs
- func (a *BeginFrameArgs) SetDeadlineTicks(deadlineTicks float64) *BeginFrameArgs
- func (a *BeginFrameArgs) SetFrameTime(frameTime runtime.Timestamp) *BeginFrameArgs
- func (a *BeginFrameArgs) SetFrameTimeTicks(frameTimeTicks float64) *BeginFrameArgs
- func (a *BeginFrameArgs) SetInterval(interval float64) *BeginFrameArgs
- func (a *BeginFrameArgs) SetNoDisplayUpdates(noDisplayUpdates bool) *BeginFrameArgs
- func (a *BeginFrameArgs) SetScreenshot(screenshot ScreenshotParams) *BeginFrameArgs
- type BeginFrameReply
- type EnterDeterministicModeArgs
- type NeedsBeginFramesChangedClient
- type NeedsBeginFramesChangedReply
- type ScreenshotParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BeginFrameArgs ¶
type BeginFrameArgs struct { FrameTime *runtime.Timestamp `json:"frameTime,omitempty"` // Timestamp of this BeginFrame (milliseconds since epoch). If not set, the current time will be used unless frameTicks is specified. FrameTimeTicks *float64 `json:"frameTimeTicks,omitempty"` // Timestamp of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set, the current time will be used unless frameTime is specified. Deadline *runtime.Timestamp `json:"deadline,omitempty"` // Deadline of this BeginFrame (milliseconds since epoch). If not set, the deadline will be calculated from the frameTime and interval unless deadlineTicks is specified. DeadlineTicks *float64 `json:"deadlineTicks,omitempty"` // Deadline of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set, the deadline will be calculated from the frameTime and interval unless deadline is specified. Interval *float64 `json:"interval,omitempty"` // The interval between BeginFrames that is reported to the compositor, in milliseconds. Defaults to a 60 frames/second interval, i.e. about 16.666 milliseconds. NoDisplayUpdates *bool `json:"noDisplayUpdates,omitempty"` // Whether updates should not be committed and drawn onto the display. False by default. If true, only side effects of the BeginFrame will be run, such as layout and animations, but any visual updates may not be visible on the display or in screenshots. Screenshot *ScreenshotParams `json:"screenshot,omitempty"` // If set, a screenshot of the frame will be captured and returned in the response. Otherwise, no screenshot will be captured. Note that capturing a screenshot can fail, for example, during renderer initialization. In such a case, no screenshot data will be returned. }
BeginFrameArgs represents the arguments for BeginFrame in the HeadlessExperimental domain.
func NewBeginFrameArgs ¶
func NewBeginFrameArgs() *BeginFrameArgs
NewBeginFrameArgs initializes BeginFrameArgs with the required arguments.
func (*BeginFrameArgs) SetDeadline ¶
func (a *BeginFrameArgs) SetDeadline(deadline runtime.Timestamp) *BeginFrameArgs
SetDeadline sets the Deadline optional argument. Deadline of this BeginFrame (milliseconds since epoch). If not set, the deadline will be calculated from the frameTime and interval unless deadlineTicks is specified.
func (*BeginFrameArgs) SetDeadlineTicks ¶ added in v0.17.4
func (a *BeginFrameArgs) SetDeadlineTicks(deadlineTicks float64) *BeginFrameArgs
SetDeadlineTicks sets the DeadlineTicks optional argument. Deadline of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set, the deadline will be calculated from the frameTime and interval unless deadline is specified.
func (*BeginFrameArgs) SetFrameTime ¶
func (a *BeginFrameArgs) SetFrameTime(frameTime runtime.Timestamp) *BeginFrameArgs
SetFrameTime sets the FrameTime optional argument. Timestamp of this BeginFrame (milliseconds since epoch). If not set, the current time will be used unless frameTicks is specified.
func (*BeginFrameArgs) SetFrameTimeTicks ¶ added in v0.17.4
func (a *BeginFrameArgs) SetFrameTimeTicks(frameTimeTicks float64) *BeginFrameArgs
SetFrameTimeTicks sets the FrameTimeTicks optional argument. Timestamp of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set, the current time will be used unless frameTime is specified.
func (*BeginFrameArgs) SetInterval ¶
func (a *BeginFrameArgs) SetInterval(interval float64) *BeginFrameArgs
SetInterval sets the Interval optional argument. The interval between BeginFrames that is reported to the compositor, in milliseconds. Defaults to a 60 frames/second interval, i.e. about 16.666 milliseconds.
func (*BeginFrameArgs) SetNoDisplayUpdates ¶ added in v0.16.1
func (a *BeginFrameArgs) SetNoDisplayUpdates(noDisplayUpdates bool) *BeginFrameArgs
SetNoDisplayUpdates sets the NoDisplayUpdates optional argument. Whether updates should not be committed and drawn onto the display. False by default. If true, only side effects of the BeginFrame will be run, such as layout and animations, but any visual updates may not be visible on the display or in screenshots.
func (*BeginFrameArgs) SetScreenshot ¶
func (a *BeginFrameArgs) SetScreenshot(screenshot ScreenshotParams) *BeginFrameArgs
SetScreenshot sets the Screenshot optional argument. If set, a screenshot of the frame will be captured and returned in the response. Otherwise, no screenshot will be captured. Note that capturing a screenshot can fail, for example, during renderer initialization. In such a case, no screenshot data will be returned.
type BeginFrameReply ¶
type BeginFrameReply struct { HasDamage bool `json:"hasDamage"` // Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the display. Reported for diagnostic uses, may be removed in the future. ScreenshotData []byte `json:"screenshotData,omitempty"` // Base64-encoded image data of the screenshot, if one was requested and successfully taken. }
BeginFrameReply represents the return values for BeginFrame in the HeadlessExperimental domain.
type EnterDeterministicModeArgs ¶ added in v0.17.2
type EnterDeterministicModeArgs struct {
InitialDate *float64 `json:"initialDate,omitempty"` // Number of seconds since the Epoch
}
EnterDeterministicModeArgs represents the arguments for EnterDeterministicMode in the HeadlessExperimental domain.
func NewEnterDeterministicModeArgs ¶ added in v0.17.2
func NewEnterDeterministicModeArgs() *EnterDeterministicModeArgs
NewEnterDeterministicModeArgs initializes EnterDeterministicModeArgs with the required arguments.
func (*EnterDeterministicModeArgs) SetInitialDate ¶ added in v0.17.2
func (a *EnterDeterministicModeArgs) SetInitialDate(initialDate float64) *EnterDeterministicModeArgs
SetInitialDate sets the InitialDate optional argument. Number of seconds since the Epoch
type NeedsBeginFramesChangedClient ¶
type NeedsBeginFramesChangedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*NeedsBeginFramesChangedReply, error) rpcc.Stream }
NeedsBeginFramesChangedClient is a client for NeedsBeginFramesChanged events. Issued when the target starts or stops needing BeginFrames.
type NeedsBeginFramesChangedReply ¶
type NeedsBeginFramesChangedReply struct {
NeedsBeginFrames bool `json:"needsBeginFrames"` // True if BeginFrames are needed, false otherwise.
}
NeedsBeginFramesChangedReply is the reply for NeedsBeginFramesChanged events.
type ScreenshotParams ¶
type ScreenshotParams struct { // Format Image compression format (defaults to png). // // Values: "jpeg", "png". Format *string `json:"format,omitempty"` Quality *int `json:"quality,omitempty"` // Compression quality from range [0..100] (jpeg only). }
ScreenshotParams Encoding options for a screenshot.