scene: Fix previous pixmap ref'ing
discardPixmap() increases the reference counter, but there's no matching place where the ref count is decreased, which results in the previous pixmap not being released even if it's not needed anymore.
This commit is contained in:
parent
46a69357a7
commit
d58246961e
1 changed files with 2 additions and 2 deletions
|
@ -110,7 +110,7 @@ void SurfaceItem::updatePixmap()
|
|||
} else {
|
||||
m_pixmap->create();
|
||||
if (m_pixmap->isValid()) {
|
||||
m_previousPixmap.reset();
|
||||
unreferencePreviousPixmap();
|
||||
discardQuads();
|
||||
}
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ void SurfaceItem::discardPixmap()
|
|||
if (m_pixmap->isValid()) {
|
||||
m_previousPixmap.reset(m_pixmap.take());
|
||||
m_previousPixmap->markAsDiscarded();
|
||||
m_referencePixmapCounter++;
|
||||
referencePreviousPixmap();
|
||||
} else {
|
||||
m_pixmap.reset();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue