Get output pixel size from output device

Authored by romangg on Aug 27 2019, 2:23 PM.



Get the pixel size directly from the always available output device
interface instead of saving an additional copy in the backends.

Test Plan

Nested Wayland, Drm, virtual backends tested.

Diff Detail

R108 KWin
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
romangg created this revision.Aug 27 2019, 2:23 PM
Restricted Application added a project: KWin. · View Herald TranscriptAug 27 2019, 2:23 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
romangg requested review of this revision.Aug 27 2019, 2:23 PM
davidedmundson accepted this revision.Aug 28 2019, 10:55 AM
This revision is now accepted and ready to land.Aug 28 2019, 10:55 AM

This comment remains true, only even more so

romangg added inline comments.Aug 28 2019, 11:03 AM

Comment is removed because D23493 is a parent revision of this one.

This revision was automatically updated to reflect the committed changes.
alexeymin added a subscriber: alexeymin.EditedSep 30 2019, 10:55 PM

I think this diff might be the reason for hwc backend failing to build:

In file included from /home/pmos/build/src/kwin-5.16.90/plugins/platforms/hwcomposer/hwcomposer_backend.cpp:21:
/home/pmos/build/src/kwin-5.16.90/plugins/platforms/hwcomposer/hwcomposer_backend.h:58:11: error: 'QSize KWin::HwcomposerOutput::pixelSize() const' marked 'override', but does not override
   58 |     QSize pixelSize() const override;
      |           ^~~~~~~~~
/home/pmos/build/src/kwin-5.16.90/plugins/platforms/hwcomposer/hwcomposer_backend.h:135:10: warning: 'virtual void KWin::HwcomposerWindow::present(HWComposerNativeWindowBuffer*)' can be marked override [-Wsuggest-override]

I've committed a fix 6ee6cc0293381098531ae5e117b1006f28d65346