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