On Wed, 18 Feb 2026 08:24:22 GMT, Sergey Bylokhov <[email protected]> wrote:

> Robot.getPixelColor() does not call Toolkit.getDefaultToolkit().sync() before 
> reading the pixel, unlike Robot.createScreenCapture() which has had this call 
> since [JDK-6725214](https://bugs.openjdk.org/browse/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.

Marked as reviewed by azvegint (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/29780#pullrequestreview-3829366575

Reply via email to