D5249: [RFC] New effect plugin - projector (keystone) correction

Martin Gräßlin noreply at phabricator.kde.org
Wed Mar 29 19:44:40 UTC 2017


graesslin added a comment.


  I think the effect system is the wrong place for it - at least if we want to add it to KWin directly. The transformation should be done directly in the Scene.

INLINE COMMENTS

> projector.cpp:101-126
> +    if (m_cursorTexture && m_cursorVisible) {
> +        QPoint p = effects->cursorPos();
> +        for (const ScreenData &screenData : m_screenData) {
> +            if ((screenData.number != -1) && (screenData.rect.contains(p))) {
> +                p = translatePoint(p.x() - screenData.rect.left(), p.y() - screenData.rect.top(),
> +                                   screenData.transMatrix).toPoint();
> +                p.rx() += screenData.rect.left();

This is something which we should not do. That has major impact on the performance of the overall system. Cursors are on an own layer and thus cursor movement does not require a repaint.

Also on X11 we are not able to perfectly track the cursor. On Wayland, though we have full control over it.

> projector.cpp:261-263
> +    // load the cursor-theme image from the Xcursor-library
> +    xcb_xfixes_get_cursor_image_cookie_t keks = xcb_xfixes_get_cursor_image_unchecked(xcbConnection());
> +    xcb_xfixes_get_cursor_image_reply_t *ximg = xcb_xfixes_get_cursor_image_reply(xcbConnection(), keks, 0);

unrelated to the fact that I think we shouldn't do cursor manipulation: we do have access to the cursor image in the effects API.

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D5249

To: nowicki, #plasma, graesslin
Cc: kwin, plasma-devel, #kwin, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170329/0853b11a/attachment-0001.html>


More information about the Plasma-devel mailing list