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
This commit is contained in:
parent
68f1a87c67
commit
8d60a8f1f5
@ -407,7 +407,7 @@ QSGNode* IconItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *update
|
||||
if (!textureNode || m_textureChanged) {
|
||||
delete oldNode;
|
||||
textureNode = new ManagedTextureNode;
|
||||
textureNode->setTexture(QSharedPointer<QSGTexture>(window()->createTextureFromImage(m_iconPixmap.toImage())));
|
||||
textureNode->setTexture(QSharedPointer<QSGTexture>(window()->createTextureFromImage(m_iconPixmap.toImage(), QQuickWindow::TextureCanUseAtlas)));
|
||||
m_sizeChanged = true;
|
||||
m_textureChanged = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user