On Wed, 22 Jul 2026 03:03:45 GMT, Sergey Bylokhov <[email protected]> wrote:
> I wonder is it possible that on retina display with scale=2 it works slightly > differently due to "wrong?" float->int conversion in the > MTLRenderer_DrawPoly, like how vertex is > [prepared](https://github.com/openjdk/jdk/blob/70868ac528f59864d6ec6b678fa1af7dfb183fdd/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLRenderer.m#L237) > and how it is actually > [used](https://github.com/openjdk/jdk/blob/70868ac528f59864d6ec6b678fa1af7dfb183fdd/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLRenderer.m#L194). This is a good catch. But this wrong typecasting in `fillVertex` is not affecting the reproducibility of XOR issue that we are seeing in this PR. Even with no type conversion the ClearPolyLineUsingXORTest fails only with uiScale 1 and not with 2/retina display. I thought it will have some impact on reproducibility, may be mathematically we are not hitting the issue which can happen because of this float to int conversion. Also this needs proper testing for parallelogram, i have created https://bugs.openjdk.org/browse/JDK-8388755 to handle and the type conversion issue. ------------- PR Comment: https://git.openjdk.org/jdk/pull/31981#issuecomment-5045302871
