On Thu, 22 Dec 2022 20:39:33 GMT, Alexey Ivanov <[email protected]> wrote:

> Why can't we scan all the pixels? It was the purpose of the test to ensure 
> each window has the exact color. Does it take very long time?

There isn't a significant time difference but I think it might be a better and 
efficient way. Since the right and bottom scans span across the entire height 
and width of full screen window, it can test the extent of full screen window 
effectively.
 
> Why is color tolerance needed? Is it to account for High DPI display? Can we 
> use 
> [`Robot.createMultiResolutionScreenCapture`](https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/java/awt/Robot.html#createMultiResolutionScreenCapture(java.awt.Rectangle))
>  to ensure the `BufferedImage` contains the actual pixels rather a scaled 
> down version?

There seems to be color issues at certain locations the color is not exactly 
red or green hence the testColor check fails on some platforms. I'll have to 
recheck and test the artifacts like Sergey mentioned it earlier.

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

PR: https://git.openjdk.org/jdk/pull/11462

Reply via email to