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

Alexey Ushakov avu at openjdk.java.net
Thu Jun 3 14:04:40 UTC 2021


On Tue, 1 Jun 2021 20:32:46 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

> I guess the bug happens when we blit our "layer" surface to the window? So there is no way to set a kind of "src" composite? 

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.

> Will it help if you "clear" the layer to some color(white?) and then immediately blit the content on top of it?


In current implementation - no. We use a blitencoder that just replaces pixels at the texture attached to the drawable. Texture rendering also won't help as we still blend the resulting color with the window surface. See MTLLayer.m (80-133) for more details.

-------------

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


More information about the awt-dev mailing list