Remove manual discardWindowPixmap() calls in InternalClient

SurfaceItemInternal will discard the current pixmap if the buffer size
changes. Also, one of the goal of the scene redesign is to keep things
such as this out of Toplevel subclasses.
This commit is contained in:
Vlad Zahorodnii 2021-05-07 17:49:09 +03:00
parent 119b00f896
commit 77091f7fcb

View file

@ -373,10 +373,7 @@ void InternalClient::present(const QSharedPointer<QOpenGLFramebufferObject> fbo)
commitGeometry(QRect(pos(), clientSizeToFrameSize(bufferSize)));
markAsMapped();
if (m_internalFBO != fbo) {
discardWindowPixmap();
m_internalFBO = fbo;
}
setDepth(32);
surfaceItem()->addDamage(surfaceItem()->rect());
@ -391,10 +388,6 @@ void InternalClient::present(const QImage &image, const QRegion &damage)
commitGeometry(QRect(pos(), clientSizeToFrameSize(bufferSize)));
markAsMapped();
if (m_internalImage.size() != image.size()) {
discardWindowPixmap();
}
m_internalImage = image;
setDepth(32);