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
This commit is contained in:
parent
d0422eb79f
commit
d6f98d1ecc
1 changed files with 6 additions and 0 deletions
|
@ -391,6 +391,12 @@ void AbstractEglTexture::updateTexture(WindowPixmap *pixmap)
|
||||||
if (image.isNull() || !s) {
|
if (image.isNull() || !s) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (image.size() != m_size) {
|
||||||
|
// buffer size has changed, reload shm texture
|
||||||
|
if (!loadTexture(pixmap)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
Q_ASSERT(image.size() == m_size);
|
Q_ASSERT(image.size() == m_size);
|
||||||
q->bind();
|
q->bind();
|
||||||
const QRegion damage = s->trackedDamage();
|
const QRegion damage = s->trackedDamage();
|
||||||
|
|
Loading…
Reference in a new issue