mirror of
https://github.com/TomHarte/CLK.git
synced 2025-04-02 14:31:20 +00:00
Fixed: of course I can't rely on the pointer to CVTimeStamp not becoming dangling during a queue jump.
This commit is contained in:
parent
4c5d66c317
commit
eabc382540
@ -55,8 +55,9 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt
|
||||
const uint32_t activityMask = 0x01;
|
||||
if(!OSAtomicTestAndSet(activityMask, &_updateIsOngoing))
|
||||
{
|
||||
CVTimeStamp time = *now;
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
|
||||
[self.delegate openGLView:self didUpdateToTime:*now];
|
||||
[self.delegate openGLView:self didUpdateToTime:time];
|
||||
[self drawViewOnlyIfDirty:YES];
|
||||
OSAtomicTestAndClear(activityMask, &_updateIsOngoing);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user