Composition​Graphics​Device Composition​Graphics​Device Composition​Graphics​Device 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, ICompositionGraphicsDevice2public sealed class CompositionGraphicsDevice : CompositionObject, ICompositionGraphicsDevice, ICompositionGraphicsDevice2Public 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)

Inherited Members

Inherited methods

Inherited properties

Methods

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
Attributes
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.

Attributes
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
Attributes
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

Events

RenderingDeviceReplaced RenderingDeviceReplaced RenderingDeviceReplaced

Event triggered when the rendering device has been replaced.

public : event TypedEventHandler RenderingDeviceReplacedpublic event TypedEventHandler RenderingDeviceReplacedPublic Event RenderingDeviceReplaced
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)