D23538: [dolphin] Animate gifs on preview
Méven Car
noreply at phabricator.kde.org
Thu Aug 29 19:02:45 BST 2019
meven added inline comments.
INLINE COMMENTS
> iasensio wrote in pixmapviewer.cpp:45
> Should it also be destroyed on animation stopping? Or only if a different non-animated item gets loaded? Or that would be an extra penalty in creation/destruction.
I don't think it is necessary.
Once this has been initiated we have good chances that it will serve again.
And keeping it is just a little memory occupied while destroying will use some CPU and some more if and when the animatedImage is used again.
You can replace `m_animatedImage = nullptr;` here with a declaration in the constructor :
PixmapViewer::PixmapViewer(QWidget* parent, Transition transition) :
QWidget(parent),
m_transition(transition),
m_animationStep(0),
m_sizeHint(),
m_animatedImage(nullptr)
I am not even sure it is necessary to declare it at all.
REPOSITORY
R318 Dolphin
REVISION DETAIL
https://phabricator.kde.org/D23538
To: iasensio, #dolphin, #vdg, ngraham, elvisangelaccio
Cc: fuksitter, meven, broulik, kfm-devel, vmarinescu, fprice, MrPepe, fbampaloukas, alexde, Codezela, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20190829/aac34db4/attachment.htm>
More information about the kfm-devel
mailing list