Share via


DisplayDevice.CreateSimpleScanoutWithDirtyRectsAndOptions Method

Definition

Creates a DisplayScanout object that provides an immutable encapsulation of parameters required for presenting a frame to a DisplaySource.

public:
 virtual DisplayScanout ^ CreateSimpleScanoutWithDirtyRectsAndOptions(DisplaySource ^ source, DisplaySurface ^ surface, unsigned int subresourceIndex, unsigned int syncInterval, IIterable<RectInt32> ^ dirtyRects, DisplayScanoutOptions options) = CreateSimpleScanoutWithDirtyRectsAndOptions;
DisplayScanout CreateSimpleScanoutWithDirtyRectsAndOptions(DisplaySource const& source, DisplaySurface const& surface, uint32_t const& subresourceIndex, uint32_t const& syncInterval, IIterable<RectInt32> const& dirtyRects, DisplayScanoutOptions const& options);
public DisplayScanout CreateSimpleScanoutWithDirtyRectsAndOptions(DisplaySource source, DisplaySurface surface, uint subresourceIndex, uint syncInterval, IEnumerable<RectInt32> dirtyRects, DisplayScanoutOptions options);
function createSimpleScanoutWithDirtyRectsAndOptions(source, surface, subresourceIndex, syncInterval, dirtyRects, options)
Public Function CreateSimpleScanoutWithDirtyRectsAndOptions (source As DisplaySource, surface As DisplaySurface, subresourceIndex As UInteger, syncInterval As UInteger, dirtyRects As IEnumerable(Of RectInt32), options As DisplayScanoutOptions) As DisplayScanout

Parameters

source
DisplaySource

A DisplaySource to present content to.

surface
DisplaySurface

A primary surface.

subresourceIndex
UInt32

unsigned int

uint32_t

Related to Direct3D's concept of subresources. Using this index, you can specify which subresource within the DisplaySurface should be used for scanout, in the event that there are multiple subresources.

The only way to have a DisplaySurface that has multiple subresources is either to create the DisplaySurface with the isStereo flag (see CreateWithProperties), or to open an ID3D11Texture2D using APIs in IDisplayDeviceInterop.

The most common value for subresourceindex will be 0, which indicates that no subresource is needed or available.

syncInterval
UInt32

unsigned int

uint32_t

An integer that specifies how to synchronize presentation of a frame with the vertical blank of the display.

SyncInterval == 0. Presentation happens on the next vertical blank from the display. If there are other presents in the queue with value = 0, then those presents are discarded. SyncInterval == 0, with DisplayScanoutOptions::AllowTearing. The presentation occurs immediately; there is no synchronization with the previous frame. This can cause visible tearing. SyncInterval == 1 through 4. Synchronize presentation for at least n vertical blanks of the display.

dirtyRects

IIterable<RectInt32>

IEnumerable<RectInt32>

Dirty rectangles that provide a hint to the graphics driver indicating which regions of the primary are changing. This might be used by the driver to reduce the amount of bandwidth on the underlying display transport, so you must pass valid rectangles that fully encompass all changed pixels in a frame.

This is an optimization, and if your DirectDisplay client doesn't track dirty rectangles, then you can pass null for dirtyRects, and the operating system will consider that as a full-frame dirty (meaning that all the pixels in the primary buffer are modified). If you pass an empty list for dirtyRects then that means that no pixels have been changed in the primary buffer, and the graphics driver might choose to optimize the scanout of this primary buffer.

options
DisplayScanoutOptions

Flags that can specify various options for the DisplayScanout being created. DisplayScanoutOptions.AllowTearing is valid only if syncInterval is 0.

Returns

A DisplayScanout value.

Windows requirements

Device family
Windows 11 (introduced in 10.0.22000.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v14.0)

Applies to