headlessexperimental

package
v0.17.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package headlessexperimental implements the HeadlessExperimental domain. This domain provides experimental commands only supported in headless mode.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(conn *rpcc.Conn) *domainClient

NewClient returns a client for the HeadlessExperimental domain with the connection set to conn.

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.
	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.
	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.

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.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL