drm cursor scaling
ClosedPublic

Authored by davidedmundson on Nov 25 2016, 10:21 AM.

Details

Reviewers
graesslin
Group Reviewers
Plasma
Commits
R108:add93b3e3655: drm cursor scaling
Summary

Cursors are drawn low level, so need to go from global compositor space to device space
(multiplied by the out scale)

Test Plan

Elements interacted underneath where the mouse was

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.
davidedmundson retitled this revision from to drm cursor scaling.
davidedmundson updated this object.
davidedmundson edited the test plan for this revision. (Show Details)
davidedmundson added a reviewer: Plasma.
Restricted Application added a project: KWin. · View Herald TranscriptNov 25 2016, 10:21 AM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
graesslin requested changes to this revision.Nov 25 2016, 2:21 PM
graesslin added a reviewer: graesslin.
graesslin added a subscriber: graesslin.
graesslin added inline comments.
plugins/platforms/drm/drm_output.cpp
111–112

that just cannot work in a multi screen setup. The global pos is in combined coordinates and you apply here a scale for a single screen.

This revision now requires changes to proceed.Nov 25 2016, 2:21 PM
davidedmundson added inline comments.Nov 25 2016, 2:26 PM
plugins/platforms/drm/drm_output.cpp
111–112

Yes it can. And does.

The combined co-ordinates are all at scale 1. With the screen "sizes" at scale 1.

We only need to scale here so it renders in the right place; which is where the per screen part comes in.

I cannot help it: to me it looks wrong.

plugins/platforms/drm/drm_output.cpp
111

const QPoint p = (globalPos - m_globalPos) * m_scale;

davidedmundson edited edge metadata.

Update line

Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptNov 29 2016, 3:12 PM
graesslin accepted this revision.Dec 9 2016, 6:17 PM
graesslin edited edge metadata.
This revision is now accepted and ready to land.Dec 9 2016, 6:17 PM
This revision was automatically updated to reflect the committed changes.