Skip to content

Commit 20c2375

Browse files
committed
Updated comments concerning the AWT Robot
1 parent b6c3140 commit 20c2375

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tests/system/src/test/java/test/robot/javafx/scene/SRGBTest.java

+7-5
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,9 @@ private Point2D getJFXScreenCenter() {
9595
return new Point2D(centerX, centerY);
9696
}
9797

98-
// We use an AWT Robot since it is color space aware and will correctly convert
99-
// from the screeen's color space to sRGB.
98+
// An AWT Robot is color space aware and will correctly convert from the
99+
// screeen's color space to sRGB. We use one to verify that the JavaFX
100+
// Robot is performing the same conversions.
100101
private Color getSRGBColorAtScreenCenter() throws Exception {
101102
float[] sRGB = {1.0f, 1,0f, 1.0f};
102103
SwingUtilities.invokeAndWait(() -> {
@@ -209,9 +210,10 @@ public void screenCaptureTest() {
209210
}
210211

211212
// Tests that pixels are correctly written out as sRGB using an AWT Robot
212-
// that is color space aware. The singlePixel and screenCapture tests only
213-
// verify that colors can be round-tripped, not that they are actually
214-
// producing sRGB onscreen.
213+
// that is color space aware. The singlePixel and screenCapture tests
214+
// only verify that the JavaFX renderer and JavaFX Robot can round-trip
215+
// colors but they might both be working in the wrong space. We use an
216+
// AWT Robot to verify that they are working in sRGB.
215217
@Test
216218
public void sRGBPixelTest() throws Exception {
217219
Rectangle swatch = prepareStage();

0 commit comments

Comments
 (0)