libanim
changeset 36:6ebf9f2d1113
invalidate_cache should also invalidate children's caches recursively
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 08 Nov 2014 13:41:23 +0200 |
parents | d3b583add71f |
children | 4666ae077e00 |
files | src/anim.c |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line diff
1.1 --- a/src/anim.c Fri Oct 03 17:16:51 2014 +0300 1.2 +++ b/src/anim.c Sat Nov 08 13:41:23 2014 +0200 1.3 @@ -957,8 +957,15 @@ 1.4 1.5 static void invalidate_cache(struct anm_node *node) 1.6 { 1.7 + struct anm_node *c; 1.8 struct mat_cache *cache = pthread_getspecific(node->cache_key); 1.9 if(cache) { 1.10 cache->time = cache->inv_time = ANM_TIME_INVAL; 1.11 } 1.12 + 1.13 + c = node->child; 1.14 + while(c) { 1.15 + invalidate_cache(c); 1.16 + c = c->next; 1.17 + } 1.18 }