headlessexperimental

package
v0.18.6 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2018 License: MIT Imports: 3 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 {
	FrameTimeTicks   *float64          `json:"frameTimeTicks,omitempty"`   // Timestamp of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set, the current time will be used.
	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) 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.

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