ISurfaceImageSourceManagerNative::FlushAllSurfacesWithDevice method (windows.ui.xaml.media.dxinterop.h)

Flushes all current GPU work for all SurfaceImageSource or VirtualSurfaceImageSource objects associated with the given device.

Syntax

HRESULT FlushAllSurfacesWithDevice(
  IUnknown *device
);

Parameters

device

The device that was used to create SurfaceImageSource objects in this process. It must be an ID3D11Device or an ID2D1Device.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The FlushAllSurfacesWithDevice method flushes current GPU work for all SurfaceImageSource objects that were created with device. This GPU work includes Direct2D rendering work and internal GPU work done by the framework associated with rendering. This is useful if an application has created multiple SurfaceImageSource objects and needs to flush the GPU work for all of these surfaces from the background rendering thread. By flushing this work from the background thread the work can be better parallelized, with work being done on the UI thread to improve performance.

You can call the FlushAllSurfacesWithDevice method from a non-UI thread.

Requirements

   
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 windows.ui.xaml.media.dxinterop.h
DLL Windows.UI.Xaml.dll

See also

DirectX and XAML interop

ID2D1Device

ID3D11Device

ISurfaceImageSourceManagerNative

SurfaceImageSource

VirtualSurfaceImageSource