CompositionGraphicsDevice CompositionGraphicsDevice CompositionGraphicsDevice Class

Definition

Used to create all hardware bound resources for a given DirectX device on a compositor session. CompositionGraphicsDevice contains a DirectX device that is used to perform the GPU operations. Developers can obtain a Graphics device from the compositor top level object.

public : sealed class CompositionGraphicsDevice : CompositionObject, ICompositionGraphicsDevice, ICompositionGraphicsDevice2
public sealed class CompositionGraphicsDevice : CompositionObject, ICompositionGraphicsDevice, ICompositionGraphicsDevice2
Public NotInheritable Class CompositionGraphicsDevice Inherits CompositionObject Implements ICompositionGraphicsDevice, ICompositionGraphicsDevice2
Inheritance
CompositionGraphicsDeviceCompositionGraphicsDeviceCompositionGraphicsDevice
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Methods

Close Close Close

Closes the CompositionObject and releases system resources.

(Inherited from CompositionObject)

CreateDrawingSurface(Size, DirectXPixelFormat, DirectXAlphaMode) CreateDrawingSurface(Size, DirectXPixelFormat, DirectXAlphaMode) CreateDrawingSurface(Size, DirectXPixelFormat, DirectXAlphaMode)

Creates an instance of CompositionDrawingSurface.

public : CompositionDrawingSurface CreateDrawingSurface(Size sizePixels, DirectXPixelFormat pixelFormat, DirectXAlphaMode alphaMode)
public CompositionDrawingSurface CreateDrawingSurface(Size sizePixels, DirectXPixelFormat pixelFormat, DirectXAlphaMode alphaMode)
Public Function CreateDrawingSurface(sizePixels As Size, pixelFormat As DirectXPixelFormat, alphaMode As DirectXAlphaMode) As CompositionDrawingSurface
Parameters
sizePixels
Size Size Size

The size in pixels of the surface.

pixelFormat
DirectXPixelFormat DirectXPixelFormat DirectXPixelFormat

The pixel format of the surface.

alphaMode
DirectXAlphaMode DirectXAlphaMode DirectXAlphaMode

How the alpha channel should be handled.

Returns
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)

CreateDrawingSurface2(SizeInt32, DirectXPixelFormat, DirectXAlphaMode) CreateDrawingSurface2(SizeInt32, DirectXPixelFormat, DirectXAlphaMode) CreateDrawingSurface2(SizeInt32, DirectXPixelFormat, DirectXAlphaMode)

Creates an instance of CompositionDrawingSurface.

public : CompositionDrawingSurface CreateDrawingSurface2(SizeInt32 sizePixels, DirectXPixelFormat pixelFormat, DirectXAlphaMode alphaMode)
public CompositionDrawingSurface CreateDrawingSurface2(SizeInt32 sizePixels, DirectXPixelFormat pixelFormat, DirectXAlphaMode alphaMode)
Public Function CreateDrawingSurface2(sizePixels As SizeInt32, pixelFormat As DirectXPixelFormat, alphaMode As DirectXAlphaMode) As CompositionDrawingSurface
Parameters
sizePixels
SizeInt32 SizeInt32 SizeInt32

The size of the drawing surface in pixels.

pixelFormat
DirectXPixelFormat DirectXPixelFormat DirectXPixelFormat

The pixel format of the drawing surface.

alphaMode
DirectXAlphaMode DirectXAlphaMode DirectXAlphaMode

The alpha mode of the drawing surface.

Returns

Returns the created CompositionDrawingSurface.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

CreateVirtualDrawingSurface(SizeInt32, DirectXPixelFormat, DirectXAlphaMode) CreateVirtualDrawingSurface(SizeInt32, DirectXPixelFormat, DirectXAlphaMode) CreateVirtualDrawingSurface(SizeInt32, DirectXPixelFormat, DirectXAlphaMode)

Creates an instance of CompositionVirtualDrawingSurface.

public : CompositionVirtualDrawingSurface CreateVirtualDrawingSurface(SizeInt32 sizePixels, DirectXPixelFormat pixelFormat, DirectXAlphaMode alphaMode)
public CompositionVirtualDrawingSurface CreateVirtualDrawingSurface(SizeInt32 sizePixels, DirectXPixelFormat pixelFormat, DirectXAlphaMode alphaMode)
Public Function CreateVirtualDrawingSurface(sizePixels As SizeInt32, pixelFormat As DirectXPixelFormat, alphaMode As DirectXAlphaMode) As CompositionVirtualDrawingSurface
Parameters
sizePixels
SizeInt32 SizeInt32 SizeInt32

The size in pixels of the drawing surface.

pixelFormat
DirectXPixelFormat DirectXPixelFormat DirectXPixelFormat

The pixel format of the drawing surface.

alphaMode
DirectXAlphaMode DirectXAlphaMode DirectXAlphaMode

The alpha mode of the drawing surface.

Returns
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

StartAnimation(String,CompositionAnimation) StartAnimation(String,CompositionAnimation) StartAnimation(String,CompositionAnimation)

Connects an animation with the specified property of the object and starts the animation.

(Inherited from CompositionObject)
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)

StartAnimationGroup(ICompositionAnimationBase) StartAnimationGroup(ICompositionAnimationBase) StartAnimationGroup(ICompositionAnimationBase)

Starts 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)
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

StopAnimation(String) StopAnimation(String) StopAnimation(String)

Disconnects an animation from the specified property and stops the animation.

(Inherited from CompositionObject)
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)

StopAnimationGroup(ICompositionAnimationBase) StopAnimationGroup(ICompositionAnimationBase) StopAnimationGroup(ICompositionAnimationBase)

Stops an animation group.

(Inherited from CompositionObject)
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Events

RenderingDeviceReplaced RenderingDeviceReplaced RenderingDeviceReplaced

Event triggered when the rendering device has been replaced.

public : event TypedEventHandler RenderingDeviceReplaced<CompositionGraphicsDevice, RenderingDeviceReplacedEventArgs>
public event TypedEventHandler RenderingDeviceReplaced<CompositionGraphicsDevice, RenderingDeviceReplacedEventArgs>
Public Event TypedEventHandler RenderingDeviceReplaced( Of ( Of CompositionGraphicsDevice ), ( Of RenderingDeviceReplacedEventArgs ))
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)

Properties

Comment Comment Comment

A string to associate with the CompositionObject.

(Inherited from CompositionObject)
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Compositor Compositor Compositor

The Compositor used to create this CompositionObject.

(Inherited from CompositionObject)

Dispatcher Dispatcher Dispatcher

The dispatcher for the CompositionObject.

(Inherited from CompositionObject)

DispatcherQueue DispatcherQueue DispatcherQueue

Gets the DispatcherQueue for the CompostionObject.

(Inherited from CompositionObject)
Additional features and requirements
Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

ImplicitAnimations ImplicitAnimations ImplicitAnimations

The collection of implicit animations attached to this object.

(Inherited from CompositionObject)
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Properties Properties Properties

The collection of properties associated with the CompositionObject.

(Inherited from CompositionObject)