@@ -95,8 +95,9 @@ private Point2D getJFXScreenCenter() {
95
95
return new Point2D (centerX , centerY );
96
96
}
97
97
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.
100
101
private Color getSRGBColorAtScreenCenter () throws Exception {
101
102
float [] sRGB = {1.0f , 1 ,0f , 1.0f };
102
103
SwingUtilities .invokeAndWait (() -> {
@@ -209,9 +210,10 @@ public void screenCaptureTest() {
209
210
}
210
211
211
212
// 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.
215
217
@ Test
216
218
public void sRGBPixelTest () throws Exception {
217
219
Rectangle swatch = prepareStage ();
0 commit comments