Skip to main content

Module server

Module server 

Source
Expand description

The server (render thread) side of the composition renderer.

Re-exports§

pub use dirty_rects::DebugEventsDirtyRectCollectorProxy;
pub use dirty_rects::IDirtyRectCollector;
pub use dirty_rects::IDirtyRectTracker;
pub use dirty_rects::MultiDirtyRectTracker;
pub use dirty_rects::RegionDirtyRectTracker;
pub use dirty_rects::SingleDirtyRectTracker;
pub use super::brushes::ServerCompositionSimpleContentBrush;
pub use super::brushes::ServerCompositionSimpleImageBrush;
pub use super::brushes::ServerCompositionConicGradientBrush;
pub use super::brushes::ServerCompositionGradientBrush;
pub use super::brushes::ServerCompositionLinearGradientBrush;
pub use super::brushes::ServerCompositionRadialGradientBrush;
pub use super::brushes::ServerCompositionSolidColorBrush;
pub use server_object::IAnimatedServerObject;
pub use server_object::IServerObject;
pub use server_object::ServerExpressionObject;
pub use server_object::ServerObject;
pub use server_object::ServerObjectId;
pub use server_render_resource::IServerRenderResource;
pub use server_render_resource::IServerRenderResourceHost;
pub use server_render_resource::IServerRenderResourceObserver;
pub use server_render_resource::ServerRenderResource;
pub use server_render_resource::ServerRenderResourceCore;
pub use server_render_resource::SimpleServerRenderResource;

Modules§

dirty_rects
Dirty rectangle tracking for the server-side compositor.

Structs§

BatchQueue
The queue of committed batches: the one point where data passes from the UI-thread compositor to the server compositor.
CompositionProperty
The identity of a property of a server-side composition object: what animations, expressions and change notifications refer to.
CompositionPropertyOf
A CompositionProperty with typed access to its field (upstream CompositionProperty<T>).
CompositionTargetOverlays
The debug overlays of a composition target: the frame counter and the time graphs.
CompositorDrawingContextProxy
A drawing context that forwards to another one, postponing state changes until they are needed and applying an optional post transform.
CompositorLock
A lock that the thread holding it may enter again (lock in C#).
CompositorLockGuard
Leaves the lock when dropped.
CompositorPools
The object pools of a server compositor.
DiagnosticGlyphRun
A glyph run as needed by DiagnosticTextRenderer.
DiagnosticTextRenderer
A class used to render diagnostic strings (only!), with caching of ASCII glyph runs. Digits are laid out in equal-width cells so rapidly changing values do not make the text jump around.
DrawingSurfaceUpdateError
The error of an update that cannot proceed (InvalidOperationException).
FpsCounter
An FPS counter helper that can draw itself on the render thread. The labels are shaped once and the changing numbers are drawn in a fixed digit grid, so a frame neither formats nor measures any text.
FrameTimeGraph
Represents a simple time graph for diagnostics purpose, used to show layout and render times.
GlyphTypefaceDiagnosticGlyphRunSource
Builds the glyph runs of a DiagnosticTextRenderer from a glyph typeface and a font rendering em size, as the C# constructor does.
LockBound
A value confined to the compositor lock: an object of the server side that is not part of the graph of the server compositor.
LockedServerCompositor
The server compositor behind its lock.
ReadbackData
What the UI thread reads back from a server visual.
ReadbackIndices
A helper class used to manage the current slots for writing data from the render thread and reading it from the UI thread. Used mostly by hit-testing which needs to know the last transform of the visual
ReadbackWriteScope
A write in progress, started by ReadbackIndices::begin_write.
ServerCompositionBitmapCache
Server-side counterpart of CompositionBitmapCache.
ServerCompositionCacheMode
Server-side counterpart of CompositionBitmapCache.
ServerCompositionContainerVisual
The content of a plain container visual: nothing of its own.
ServerCompositionCustomVisual
The content of the server-side counterpart of a CompositionCustomVisual: a container visual that draws through its handler.
ServerCompositionDrawListVisual
Server-side counterpart of CompositionDrawListVisual.
ServerCompositionDrawingSurface
The server-side counterpart of a CompositionDrawingSurface: a surface whose content is a snapshot of an imported GPU image.
ServerCompositionExperimentalAcrylicVisual
Server-side counterpart of CompositionExperimentalAcrylicVisual: a draw list visual that draws an acrylic rectangle below its content.
ServerCompositionGradientStop
The server-side counterpart of a CompositionGradientStop.
ServerCompositionSimpleBrush
The server-side counterpart of a mutable brush: the properties all brushes share.
ServerCompositionSimpleConicGradientBrush
The server-side counterpart of a mutable conic gradient brush.
ServerCompositionSimpleGeometry
The server-side counterpart of a geometry object: the platform geometry the object currently resolves to.
ServerCompositionSimpleGradientBrush
The gradient part of the server-side gradient brushes: the brush properties, the stops and the spread method.
ServerCompositionSimpleLinearGradientBrush
The server-side counterpart of a mutable linear gradient brush.
ServerCompositionSimpleRadialGradientBrush
The server-side counterpart of a mutable radial gradient brush.
ServerCompositionSimpleSolidColorBrush
The server-side counterpart of a mutable solid color brush.
ServerCompositionSimpleTileBrush
The server-side counterpart of a mutable tile brush.
ServerCompositionSimpleTransform
The server-side counterpart of a mutable transform.
ServerCompositionSolidColorVisual
Server-side counterpart of CompositionSolidColorVisual.
ServerCompositionSurfaceChanged
The Changed delegate of a server-side surface: the callbacks of the visuals that show it.
ServerCompositionSurfaceVisual
Server-side counterpart of CompositionSurfaceVisual.
ServerCompositionTarget
Server-side counterpart of the CompositionTarget. That’s the place where we update visual transforms, track dirty rects and actually do rendering.
ServerCompositionVisual
Server-side CompositionVisual counterpart. Is responsible for computing the transformation matrix, for applying various visual properties before calling visual-specific drawing code and for notifying the ServerCompositionTarget for new dirty rects.
ServerCompositionVisualCache
The bitmap cache of a visual: an offscreen layer the subtree of the visual is rendered into, redrawn only where it changed.
ServerCompositionVisualCollection
Server-side counterpart of the children collection of a visual.
ServerCompositor
Server-side counterpart of the compositor: owns the server objects, applies the batches committed by the UI thread and renders.
ServerCompositorAnimations
The clock items and the dirty animated objects of a server compositor.
ServerExpressionObject
An animatable server object as an expression reads it: the target of an animation, or an object an animation refers to through a reference parameter (upstream passes the ServerObject itself, which implements IExpressionObject).
ServerList
A server-side list container capable of receiving changes from the UI thread. Right now it’s quite dumb since it always receives the full list.
ServerObject
Server-side CompositionObject counterpart. Is responsible for animation activation and invalidation.
ServerObjectAnimations
The animations of a server object and the animations of other objects that depend on its properties.
ServerObjectId
Identifies a server-side object within its server compositor.
ServerRenderResource
The base of the animatable server-side render resources (upstream ServerRenderResource, a ServerObject), as a part the resource classes embed: the animation support of the server object, the resource core and the handle of the object as a render resource.
ServerRenderResourceCore
The shared implementation of render resources: change coalescing and the reference-counted observer list.
ServerResourceRef
A reference-typed property value of a server object that may be a server-side render resource (a brush or a transform): the value as its media interface, and the render resource behind it when it is one.
ServerSizeDependantVisual
The behaviour of a visual whose content covers its size: the base of the solid color and surface visuals.
ServerValueChange
One assignment of a property field, in the form SetValue(prop, ref field, value) takes it upstream: the class decides what else happens around the assignment.
ServerVisualRenderContext
What a visual renders its own content with.
ShapedText
A piece of text shaped once by DiagnosticTextRenderer::shape.
SimpleServerRenderResource
The base of the server-side render resources that are not animatable (upstream SimpleServerRenderResource), as a part the resource classes embed: the compositor, the resource core and the handle of the object as a render resource.
StackPool
A pool of stacks, so that tree walks do not allocate.
TreeWalkerFrame
A position of the tree walk: a container and the index of its child to visit next.
VisualReadback
The two readback slots of a visual.

Traits§

AsServerRenderResource
The render resource behind a property value, when it is one.
IAnimatedServerObject
A server object that supports animated properties: what upstream’s abstract ServerObject is to its subclasses.
IDiagnosticGlyphRunSource
The seam between DiagnosticTextRenderer and the text stack.
IServerAnimatedPropertyHost
What the generated property block of an animatable server object needs from the object that embeds it (the animation members of upstream ServerObject).
IServerClockItem
Something the server compositor advances once per frame.
IServerCompositionSurface
Server-side counterpart of a composition surface: something that provides a bitmap to the surface visuals that show it.
IServerObject
The base contract of every server-side object (upstream SimpleServerObject).
IServerPropertyHost
What a generated server property block needs from the object that embeds it (upstream SimpleServerObject).
IServerRenderResource
A server-side render resource: a brush, pen, geometry, transform or render data whose changes invalidate the objects that use it.
IServerRenderResourceHost
A render resource that owns a ServerRenderResourceCore.
IServerRenderResourceObserver
Something that is notified when a render resource it depends on is invalidated.
IServerVisualContent
What a concrete server visual class adds to ServerCompositionVisual: its own properties and its overrides of the virtual members.
ServerPropertyValue
Equality of property values as the generated setters need it.

Functions§

props_of
The generated property block P embedded in a server object.
read_resource
Reads a resource reference from a batch and resolves it.
read_server_object
Reads a reference to a server object from a batch and resolves it.
resolve_resource
Resolves a resource reference read from a batch: a value is taken as it is, the id of a server object is looked up and viewed through cast.

Type Aliases§

CompositorClock
The source of the compositor clock: time elapsed since an arbitrary origin. It is read from both sides of the transport; like the server compositor it is confined to the compositor’s thread for now, because the dispatcher’s clock is.
RenderSurfaces
Returns the current platform surfaces of a composition target.