-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
P3
-
Affects Version/s: 8, 11, 17, 21, 25, 27
-
Component/s: client-libs
-
generic
-
generic
Robot.getPixelColor() does not call Toolkit.getDefaultToolkit().sync() before reading the pixel, unlike Robot.createScreenCapture() which has had this call since JDK-6725214.
When a hardware-accelerated pipeline (OGL, D3D, Metal) is active, rendering may be buffered and not yet flushed to the screen when getPixelColor() reads the pixel. This causes it to return stale values typically the window background color instead of the rendered content.
When a hardware-accelerated pipeline (OGL, D3D, Metal) is active, rendering may be buffered and not yet flushed to the screen when getPixelColor() reads the pixel. This causes it to return stale values typically the window background color instead of the rendered content.