VTK tests on Macs with Retina displays fail
Steps to reproduce:
- build VTK, testing on
- run test with
cmake -R PolyDataMapperAllPolygons -V
- test fails with
[snip]
1436: <DartMeasurement name="ImageError" type="numeric/double">1e+299</DartMeasurement><DartMeasurement name="BaselineImage" type="text/string">Standard</DartMeasurement><DartMeasurementFile name="TestImage" type="image/png">/Users/cory.quammen/bin/paraview-debug/VTK/Testing/Temporary/PolyDataMapperAllPolygons.png</DartMeasurementFile>
1436: Failed Image Test ( PolyDataMapperAllPolygons.png ) : 1e+299
1436: Image differencing failed to produce an image because images are different size:
1436: Valid image: 479, 479, 0
1436: Test image: 239, 239, 0
1436: <DartMeasurement name="WallTime" type="numeric/double">0.621337</DartMeasurement>
1436: <DartMeasurement name="CPUTime" type="numeric/double">0.56068</DartMeasurement>
1436: vtkDebugLeaks has found no leaks.
[snip]
Note the written test image is half the size of the valid baseline image. This is caused by the transformation between the hi-DPI coordinate system and logical pixel coordinate system in vtkCocoaRenderWindow::GetSize()
introduced in !2165 (merged). No transformation from logical pixel coordinate system to the hi-DPI points coordinate system when vtkCocoaRenderWindow::SetSize()
occurs prior to the window being mapped. When vtkCocoaRenderWindow::GetSize()
is called after the window is mapped, the window size is assumed to be in points and a conversion to logical pixels is performed, reducing the reported image size by half in each dimension.