remove layer usage to reduce vram consumption
This commit is contained in:
@@ -285,13 +285,15 @@ QSGNode* WallpaperImage::updatePaintNode(
|
||||
Q_UNUSED(oldNode);
|
||||
|
||||
if (m_hasPending) {
|
||||
qDebug() << "pending format" << m_pendingImage.format()
|
||||
<< double(m_pendingImage.sizeInBytes()) / 1048576.0 << "MB";
|
||||
if (m_previousTexture) {
|
||||
delete m_previousTexture;
|
||||
m_previousTexture = nullptr;
|
||||
}
|
||||
m_previousTexture = m_texture;
|
||||
m_texture = window()->createTextureFromImage(
|
||||
m_pendingImage, QQuickWindow::TextureHasAlphaChannel);
|
||||
m_pendingImage, QQuickWindow::TextureIsOpaque);
|
||||
m_pendingImage = QImage();
|
||||
m_hasPending = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user