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:
parent
6688bbf08c
commit
281ae0b067
1 changed files with 5 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue