The main goal is to reduce time in GDI callback (PresentDisplayOnly) and avoid situation when the processing takes more than 2 seconds causing class driver watchdog. 1. We offload sending of drawable commands to separate thread (waiting for room in command ring may take unpredictable time) 2. In case the usage of device memory is high, allocation of bitmap for rectangle to draw also may take unpredictable time (note that single full screen redraw requires >3 MB of space) We make drawable objects allocation from GDI callback fast and non-forced and in case they fail we provide alternate allocation from OS heap 3. The thread before it sends drawable command down takes care on objects that were allocated from OS heap and allocates them from device memory (forced, as now we are not limited by time) 4. We still do not enable VSync automatically, but this can be done for evaluation/testing purpose via setting in the driver's registry Changes from V1: Changed allocations style and coding style Removed additional synchronization on deallocation upon allocation failure Removed waiting for thread start on driver startup Other cosmetic changes yuri.benditovich@xxxxxxxxxx (12): qxl-wddm-dod: Prepare system thread for rendering qxl-wddm-dod: Use rendering offload thread qxl-wddm-dod: Introduce TimeMeasurement class for timing debugging qxl-wddm-dod: Debug warning on long wait on event qxl-wddm-dod: Reduce amount of unnecessary printouts qxl-wddm-dod: Registry-based control over VSync qxl-wddm-dod: Set VSync indication period to 200ms qxl-wddm-dod: Prepare for failure to allocate memory qxl-wddm-dod: PutBytesAlign supports non-forced allocation qxl-wddm-dod: Optimize allocation of memory chunks qxl-wddm-dod: Implement non-forced bitmap allocation qxl-wddm-dod: Non-forced memory allocations with VSync qxldod/QxlDod.cpp | 554 ++++++++++++++++++++++++++++++++++++++++++------------ qxldod/QxlDod.h | 86 ++++++++- qxldod/driver.cpp | 35 ++++ 3 files changed, 554 insertions(+), 121 deletions(-) -- 2.7.0.windows.1 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel