From 2785a691b958a79a1dd606c445188c71c3f58b3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 2 Nov 2014 09:53:10 +0100 Subject: Imported Upstream version 0.20.2 --- src/PixbufCache.vala | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/PixbufCache.vala') diff --git a/src/PixbufCache.vala b/src/PixbufCache.vala index 8b8f276..0708f5e 100644 --- a/src/PixbufCache.vala +++ b/src/PixbufCache.vala @@ -265,6 +265,10 @@ public class PixbufCache : Object { return; } +#if TRACE_PIXBUF_CACHE + debug("%s %s fetched into pixbuf cache", type.to_string(), job.photo.to_string()); +#endif + encache(job.photo, job.pixbuf); // fire signal @@ -279,16 +283,14 @@ public class PixbufCache : Object { Photo photo = (Photo) object; if (in_progress.has_key(photo)) { - // Load is in progress, must cancel. + // Load is in progress, must cancel, but consider in-cache (since it was decached + // before being put into progress) in_progress.get(photo).cancel(); in_progress.unset(photo); + } else if (!cache.has_key(photo)) { continue; } - // only interested if in this cache - if (!cache.has_key(photo)) - continue; - decache(photo); #if TRACE_PIXBUF_CACHE -- cgit v1.2.3