diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-01-09 11:06:40 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-01-09 11:06:40 +0100 |
commit | 4166f9301d5e9c9e5547abe8773ea4383ef36fa8 (patch) | |
tree | 1a648159257a40d0aff5c8891f2898533f6ba8f4 /src | |
parent | 6a205d77ba2747dd8bb21ceba452d43f36721eba (diff) | |
parent | 3ac2a750cff9237342432c3175387b49f295767e (diff) |
merge
Diffstat (limited to 'src')
-rw-r--r-- | src/dicache.c | 8 | ||||
-rw-r--r-- | src/gif.c | 1 | ||||
-rw-r--r-- | src/jpeg.c | 1 | ||||
-rw-r--r-- | src/png.c | 1 |
4 files changed, 3 insertions, 8 deletions
diff --git a/src/dicache.c b/src/dicache.c index 1c546e98..424fc87f 100644 --- a/src/dicache.c +++ b/src/dicache.c @@ -390,12 +390,10 @@ void a_Dicache_callback(int Op, CacheClient_t *Client) Client->Version = DicEntry->version; /* Only call the decoder when necessary */ - int newData = FALSE; if (Op == CA_Send && DicEntry->State < DIC_Close && DicEntry->DecodedSize < Client->BufSize) { DicEntry->Decoder(Op, Client); DicEntry->DecodedSize = Client->BufSize; - newData = TRUE; } else if (Op == CA_Close || Op == CA_Abort) { if (DicEntry->State < DIC_Close) { DicEntry->Decoder(Op, Client); @@ -413,7 +411,7 @@ void a_Dicache_callback(int Op, CacheClient_t *Client) DicEntry->version, DicEntry->width, DicEntry->height, DicEntry->type); } - if (DicEntry->State == DIC_Write && newData) { + if (DicEntry->State == DIC_Write) { if (DicEntry->ScanNumber == Image->ScanNumber) { for (i = 0; i < DicEntry->height; ++i) if (a_Bitvec_get_bit(DicEntry->BitVec, (int)i) && @@ -454,8 +452,8 @@ void a_Dicache_cleanup(void) node = dList_nth_data(CachedIMGs, i); /* iterate each entry of this node */ for (entry = node->first; entry; entry = entry->next) { - if (entry->RefCount == 1 || - (entry->v_imgbuf && a_Imgbuf_last_reference(entry->v_imgbuf))) { + if (entry->v_imgbuf && + a_Imgbuf_last_reference(entry->v_imgbuf)) { /* free this unused entry */ if (entry->next) { Dicache_remove(node->url, entry->version); @@ -179,7 +179,6 @@ void *a_Gif_image(const char *Type, void *Ptr, CA_Callback_t *Call, DicEntry = a_Dicache_add_entry(web->url); DicEntry->DecoderData = Gif_new(web->Image, DicEntry->url, DicEntry->version); - a_Dicache_ref(DicEntry->url, DicEntry->version); } else { /* Repeated image */ a_Dicache_ref(DicEntry->url, DicEntry->version); @@ -123,7 +123,6 @@ void *a_Jpeg_image(const char *Type, void *P, CA_Callback_t *Call, DicEntry = a_Dicache_add_entry(web->url); DicEntry->DecoderData = Jpeg_new(web->Image, DicEntry->url, DicEntry->version); - a_Dicache_ref(DicEntry->url, DicEntry->version); } else { /* Repeated image */ a_Dicache_ref(DicEntry->url, DicEntry->version); @@ -474,7 +474,6 @@ void *a_Png_image(const char *Type, void *Ptr, CA_Callback_t *Call, DicEntry = a_Dicache_add_entry(web->url); DicEntry->DecoderData = Png_new(web->Image, DicEntry->url, DicEntry->version); - a_Dicache_ref(DicEntry->url, DicEntry->version); } else { /* Repeated image */ a_Dicache_ref(DicEntry->url, DicEntry->version); |