DRM cursor scaling
ClosedPublic

Authored by davidedmundson on Jun 19 2018, 12:52 PM.

Details

Reviewers
graesslin
Group Reviewers
KWin
Commits
R108:2cc42ecc1220: DRM cursor scaling
Summary

We pass the buffer scale of the cursor through QImage::devicePixelRatio.

When copying the cursor with QPainter use Qt's in-built functionality to
handle resizing the cursor pixmap as necessary to match the screen.

As we're now resizing the cursor, the hotspot needs translating from
logical to device co-ordinates.

Test Plan

Used with associated patches

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
Restricted Application added a project: KWin. · View Herald TranscriptJun 19 2018, 12:52 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
davidedmundson requested review of this revision.Jun 19 2018, 12:52 PM
graesslin added inline comments.
plugins/platforms/drm/drm_output.cpp
135

what if we get a scaled cursor image from a client?

graesslin accepted this revision.Jun 23 2018, 7:55 AM
graesslin added inline comments.
plugins/platforms/drm/drm_output.cpp
135

saw the other patch, now it makes sense

This revision is now accepted and ready to land.Jun 23 2018, 7:55 AM
This revision was automatically updated to reflect the committed changes.