Documentation
¶
Overview ¶
Package blursync keeps a surface's compositor blur in step with what its widget tree asks for: the blur region on the wire when the compositor offers blur, css.BlurUnavailable on the root when it does not. Windows, layer surfaces and popups all go through it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Surface ¶
type Surface interface {
// BlurAvailable reports whether the compositor blurs behind
// surfaces at all right now.
BlurAvailable() bool
// SetBlurRegion asks the compositor to blur behind rects
// (surface-local, logical pixels; none removes the effect), applying
// with the next commit.
SetBlurRegion(rects []render.Rect) error
}
Surface is the wire half of a blurred surface.
type Sync ¶
type Sync struct {
// contains filtered or unexported fields
}
Sync is one surface's blur state. Like the opaque region it is surface state, re-sent only when the shape changes. The zero value has sent nothing.
func (*Sync) Active ¶
Active reports whether the compositor blurs behind the surface: a region is out and non-empty.
func (*Sync) Update ¶
Update publishes shape's result while want holds and the compositor offers blur, nothing otherwise. While blur is wanted but not in effect root carries css.BlurUnavailable, so its style can turn opaque rather than show the unblurred desktop. Call it before the frame's damage drain, so a class flip repaints that very frame, and before the commit the region should ride on.