summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-03-08 15:06:42 +0100
committerJohan Helsing <johan.helsing@qt.io>2019-03-11 07:59:23 +0000
commiteabdc86b3a8bc1c94c917166667c3aed57f049f8 (patch)
treedbc107dcf3c1548fc1231917053614c6b2cfcc9f
parent91e6f98ab1ffd283fb786787ba0b61360fd471cc (diff)
Compositor: Fix incorrect texture size for client buffers when dpr > 1v5.13.0-beta1
The old implementation used QQuickItem::width and height, which changes with the devicePixelRatio. We now use the new property, QWaylandSurface::bufferSize, instead, which is the actual pixel size of the buffer. Change-Id: I430f46746ed2b8f0330e0d220718f58004b3bd2e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
-rw-r--r--src/compositor/compositor_api/qwaylandquickitem.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compositor/compositor_api/qwaylandquickitem.cpp b/src/compositor/compositor_api/qwaylandquickitem.cpp
index 090c8277..ffd29197 100644
--- a/src/compositor/compositor_api/qwaylandquickitem.cpp
+++ b/src/compositor/compositor_api/qwaylandquickitem.cpp
@@ -295,7 +295,8 @@ public:
}
auto texture = buffer.toOpenGLTexture();
- m_sgTex = surfaceItem->window()->createTextureFromId(texture->textureId() , QSize(surfaceItem->width(), surfaceItem->height()), opt);
+ auto size = surface->bufferSize();
+ m_sgTex = surfaceItem->window()->createTextureFromId(texture->textureId(), size, opt);
}
}
emit textureChanged();