Fix dEQP-EGL.functional.resize.pixel_density.*
bug: 31703045
These tests attempt to calculate native DPI by creating
very small buffers, rendering them to a high resolution screen,
and then re-deriving the native DPI by scaling buffer size
against the window resolution in screen pixels.
Previously, they failed because EGL_HORIZONTAL_RESOLUTION
actually means to get the effective DPI of an EGL texture,
which is different from native DPI.
For example, if the screen is 2 pixels across and 4 meters wide,
the native dot pitch is 0.5 pixels per meter, but if
there is a 1x1 pixel texture filling the entire screen,
EGL_HORIZONTAL_RESOLUTION should return 0.25 pixels
per meter (1 texture pixel, 4 meters -> 0.25 ppm).
This CL queries the native window resolution and attempts
to calculate effective DPI from that.
Change-Id: I7f12d7964529bc95b5f89640dea00e9e16c66799
1 file changed