Documentation
¶
Overview ¶
Package screendelivery defines the manager's physical delivery boundary. Only its caller owns scene revisions, refresh timestamps and retry decisions.
Index ¶
- Variables
- type Cadence
- func (c *Cadence) Complete(now time.Time) time.Time
- func (c *Cadence) Configure(p refreshpolicy.Policy) error
- func (c *Cadence) ConfigurePartial(p refreshpolicy.Policy) error
- func (c *Cadence) Deadline(normal time.Time, o refreshpolicy.Options) time.Time
- func (c *Cadence) Enabled() bool
- func (c *Cadence) Ready(normal time.Time) Readiness
- func (c *Cadence) Reset()
- func (c *Cadence) Supports(caps screenwire.Capabilities) bool
- func (c *Cadence) Unknown(now, existing time.Time, legacy time.Duration) time.Time
- type Outcome
- type PolicySender
- type Readiness
- type RecoveringSender
- type RegionPlan
- type RegionPolicySender
- type RegionRules
- type RegionSender
- type Sender
Constants ¶
This section is empty.
Variables ¶
var ( ErrTransportLost = errors.New("screen transport lost; delivery requires reconciliation") ErrTransportResync = errors.New("screen transport requires a new full baseline") )
var ( ErrRegionInput = errors.New("screen region: incompatible frames or window rules") ErrRegionBudget = errors.New("screen region: damage exceeds partial budget") )
Functions ¶
This section is empty.
Types ¶
type Cadence ¶
type Cadence struct {
Policy refreshpolicy.Policy
Urgent time.Time
PartialPolicy refreshpolicy.Policy
// contains filtered or unexported fields
}
Cadence belongs to the single transport owner. Unknown completion receives the normal interval even for urgent callers; only a known ACK opens that lane.
func (*Cadence) ConfigurePartial ¶
func (c *Cadence) ConfigurePartial(p refreshpolicy.Policy) error
ConfigurePartial sets operator budgets before delivery starts. It does not establish peer capability or panel safety, and creates no early permission.
func (*Cadence) Reset ¶
func (c *Cadence) Reset()
Reset preserves configured policy but revokes every confirmed deadline. The transport must establish a conservative Unknown guard on reconnection.
func (*Cadence) Supports ¶
func (c *Cadence) Supports(caps screenwire.Capabilities) bool
Supports checks the complete configured contract before accepting a peer.
type Outcome ¶
type Outcome uint8
Outcome resolves only a previously ambiguous Send in the same caller.
type PolicySender ¶
type PolicySender interface {
Sender
ConfigureRefresh(refreshpolicy.Policy) error
SendWithOptions(context.Context, display.Frame, refreshpolicy.Options) error
}
PolicySender is configured once before its owner starts. Implementations require peer capability negotiation; they must never silently downgrade.
type Readiness ¶
type Readiness struct {
Pending Outcome
NotBefore time.Time
UrgentNotBefore time.Time // Zero means no distinct urgent permission.
PartialNotBefore time.Time // Zero means no distinct partial permission.
PartialUrgentNotBefore time.Time
}
Readiness carries a conservative physical refresh deadline.
type RecoveringSender ¶
type RecoveringSender interface {
Sender
Changed() <-chan struct{}
WaitReady(context.Context) (Readiness, error)
ResetSession()
}
RecoveringSender is serialized by one pump. Changed is a coalesced wake-up, not ownership transfer; WaitReady may reconcile but must never resend pixels.
type RegionPlan ¶
RegionPlan owns opaque old/new crops of one coherent final scene pair. Empty bounds mean pixel-equivalent frames and no physical update is needed.
func PlanRegion ¶
func PlanRegion(base, target display.Frame, rules RegionRules) (RegionPlan, error)
PlanRegion compares immutable final pixels, never independent DOM patches. Adapted from the project's renderdiff byte-row scan for EPS2's single window. Panel minimum dimensions expand the damage using unchanged pixels from the same snapshots, preserving backgrounds and the confirmed timestamp corner. Non-byte-width displays explicitly require a different adapter or full path.
func (RegionPlan) Wire ¶
func (p RegionPlan) Wire(base [32]byte, options refreshpolicy.Options, policy refreshpolicy.Policy) (screenwire.RegionBegin, error)
Wire binds final crops to the transport's confirmed transaction identity. Validate signed coordinates before narrowing them to the EPS2 u16 fields. Peer viewport/capability validation remains the screen client's responsibility.
type RegionPolicySender ¶
type RegionPolicySender interface {
PolicySender
RegionSender
ConfigurePartial(refreshpolicy.Policy) error
}
RegionPolicySender negotiates both full and partial operator policies before delivery starts. ConfigureRefresh must precede ConfigurePartial.
type RegionRules ¶
type RegionRules struct {
MinWidth, MinHeight, MaxBytes int
}
RegionRules comes from the selected adapter and operator policy, not HTML. Width is byte aligned. MaxBytes bounds each old/new packed plane allocation.
type RegionSender ¶
type RegionSender interface {
Sender
SendRegion(context.Context, RegionPlan, refreshpolicy.Options) error
}
RegionSender consumes immutable prepared crops under the same confirmed baseline as its last successful Send. It never silently performs a full update.