Interoperability latency between GDI RECT and Direct2D D2D1_RECT_F under concurrent thread access
0 reputation · 15 Mar 2023, 10:06 UTC
The goal is to understand whether the internal GDI batching subsystem introduces measurable latency when multiple threads simultaneously issue drawing calls that rely on the RECT structure’s exclusive‑bottom‑right convention, and how this latency interacts with Direct2D’s inclusive‑edge D2D1_RECT_F expectations in a mixed‑rendering scenario.
Constraints include the documented RECT semantics, the fact that GDI batching may be disabled on certain Windows Server editions, and the requirement that any conversion between RECT and D2D1_REFT_F must preserve pixel alignment. The uncertainty lies in the concurrency threshold at which the batching‑induced delay becomes observable and whether mitigating it requires API‑level changes, synchronization, or alternative rendering paths.
What concurrent thread count triggers noticeable GDI batching latency? Does disabling GDI batching alter the visual output when Direct2D draws the same rectangle? How can developers quantify this latency without affecting the correctness of the mixed GDI/Direct2D rendering pipeline?