diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2018-10-16 09:06:20 +0200 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2019-01-02 10:44:40 +0000 |
commit | f312eb3c05613a9ca988a92bf155264d619d8b6a (patch) | |
tree | 604265e8e47f02c301b01b08c329af9428cee13e /src/compositor/compositor_api/qwaylandquickitem.cpp | |
parent | 5a6020f6efb4f09a77745614c6d1c0369bc5e365 (diff) |
Compositor: Implement support for the viewporter extension
[ChangeLog][Compositor] Added support for the viewporter Wayland extension.
Change-Id: I1d33652fab6ff18da4ae1ae3497f0ca43517420a
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Diffstat (limited to 'src/compositor/compositor_api/qwaylandquickitem.cpp')
-rw-r--r-- | src/compositor/compositor_api/qwaylandquickitem.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compositor/compositor_api/qwaylandquickitem.cpp b/src/compositor/compositor_api/qwaylandquickitem.cpp index bc8365982..f848a0169 100644 --- a/src/compositor/compositor_api/qwaylandquickitem.cpp +++ b/src/compositor/compositor_api/qwaylandquickitem.cpp @@ -1317,6 +1317,10 @@ QSGNode *QWaylandQuickItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeDat d->provider->setSmooth(smooth()); node->setRect(rect); + qreal scale = surface()->bufferScale(); + QRectF source = surface()->sourceGeometry(); + node->setSourceRect(QRectF(source.topLeft() * scale, source.size() * scale)); + return node; } else { Q_ASSERT(!d->provider); |