I am trying to capture DWM's DirectX surface by using DXGI and GetDisplaySurfaceData()
using Direct3D 10/11.
However, when I am taking ownership of the adapter's output with IDXGIOutput::TakeOwnership()
before calling to GetDisplaySurfaceData()
, the whole screen blacks out for a moment and then restores back (just as during display mode switching).
Why does this happen, and how can I prevent this?