layertree

package
v0.0.0-...-076f285 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompositingReasonsCommand

type CompositingReasonsCommand struct {
	DestinationTargetID string

	LayerId LayerId `json:"layerId"` // The id of the layer for which we want to get the reasons it was composited.
	// contains filtered or unexported fields
}

func (*CompositingReasonsCommand) Initalize

func (c *CompositingReasonsCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*CompositingReasonsCommand) Respond

func (*CompositingReasonsCommand) RespondWithError

func (c *CompositingReasonsCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type CompositingReasonsCommandFn

type CompositingReasonsCommandFn struct {
	// contains filtered or unexported fields
}

func (*CompositingReasonsCommandFn) Load

func (*CompositingReasonsCommandFn) Store

type CompositingReasonsReturn

type CompositingReasonsReturn struct {
	CompositingReasons []string `json:"compositingReasons"` // A list of strings specifying reasons for the given layer to become composited.
}

type DisableCommand

type DisableCommand struct {
	DestinationTargetID string
	// contains filtered or unexported fields
}

func (*DisableCommand) Initalize

func (c *DisableCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*DisableCommand) Respond

func (c *DisableCommand) Respond()

func (*DisableCommand) RespondWithError

func (c *DisableCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type DisableCommandFn

type DisableCommandFn struct {
	// contains filtered or unexported fields
}

func (*DisableCommandFn) Load

func (a *DisableCommandFn) Load() func(DisableCommand)

func (*DisableCommandFn) Store

func (a *DisableCommandFn) Store(fn func(DisableCommand))

type DisableReturn

type DisableReturn struct {
}

type EnableCommand

type EnableCommand struct {
	DestinationTargetID string
	// contains filtered or unexported fields
}

func (*EnableCommand) Initalize

func (c *EnableCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*EnableCommand) Respond

func (c *EnableCommand) Respond()

func (*EnableCommand) RespondWithError

func (c *EnableCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type EnableCommandFn

type EnableCommandFn struct {
	// contains filtered or unexported fields
}

func (*EnableCommandFn) Load

func (a *EnableCommandFn) Load() func(EnableCommand)

func (*EnableCommandFn) Store

func (a *EnableCommandFn) Store(fn func(EnableCommand))

type EnableReturn

type EnableReturn struct {
}

type Layer

type Layer struct {
	LayerId       LayerId            `json:"layerId"`                 // The unique id for this layer.
	ParentLayerId *LayerId           `json:"parentLayerId,omitempty"` // The id of parent (not present for root).
	BackendNodeId *dom.BackendNodeId `json:"backendNodeId,omitempty"` // The backend id for the node associated with this layer.
	OffsetX       float64            `json:"offsetX"`                 // Offset from parent layer, X coordinate.
	OffsetY       float64            `json:"offsetY"`                 // Offset from parent layer, Y coordinate.
	Width         float64            `json:"width"`                   // Layer width.
	Height        float64            `json:"height"`                  // Layer height.
	Transform     *[]float64         `json:"transform,omitempty"`     // Transformation matrix for layer, default is identity matrix
	AnchorX       *float64           `json:"anchorX,omitempty"`       // Transform anchor point X, absent if no transform specified
	AnchorY       *float64           `json:"anchorY,omitempty"`       // Transform anchor point Y, absent if no transform specified
	AnchorZ       *float64           `json:"anchorZ,omitempty"`       // Transform anchor point Z, absent if no transform specified
	PaintCount    int64              `json:"paintCount"`              // Indicates how many time this layer has painted.
	DrawsContent  bool               `json:"drawsContent"`            // Indicates whether this layer hosts any content, rather than being used for transform/scrolling purposes only.
	Invisible     *bool              `json:"invisible,omitempty"`     // Set if layer is not visible.
	ScrollRects   *[]ScrollRect      `json:"scrollRects,omitempty"`   // Rectangles scrolling on main thread only.
}

type LayerId

type LayerId string

type LayerPaintedEvent

type LayerPaintedEvent struct {
	LayerId LayerId  `json:"layerId"` // The id of the painted layer.
	Clip    dom.Rect `json:"clip"`    // Clip rectangle.
}

type LayerTreeAgent

type LayerTreeAgent struct {
	// contains filtered or unexported fields
}

func NewAgent

func NewAgent(conn *shared.Connection) *LayerTreeAgent

func (*LayerTreeAgent) FireLayerPainted

func (agent *LayerTreeAgent) FireLayerPainted(event LayerPaintedEvent)

func (*LayerTreeAgent) FireLayerPaintedOnTarget

func (agent *LayerTreeAgent) FireLayerPaintedOnTarget(targetId string, event LayerPaintedEvent)

func (*LayerTreeAgent) FireLayerTreeDidChange

func (agent *LayerTreeAgent) FireLayerTreeDidChange(event LayerTreeDidChangeEvent)

Dispatchable Events

func (*LayerTreeAgent) FireLayerTreeDidChangeOnTarget

func (agent *LayerTreeAgent) FireLayerTreeDidChangeOnTarget(targetId string, event LayerTreeDidChangeEvent)

func (*LayerTreeAgent) Name

func (agent *LayerTreeAgent) Name() string

func (*LayerTreeAgent) ProcessCommand

func (agent *LayerTreeAgent) ProcessCommand(id int64, targetId string, funcName string, data *json.RawMessage)

func (*LayerTreeAgent) SetCompositingReasonsHandler

func (agent *LayerTreeAgent) SetCompositingReasonsHandler(handler func(CompositingReasonsCommand))

func (*LayerTreeAgent) SetDisableHandler

func (agent *LayerTreeAgent) SetDisableHandler(handler func(DisableCommand))

func (*LayerTreeAgent) SetEnableHandler

func (agent *LayerTreeAgent) SetEnableHandler(handler func(EnableCommand))

Commands Sent From Frontend

func (*LayerTreeAgent) SetLoadSnapshotHandler

func (agent *LayerTreeAgent) SetLoadSnapshotHandler(handler func(LoadSnapshotCommand))

func (*LayerTreeAgent) SetMakeSnapshotHandler

func (agent *LayerTreeAgent) SetMakeSnapshotHandler(handler func(MakeSnapshotCommand))

func (*LayerTreeAgent) SetProfileSnapshotHandler

func (agent *LayerTreeAgent) SetProfileSnapshotHandler(handler func(ProfileSnapshotCommand))

func (*LayerTreeAgent) SetReleaseSnapshotHandler

func (agent *LayerTreeAgent) SetReleaseSnapshotHandler(handler func(ReleaseSnapshotCommand))

func (*LayerTreeAgent) SetReplaySnapshotHandler

func (agent *LayerTreeAgent) SetReplaySnapshotHandler(handler func(ReplaySnapshotCommand))

func (*LayerTreeAgent) SetSnapshotCommandLogHandler

func (agent *LayerTreeAgent) SetSnapshotCommandLogHandler(handler func(SnapshotCommandLogCommand))

type LayerTreeDidChangeEvent

type LayerTreeDidChangeEvent struct {
	Layers *[]Layer `json:"layers,omitempty"` // Layer tree, absent if not in the comspositing mode.
}

type LoadSnapshotCommand

type LoadSnapshotCommand struct {
	DestinationTargetID string

	Tiles []PictureTile `json:"tiles"` // An array of tiles composing the snapshot.
	// contains filtered or unexported fields
}

func (*LoadSnapshotCommand) Initalize

func (c *LoadSnapshotCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*LoadSnapshotCommand) Respond

func (c *LoadSnapshotCommand) Respond(r *LoadSnapshotReturn)

func (*LoadSnapshotCommand) RespondWithError

func (c *LoadSnapshotCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type LoadSnapshotCommandFn

type LoadSnapshotCommandFn struct {
	// contains filtered or unexported fields
}

func (*LoadSnapshotCommandFn) Load

func (*LoadSnapshotCommandFn) Store

func (a *LoadSnapshotCommandFn) Store(fn func(LoadSnapshotCommand))

type LoadSnapshotReturn

type LoadSnapshotReturn struct {
	SnapshotId SnapshotId `json:"snapshotId"` // The id of the snapshot.
}

type MakeSnapshotCommand

type MakeSnapshotCommand struct {
	DestinationTargetID string

	LayerId LayerId `json:"layerId"` // The id of the layer.
	// contains filtered or unexported fields
}

func (*MakeSnapshotCommand) Initalize

func (c *MakeSnapshotCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*MakeSnapshotCommand) Respond

func (c *MakeSnapshotCommand) Respond(r *MakeSnapshotReturn)

func (*MakeSnapshotCommand) RespondWithError

func (c *MakeSnapshotCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type MakeSnapshotCommandFn

type MakeSnapshotCommandFn struct {
	// contains filtered or unexported fields
}

func (*MakeSnapshotCommandFn) Load

func (*MakeSnapshotCommandFn) Store

func (a *MakeSnapshotCommandFn) Store(fn func(MakeSnapshotCommand))

type MakeSnapshotReturn

type MakeSnapshotReturn struct {
	SnapshotId SnapshotId `json:"snapshotId"` // The id of the layer snapshot.
}

type PaintProfile

type PaintProfile []float64

type PictureTile

type PictureTile struct {
	X       float64 `json:"x"`       // Offset from owning layer left boundary
	Y       float64 `json:"y"`       // Offset from owning layer top boundary
	Picture string  `json:"picture"` // Base64-encoded snapshot data.
}

type ProfileSnapshotCommand

type ProfileSnapshotCommand struct {
	DestinationTargetID string

	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.
	// contains filtered or unexported fields
}

func (*ProfileSnapshotCommand) Initalize

func (c *ProfileSnapshotCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*ProfileSnapshotCommand) Respond

func (*ProfileSnapshotCommand) RespondWithError

func (c *ProfileSnapshotCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type ProfileSnapshotCommandFn

type ProfileSnapshotCommandFn struct {
	// contains filtered or unexported fields
}

func (*ProfileSnapshotCommandFn) Load

func (*ProfileSnapshotCommandFn) Store

type ProfileSnapshotReturn

type ProfileSnapshotReturn struct {
	Timings []PaintProfile `json:"timings"` // The array of paint profiles, one per run.
}

type ReleaseSnapshotCommand

type ReleaseSnapshotCommand struct {
	DestinationTargetID string

	SnapshotId SnapshotId `json:"snapshotId"` // The id of the layer snapshot.
	// contains filtered or unexported fields
}

func (*ReleaseSnapshotCommand) Initalize

func (c *ReleaseSnapshotCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*ReleaseSnapshotCommand) Respond

func (c *ReleaseSnapshotCommand) Respond()

func (*ReleaseSnapshotCommand) RespondWithError

func (c *ReleaseSnapshotCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type ReleaseSnapshotCommandFn

type ReleaseSnapshotCommandFn struct {
	// contains filtered or unexported fields
}

func (*ReleaseSnapshotCommandFn) Load

func (*ReleaseSnapshotCommandFn) Store

type ReleaseSnapshotReturn

type ReleaseSnapshotReturn struct {
}

type ReplaySnapshotCommand

type ReplaySnapshotCommand struct {
	DestinationTargetID string

	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).
	// contains filtered or unexported fields
}

func (*ReplaySnapshotCommand) Initalize

func (c *ReplaySnapshotCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*ReplaySnapshotCommand) Respond

func (*ReplaySnapshotCommand) RespondWithError

func (c *ReplaySnapshotCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type ReplaySnapshotCommandFn

type ReplaySnapshotCommandFn struct {
	// contains filtered or unexported fields
}

func (*ReplaySnapshotCommandFn) Load

func (*ReplaySnapshotCommandFn) Store

type ReplaySnapshotReturn

type ReplaySnapshotReturn struct {
	DataURL string `json:"dataURL"` // A data: URL for resulting image.
}

type ScrollRect

type ScrollRect struct {
	Rect dom.Rect           `json:"rect"` // Rectangle itself.
	Type ScrollRectTypeEnum `json:"type"` // Reason for rectangle to force scrolling on the main thread
}

type ScrollRectTypeEnum

type ScrollRectTypeEnum string
const (
	ScrollRectTypeRepaintsOnScroll  ScrollRectTypeEnum = "RepaintsOnScroll"
	ScrollRectTypeTouchEventHandler ScrollRectTypeEnum = "TouchEventHandler"
	ScrollRectTypeWheelEventHandler ScrollRectTypeEnum = "WheelEventHandler"
)

type SnapshotCommandLogCommand

type SnapshotCommandLogCommand struct {
	DestinationTargetID string

	SnapshotId SnapshotId `json:"snapshotId"` // The id of the layer snapshot.
	// contains filtered or unexported fields
}

func (*SnapshotCommandLogCommand) Initalize

func (c *SnapshotCommandLogCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*SnapshotCommandLogCommand) Respond

func (*SnapshotCommandLogCommand) RespondWithError

func (c *SnapshotCommandLogCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type SnapshotCommandLogCommandFn

type SnapshotCommandLogCommandFn struct {
	// contains filtered or unexported fields
}

func (*SnapshotCommandLogCommandFn) Load

func (*SnapshotCommandLogCommandFn) Store

type SnapshotCommandLogReturn

type SnapshotCommandLogReturn struct {
	CommandLog []map[string]string `json:"commandLog"` // The array of canvas function calls.
}

type SnapshotId

type SnapshotId string

Jump to

Keyboard shortcuts

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