Skip to main content

CompositionDrawingSurface Class

Definition

Assembly:Avalonia.Base
Package:Avalonia
public class CompositionDrawingSurface

Inheritance: object -> CompositionObject -> CompositionSurface -> CompositionDrawingSurface

Implements: IDisposable

Methods

NameDescription
DisposeNo summary available.
UpdateAsyncUpdates the surface contents using an unspecified automatic means of synchronization provided by the underlying platform
UpdateWithKeyedMutexAsyncUpdates the surface contents using an imported memory image using a keyed mutex as the means of synchronization
UpdateWithSemaphoresAsyncUpdates the surface contents using an imported memory image using a semaphore pair as the means of synchronization
UpdateWithTimelineSemaphoresAsyncUpdates the surface contents using an imported memory image using a semaphore pair as the means of synchronization
StartAnimationConnects an animation with the specified property of the object and starts the animation. Inherited from CompositionObject.
StartAnimationGroupStarts an animation group. The StartAnimationGroup method on CompositionObject lets you start CompositionAnimationGroup. All the animations in the group will be started at the same time on the object. Inherited from CompositionObject.
StopAnimationDisconnects an animation from the specified property and stops the animation. Inherited from CompositionObject.
StopAnimationGroupStops an animation group. Inherited from CompositionObject.

Dispose Method

public void Dispose()

UpdateAsync Method

Updates the surface contents using an unspecified automatic means of synchronization provided by the underlying platform

public System.Threading.Tasks.Task UpdateAsync(Avalonia.Rendering.Composition.ICompositionImportedGpuImage image)

Parameters

image Avalonia.Rendering.Composition.ICompositionImportedGpuImage

GPU image with new surface contents

Returns

System.Threading.Tasks.Task

A task that completes when update operation is completed and user code is free to destroy or dispose the image

UpdateWithKeyedMutexAsync Method

Updates the surface contents using an imported memory image using a keyed mutex as the means of synchronization

public System.Threading.Tasks.Task UpdateWithKeyedMutexAsync(Avalonia.Rendering.Composition.ICompositionImportedGpuImage image, uint acquireIndex, uint releaseIndex)

Parameters

image Avalonia.Rendering.Composition.ICompositionImportedGpuImage

GPU image with new surface contents

acquireIndex uint

The mutex key to wait for before accessing the image

releaseIndex uint

The mutex key to release for after accessing the image

Returns

System.Threading.Tasks.Task

A task that completes when update operation is completed and user code is free to destroy or dispose the image

UpdateWithSemaphoresAsync Method

Updates the surface contents using an imported memory image using a semaphore pair as the means of synchronization

public System.Threading.Tasks.Task UpdateWithSemaphoresAsync(Avalonia.Rendering.Composition.ICompositionImportedGpuImage image, Avalonia.Rendering.Composition.ICompositionImportedGpuSemaphore waitForSemaphore, Avalonia.Rendering.Composition.ICompositionImportedGpuSemaphore signalSemaphore)

Parameters

image Avalonia.Rendering.Composition.ICompositionImportedGpuImage

GPU image with new surface contents

waitForSemaphore Avalonia.Rendering.Composition.ICompositionImportedGpuSemaphore

The semaphore to wait for before accessing the image

signalSemaphore Avalonia.Rendering.Composition.ICompositionImportedGpuSemaphore

The semaphore to signal after accessing the image

Returns

System.Threading.Tasks.Task

A task that completes when update operation is completed and user code is free to destroy or dispose the image

UpdateWithTimelineSemaphoresAsync Method

Updates the surface contents using an imported memory image using a semaphore pair as the means of synchronization

public System.Threading.Tasks.Task UpdateWithTimelineSemaphoresAsync(Avalonia.Rendering.Composition.ICompositionImportedGpuImage image, Avalonia.Rendering.Composition.ICompositionImportedGpuSemaphore waitForSemaphore, ulong waitForValue, Avalonia.Rendering.Composition.ICompositionImportedGpuSemaphore signalSemaphore, ulong signalValue)

Parameters

image Avalonia.Rendering.Composition.ICompositionImportedGpuImage

GPU image with new surface contents

waitForSemaphore Avalonia.Rendering.Composition.ICompositionImportedGpuSemaphore

The semaphore to wait for before accessing the image

waitForValue ulong

The value to wait for before accessing the image

signalSemaphore Avalonia.Rendering.Composition.ICompositionImportedGpuSemaphore

The semaphore to signal after accessing the image

signalValue ulong

The value to signal after accessing the image

Returns

System.Threading.Tasks.Task

A task that completes when update operation is completed and user code is free to destroy or dispose the image

Properties

NameDescription
CompositorThe associated Compositor Inherited from CompositionObject.
ImplicitAnimationsThe collection of implicit animations attached to this object. Inherited from CompositionObject.
IsDisposedInherited from CompositionObject.