Bug 1924932 Comment 29 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

After following [some](https://forum.juce.com/t/vblank-handling-on-monitor-off/62128) [links](https://github.com/juce-framework/JUCE/commit/fb670d209b3a80b3a3d61d1edce0e2fd5ae89b2c) I think I may have found [how chromium deals with this issue](https://source.chromium.org/chromium/chromium/src/+/f5b5ef851162db7a06198c34e25b942ffc719cec). Unfortunately [the bug discussion there](https://bugs.chromium.org/p/chromium/issues/detail?id=965936) is marked as private. My understanding is that if we want to implement the same workaround, then in our `D3DVsyncSource::VBlankLoop` we should ensure that we always have waited for at least 1ms before we do our fallback call to `DwmFlush`.
After following [some](https://forum.juce.com/t/vblank-handling-on-monitor-off/62128) [links](https://github.com/juce-framework/JUCE/commit/fb670d209b3a80b3a3d61d1edce0e2fd5ae89b2c) I think I may have found [how chromium deals with this issue](https://source.chromium.org/chromium/chromium/src/+/f5b5ef851162db7a06198c34e25b942ffc719cec). Unfortunately [the bug discussion there](https://bugs.chromium.org/p/chromium/issues/detail?id=965936) is marked as private. My understanding is that if we want to implement the same workaround, then in our `D3DVsyncSource::VBlankLoop` we should ensure that we always have waited for at least X ms before we do our fallback call to `DwmFlush` (in chromium X=16.6, in JUCE X=1).
After following [some](https://forum.juce.com/t/vblank-handling-on-monitor-off/62128) [links](https://github.com/juce-framework/JUCE/commit/fb670d209b3a80b3a3d61d1edce0e2fd5ae89b2c) I think I may have found [how chromium deals with this issue](https://source.chromium.org/chromium/chromium/src/+/f5b5ef851162db7a06198c34e25b942ffc719cec). Unfortunately [the bug discussion there](https://bugs.chromium.org/p/chromium/issues/detail?id=965936) is marked as private. My understanding is that if we want to implement the same workaround, then in our `D3DVsyncSource::VBlankLoop` we should ensure that we always have waited for at least X ms before we do our fallback call to `DwmFlush` (in chromium X=16.6, in JUCE X=1).

Edit: In fact in this case we might not even want to fallback: if this is a monitor-off situation, my understanding is that `DwmFlush` will consume CPU for no benefits; the CPU consumption could be due to the inability to delegate tasks to the GPU when the monitor is off.

Back to Bug 1924932 Comment 29