Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AtlasEngine: Improve RDP performance (#13816)
Direct2D is able to detect remote connections and will switch to sending draw commands across RDP instead of rendering the data on the server. This reduces the amount of data that needs to be transmitted as well as the CPU load of the server, if it has no GPU installed. This commit changes `AtlasEngine` to render with just Direct2D if a software or remote device was chosen by `D3D11CreateDevice`. Selecting the DXGI adapter the window is on explicitly in the future would allow us to be more precise here. This new rendering mode doesn't implement some of the more fancy features just yet, like inverted cursors or coloring a single wide glyph in multiple colors. It reuses most existing facilities and uses the existing tile hash map to cache DirectWrite text layouts to improve performance. Unfortunately this does incur a fairly high memory overhead of approximately 25MB for a 120x30 viewport. Additional drive-by changes include: * Treat the given font size exactly as its given without rounding Apparently we don't really need to round the font size to whole pixels * Stop updating the const buffer on every frame * Support window resizing if `debugGeneralPerformance` is enabled Closes #13079 ## Validation Steps Performed * Tested fairly exhaustively over RDP ✅
- Loading branch information