ID2D1Device1::SetRenderingPriority method (d2d1_2.h)

Sets the priority of Direct2D rendering operations performed on any device context associated with the device.

Syntax

void SetRenderingPriority(
  D2D1_RENDERING_PRIORITY renderingPriority
);

Parameters

renderingPriority

Type: D2D1_RENDERING_PRIORITY

The desired rendering priority for the device and associated contexts.

Return value

Type: HRESULT

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

HRESULT Description
S_OK No error occurred.
E_OUTOFMEMORY Direct2D could not allocate sufficient memory to complete the call.
E_INVALIDARG An invalid parameter was passed to the returning function.

Remarks

Calling this method affects the rendering priority of all device contexts associated with the device. This method can be called at any time, but is not guaranteed to take effect until the beginning of the next frame. The recommended usage is to call this method outside of BeginDraw and EndDraw blocks. Cycling this property frequently within drawing blocks will effectively reduce the benefits of any throttling that is applied.

Requirements

Requirement Value
Minimum supported client Windows 8.1 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 R2 [desktop apps | UWP apps]
Target Platform Windows
Header d2d1_2.h
Library D2d1.lib
DLL D2d1.dll

See also

ID2D1Device1