Commit f432ba78 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Avoid discarding previous pixmap

When resizing, the SurfaceItem will discard the current pixmap until a
new one is created. If the newly created pixmap is valid, the previous
pixmap will be discarded in SurfaceItem::updatePixmap().

However, the previous pixmap can be discarded only if it's unreferenced,
in other words, no effect needs the previous pixmap.

BUG: 439689
parent 598daac9
...@@ -92,7 +92,9 @@ void SurfaceItem::updatePixmap() ...@@ -92,7 +92,9 @@ void SurfaceItem::updatePixmap()
} else { } else {
m_windowPixmap->create(); m_windowPixmap->create();
if (m_windowPixmap->isValid()) { if (m_windowPixmap->isValid()) {
m_previousWindowPixmap.reset(); if (m_referencePixmapCounter == 0) {
m_previousWindowPixmap.reset();
}
discardQuads(); discardQuads();
} }
} }
......
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