From 8d60a8f1f5b9edc080d28907f6e0c43d987d0bf2 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Mon, 30 Jan 2017 10:24:33 +0000 Subject: [PATCH] Use texture atlas for static icon item Summary: Icon's are generally small, they may as well go in the existing shared texture atlas, save some memory and it means more items can be batched whilst rendering. The textures used during animation are unchanged for now as it also requires changing FadingNode's shader. Test Plan: Ran plasma. We use atlas's in frame/SVGItem already so it should be fine. Reviewers: #plasma, mart Reviewed By: mart Subscribers: mart, plasma-devel, #frameworks Tags: #plasma, #frameworks Differential Revision: https://phabricator.kde.org/D4342 --- src/declarativeimports/core/iconitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarativeimports/core/iconitem.cpp b/src/declarativeimports/core/iconitem.cpp index e406ff081..4b2480834 100644 --- a/src/declarativeimports/core/iconitem.cpp +++ b/src/declarativeimports/core/iconitem.cpp @@ -407,7 +407,7 @@ QSGNode* IconItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *update if (!textureNode || m_textureChanged) { delete oldNode; textureNode = new ManagedTextureNode; - textureNode->setTexture(QSharedPointer(window()->createTextureFromImage(m_iconPixmap.toImage()))); + textureNode->setTexture(QSharedPointer(window()->createTextureFromImage(m_iconPixmap.toImage(), QQuickWindow::TextureCanUseAtlas))); m_sizeChanged = true; m_textureChanged = false; }