Skip to content

Commit

Permalink
JBR-4959 [macOS Ventura] Screen flickering after OS update when IDE i…
Browse files Browse the repository at this point in the history
…s full screen

Present layer content using a Core Animation transaction
  • Loading branch information
avu authored and jbrbot committed Jan 26, 2023
1 parent b98742a commit 994f521
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,10 @@ - (id) initWithJavaLayer:(jobject)layer
[actions release];
self.topInset = 0;
self.leftInset = 0;
self.framebufferOnly = NO;
self.framebufferOnly = YES;
self.nextDrawableCount = 0;
self.opaque = YES;
self.presentsWithTransaction = YES;
if (isDisplaySyncEnabled()) {
CVDisplayLinkCreateWithActiveCGDisplays(&_displayLink);
CVDisplayLinkSetOutputCallback(_displayLink, &displayLinkCallback, (__bridge void *) self);
Expand Down Expand Up @@ -143,7 +144,6 @@ - (void) blitTexture {
destinationOrigin:MTLOriginMake(0, 0, 0)];
[blitEncoder endEncoding];

[commandBuf presentDrawable:mtlDrawable];
__block MTLLayer* layer = self;
[layer retain];
[commandBuf addCompletedHandler:^(id <MTLCommandBuffer> commandBuf) {
Expand All @@ -152,6 +152,8 @@ - (void) blitTexture {
}];

[commandBuf commit];
[commandBuf waitUntilScheduled];
[mtlDrawable present];
}
}

Expand Down

0 comments on commit 994f521

Please sign in to comment.