QMovie leaking lots of pixmap resources
Waldo Bastian
bastian at kde.org
Thu Jan 1 16:58:16 GMT 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thu January 01 2004 15:25, Martijn Klingens wrote:
> It also seems to me that a movie that is not being shown still fires QTimers
> in Qt itself, which sounds like bad optimization.
You can call QMovie::pause() / unpause() when you are not using it.
> Suggestions welcome.
The calls to QPixmapCache::insert() may be the culprit.
See QMoviePrivate::updatePixmapFromImage
What I don't understand is why the framenumbers keep increasing. It seems to
me that it only has two frames or so, I would expect it to loop back frame 0.
(But it has loop == -1 ??)
Looking at the code, Qt does not seem to realize that the mng library is
looping between two frames and instead considers each frame a new one that it
caches. Very inefficient.
Maybe
if (!(frameperiod < 0 && loop == -1)) {
should read
if (!(frameperiod < 0 || loop == -1)) {
(qmovie.cpp:358)
Cheers,
Waldo
- --
bastian at kde.org -=|[ KDE: K Desktop for the Enterprise ]|=- bastian at suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE/9FGoN4pvrENfboIRAtq+AJ41XSLWAUuoWsq6iKYxMXPnnQOR2ACffKeU
ylmp1fHI6e0ALtMtr7KOfHU=
=tXW5
-----END PGP SIGNATURE-----
More information about the kde-core-devel
mailing list