<AWT Dev> RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL

Sergey Bylokhov serb at openjdk.java.net
Thu Jun 3 18:43:35 UTC 2021

On Thu, 3 Jun 2021 13:59:57 GMT, Alexey Ushakov <avu at openjdk.org> wrote:

> AFAIK, we don't have any control over composing the layer content on top of the window surface. We just get drawable for the layer that has a texture attached and then blits our content into it.

Probably I missed your point, but there is no issue if we draw opaque color to the layer. Since it does not matter what kind of blending is used when we blit layer to nswindow and the layer has an opaque color. Why we cannot emulate the same when the app draws some transparency and use some blending? Just fill the layer with the opaque "default" color(or make it "opaque"), blend the transparent color on top of it and then blit this opaque result to the window.

Its is actually a question why the mtl layer is initialised as opaque=false in all cases.


PR: https://git.openjdk.java.net/jdk/pull/4206

More information about the awt-dev mailing list