summaryrefslogtreecommitdiff
path: root/imagecache.c
diff options
context:
space:
mode:
authorMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2014-03-15 13:52:14 +0100
committerMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2014-03-15 13:52:14 +0100
commit0cd8136a9a58501332ed808c7d92bd1ffcd57c01 (patch)
tree143d421d37ca4f22238155789de8e34751a2a50a /imagecache.c
parent26ea9ceb9851ba99029bd9fdf2ed33ce9585870b (diff)
downloadskin-flatplus-0cd8136a9a58501332ed808c7d92bd1ffcd57c01.tar.gz
skin-flatplus-0cd8136a9a58501332ed808c7d92bd1ffcd57c01.tar.bz2
add pre load cache, menu entr to show amount of cached images, fix topbar channel logo in program menu
Diffstat (limited to 'imagecache.c')
-rw-r--r--imagecache.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/imagecache.c b/imagecache.c
index 5453d7e2..61606476 100644
--- a/imagecache.c
+++ b/imagecache.c
@@ -1,7 +1,17 @@
#include "imagecache.h"
+#include "config.h"
+
+
+#include "displaychannel.h"
+#include "displaymenu.h"
+#include "displaymessage.h"
+#include "displayreplay.h"
+#include "displaytracks.h"
+#include "displayvolume.h"
-cImageCache::cImageCache() {
+cImageCache::cImageCache() {
+ Overflow = false;
}
cImageCache::~cImageCache() {
@@ -46,6 +56,28 @@ void cImageCache::InsertImage(cImage *Image, std::string Name, int Width, int He
InsertIndex++;
if( InsertIndex >= MAX_IMAGE_CACHE ) {
+ isyslog("skinflatplus: imagecache overflow, increase MAX_IMAGE_CACHE");
InsertIndex = 0;
+ Overflow = true;
}
}
+
+void cImageCache::PreLoadImage(void) {
+ uint32_t tick1 = GetMsTicks();
+
+ cFlatDisplayChannel DisplayChannel(false);
+ DisplayChannel.PreLoadImages();
+
+ cFlatDisplayMenu DisplayMenu;
+ DisplayMenu.PreLoadImages();
+
+ cFlatDisplayReplay DisplayReplay(false);
+ DisplayReplay.PreLoadImages();
+
+ cFlatDisplayVolume DisplayVolume;
+ DisplayVolume.PreLoadImages();
+
+ uint32_t tick2 = GetMsTicks();
+ dsyslog("skinflatplus imagecache pre load images time: %d ms", tick2 - tick1);
+ dsyslog("skinflatplus imagecache pre loaded images %d / %d", getCacheCount(), MAX_IMAGE_CACHE);
+}