1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
Commit graph

9 commits

Author SHA1 Message Date
reuk
a37b35ad15
D2D: Avoid crashing when attempting to create a vblank dispatcher on a headless system 2025-08-27 18:09:23 +01:00
Oli
878ac1a23f DirectX: Reduce shared resource thrashing in VBlank 2025-04-17 14:23:32 +01:00
reuk
d3d7d4c89c VBlank: If previous frame is still in progress, wait until next frame to trigger a new vblank
Previously, the vblank's thread loop would block on each iteration until
the current async callback had finished, at which point a new async
callback would be immediately triggered.

The new implementation only waits on the vblank event. If a vblank
callback is still in progress the next time the vblank event is
signalled, we assume the last frame is overrunning and avoid sending a
new async update.

The intention of this change is to avoid saturating the message thread
with expensive vblank callbacks. It's also nice to remove a lock,
although that's just an incidental change.
2024-12-13 14:49:46 +00:00
attila
d9a3efd3cb ComponentPeer::VBlankListener: Add timestamp parameter to the vblank callback 2024-10-25 15:44:34 +02:00
reuk
80ac9a78a0
Singleton: Add new macros to simplify singleton creation
The INLINE macros allow singletons to be declared and defined in one
line, without requiring a separate JUCE_IMPLEMENT_SINGLETON statement.
2024-10-16 10:36:52 +01:00
Anthony Nicholls
6c2d149ef3 Versioning: Add the JUCE version number to any internally created threads 2024-09-26 08:10:56 +00:00
attila
fb670d209b Windows: Throttle VBlankThread when the display is off
When the display goes to sleep IDXGIOutput::WaitForVBlank returns S_OK
immediately causing the VBlankThread to consume a core entirely with the
VBlank related messaging.

To limit this problem, we use the same technique as Chromium presently
does, and we sleep for 1 ms, if the time between the last two VBlank
events was less than a ms. This limits the VBlankThread messaging rate
of about 50.000/s on an Intel 13600 to 1000/s.
2024-07-31 18:15:54 +02:00
reuk
19061e6d17
Direct2D: Add initial support 2024-04-18 14:16:02 +01:00
reuk
b1861dc25c
VBlank: Avoid hogging the message queue with repaint messages when repaints take longer than a vblank period 2024-04-18 14:16:02 +01:00