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

macOS: Render OpenGL frames on ThreadPoolJob instead of directly on the CVDisplayLink thread to avoid a deadlock

This commit is contained in:
ed 2020-05-19 12:53:09 +01:00
parent 6688bbf08c
commit 281ae0b067

View file

@ -466,7 +466,10 @@ public:
#if JUCE_MAC
if (cvDisplayLinkWrapper != nullptr)
repaintEvent.wait (1000);
{
repaintEvent.wait (-1);
renderFrame();
}
else
#endif
if (! renderFrame())
@ -683,7 +686,7 @@ public:
CVOptionFlags, CVOptionFlags*, void* displayLinkContext)
{
auto* self = (CachedImage*) displayLinkContext;
self->renderFrame();
self->repaintEvent.signal();
return kCVReturnSuccess;
}