opsig

package
v1.17.13 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package opsig makes signatures of drawing operations: a 64-bit number that is the same for two operations that draw the same pixels under the same state, so that the damage tracker can tell that a picture that was recorded again draws what the picture before it drew (SPEC §9.1, "Damage"). A signature is made of the contents of the operation: its geometry, its paint with the contents of the paint's gradient and filters, a path by its fingerprint, a paragraph by what it draws. What has no cheap contents is taken by its identity (the pixels of an image, a Vertices, a shader of an unknown kind): the signature then holds an address, and means something only while the object is alive, which it is for as long as the picture that draws it is kept.

Two different operations have the same signature with the probability of a collision of a 64-bit hash, which the damage tracker accepts for its tiles already.

Flutter: no counterpart (DisplayList::Equals, which flutter::DiffContext compares the display lists of two layers with)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Op

func Op(op ui.DisplayOp) (uint64, bool)

Op returns the signature of an operation of a display list, and false for an operation that has none: a kind this package does not know, a paint with a shader or a filter that has no address, a paragraph that cannot draw itself. A picture and a paragraph are taken by what they draw.

Flutter: no counterpart

func Paragraph

func Paragraph(p *ui.Paragraph) (uint64, bool)

Paragraph returns the signature of what a paragraph draws as it is laid out now, at its own origin, and false for a paragraph that cannot draw itself or that draws something without a signature. A layout that is Signed is asked; any other is painted, which costs the length of its text.

Flutter: no counterpart

func Picture

func Picture(p *ui.Picture) (uint64, bool)

Picture returns the signature of everything a picture records, in order, and false when one of its operations has none. It reads every operation: the caller keeps the result for a picture it sees again.

Flutter: no counterpart

Types

type Draws

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

Draws makes the signature of the drawing of a paragraph from the draws that its painter emits, one after another. The zero value has no draws.

Flutter: no counterpart

func (*Draws) Add

func (d *Draws) Add(draw ui.ParagraphDraw)

Add adds a draw.

Flutter: no counterpart

func (*Draws) Sum

func (d *Draws) Sum() (uint64, bool)

Sum returns the signature of the draws added so far, and false when one of them has none.

Flutter: no counterpart

type Signed

type Signed interface {
	// PaintSignature is the signature of what PaintParagraph emits (Draws), and false
	// when something it emits has none.
	PaintSignature() (uint64, bool)
}

Signed is a paragraph layout that knows the signature of what it draws, without drawing it. The layout of the text engine is one (it keeps the signature until it is laid out again), and the frozen paragraph of the offscreen detacher.

Flutter: no counterpart

Jump to

Keyboard shortcuts

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