diff options
| author | oldmud0 <oldmud0@users.noreply.github.com> | 2020-08-29 14:51:23 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-29 14:51:23 -0500 |
| commit | 9cc73e5502915d3cdb97c1f91cb2c2bcf7a9d12c (patch) | |
| tree | 9651ec997c25fb0f3a2e10a0d33af4e3355f52c8 | |
| parent | 090e82421d4b0c8c5b3086554f88e7ff613dffdf (diff) | |
| parent | e2e3b28de8a59057b0bf7b13dbb0e16418a9583e (diff) | |
Merge pull request #278 from Crystalwarrior/bugfix/qmovie-optimization
Cache QMovie objects to reduce lag
| -rw-r--r-- | src/aomovie.cpp | 1 | ||||
| -rw-r--r-- | src/aoscene.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/aomovie.cpp b/src/aomovie.cpp index ac949219..196c1d3e 100644 --- a/src/aomovie.cpp +++ b/src/aomovie.cpp @@ -9,6 +9,7 @@ AOMovie::AOMovie(QWidget *p_parent, AOApplication *p_ao_app) : QLabel(p_parent) ao_app = p_ao_app; m_movie = new QMovie(); + m_movie->setCacheMode(QMovie::CacheAll); this->setMovie(m_movie); diff --git a/src/aoscene.cpp b/src/aoscene.cpp index 594013a1..78d69acd 100644 --- a/src/aoscene.cpp +++ b/src/aoscene.cpp @@ -7,6 +7,7 @@ AOScene::AOScene(QWidget *parent, AOApplication *p_ao_app) : QLabel(parent) m_parent = parent; ao_app = p_ao_app; m_movie = new QMovie(this); + m_movie->setCacheMode(QMovie::CacheAll); last_image = ""; } |
