Commit d6f98d1e authored by Roman Gilg's avatar Roman Gilg

Reload Shm texture when buffer size changes

Summary: Shm textures via Gl must be reloaded in case their size changes.

Test Plan: testShmBufferSizeChangeOnSubSurface passes.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18453
parent d0422eb7
......@@ -391,6 +391,12 @@ void AbstractEglTexture::updateTexture(WindowPixmap *pixmap)
if (image.isNull() || !s) {
return;
}
if (image.size() != m_size) {
// buffer size has changed, reload shm texture
if (!loadTexture(pixmap)) {
return;
}
}
Q_ASSERT(image.size() == m_size);
q->bind();
const QRegion damage = s->trackedDamage();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment