3

I have a program to capture the desktop screen using DXGI Desktop Duplication API.

I get frames with IDXGIOutputDuplication::AcquireNextFrame and I am able to capture my desktop frame by frame fine.

To move forward, I try to optimize my program and try to manage dirty and moved rectangle. The API provides both IDXGIOutputDuplication::GetFrameDirtyRects and IDXGIOutputDuplication::GetFrameMoveRects to obtain these informations.

However, it seems like there are never any rectangles identified as being moved. The documentation says moved rectangle are :

rectangles of pixels in the desktop image that the operating system moved to another location within the same image

What does this mean exactly ? Can DXGI identify arbitrary portion of the screen to have been moved ? Or maybe this only applies to desktop window being moved ?

dynamic_cast
  • 1,075
  • 1
  • 9
  • 23

2 Answers2

0

I only can imagine that it depends on the graphics driver, monitor(s) and such things so it might be hard to give a full list of source actions.

I played around with a sample app for desktop duplication api and there was a moved rectangle event when I maximized an explorer window (windows 10 anniversary, surface pro 3, no external screens)

fabsenet
  • 372
  • 2
  • 15
0

In my tests, all changed regions are identified as dirty rects on Windows 10. On Windows Server 2012 (like Windows 8), moved regions can be identified correctly.

  • FWIW I was able to get Move Rects on Windows Server 2012 R2 Datacenter hosted in VMWare and using VMWare SVGA 3D display adapter – theimowski Jun 04 '20 at 08:06