-
Bug
-
Resolution: Unresolved
-
P3
-
None
-
26
-
None
-
In Review
-
generic
-
generic
`BufferedContext` uses weak refs to hold some drawing state objects. It has no way to distinguish between true `null` (unset) state and GC'ed one. This leads to inconsistent state between Java and native, when Java "thinks" that the state is `null`, and therefore no need to reset it again, while native actually holds some non-null state.
In practice this could manifest as various rendering artifacts happening just after GC, on any accelerated rendering backend on any platform.
In particular, this leads to flickering due to failing blit on Metal.
There is a minimal reproducer attached, working 100% on aarch64 macOS builds with default settings. Background is filled with red color and then a black image is blitted on top. When GC is ran in between, blit fails and resulting image stays red.
In practice this could manifest as various rendering artifacts happening just after GC, on any accelerated rendering backend on any platform.
In particular, this leads to flickering due to failing blit on Metal.
There is a minimal reproducer attached, working 100% on aarch64 macOS builds with default settings. Background is filled with red color and then a black image is blitted on top. When GC is ran in between, blit fails and resulting image stays red.
- links to
-
Review(master) openjdk/jdk/26576