#1035

Test fails with captured image size mismatch on upscaled displays under Plasma Wayland but not X11

OpenCuperinoopened 1y ago

The following comparisons from quickinspectortest fail in KDE Plasma if display scaling is at 1.5 when using Wayland, but not when using X11:

        QCOMPARE(img.width(), static_cast<int>(view()->width() * view()->devicePixelRatio()));
        QCOMPARE(img.height(), static_cast<int>(view()->height() * view()->devicePixelRatio()));

This appears to by a by-product of Wayland rendering apps at 2x to display them at 1.5. The tests error due to the following mismatch:

FAIL!  : QuickInspectorTest::testFetchingPreview() Compared values are not the same
   Actual   (img.width())                                                   : 200
   Expected (static_cast<int>(view()->width() * view()->devicePixelRatio())): 150
   Loc: [/home/javier/Software/GammaRay/tests/quickinspectortest.cpp(201)]

Both values should be matching at 150 pixels, making the captured image size unreliable.

Saving the captured image to disk also shows that regardless of the captured image's resolution, rendered contents only occupy original dimensions. That could be a bug in Qt, so I will report it upstream.

Activity

0

No activity yet.