Skip to content
This repository has been archived by the owner. It is now read-only.

8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL #62

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -334,6 +334,10 @@ public void initialize(Window _target, LWWindowPeer _peer, PlatformWindow _owner

responder = createPlatformResponder();
contentView.initialize(peer, responder);
boolean isTranslucent = peer != null && peer.isTranslucent();
if (!isTranslucent) {
contentView.setWindowLayerOpaque(true);
}

This comment has been minimized.

@mrserb

mrserb Jul 5, 2021
Member

I think windowLayer should be always in sync with NSWindowOpaque state. And both should be changed together via setOpaque() method.

The change above will call the "setWindowLayerOpaque" twice:

  • LWWindowPeer()->platformWindow.initialize()->contentView.setWindowLayerOpaque(true)
  • LWWindowPeer()->initializeImpl()->setOpaque()->contentView.setWindowLayerOpaque()

Rectangle bounds;
if (!IS(DECORATED, styleBits)) {
@@ -71,7 +71,7 @@ - (id) initWithJavaLayer:(jobject)layer
self.leftInset = 0;
self.framebufferOnly = NO;
self.nextDrawableCount = 0;
self.opaque = TRUE;
self.opaque = FALSE;
CVDisplayLinkCreateWithActiveCGDisplays(&displayLink);
CVDisplayLinkSetOutputCallback(displayLink, &displayLinkCallback, (__bridge void*)self);
return self;