OLD | NEW |
1 /* | 1 /* |
2 * allocimbuf.c | 2 * allocimbuf.c |
3 * | 3 * |
4 * $Id$ | 4 * $Id$ |
5 * | 5 * |
6 * ***** BEGIN GPL LICENSE BLOCK ***** | 6 * ***** BEGIN GPL LICENSE BLOCK ***** |
7 * | 7 * |
8 * This program is free software; you can redistribute it and/or | 8 * This program is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU General Public License | 9 * modify it under the terms of the GNU General Public License |
10 * as published by the Free Software Foundation; either version 2 | 10 * as published by the Free Software Foundation; either version 2 |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 freeencodedbufferImBuf(ibuf); | 461 freeencodedbufferImBuf(ibuf); |
462 | 462 |
463 ibuf->c_handle = NULL; | 463 ibuf->c_handle = NULL; |
464 } | 464 } |
465 | 465 |
466 static MEM_CacheLimiterC **get_imbuf_cache_limiter(void) | 466 static MEM_CacheLimiterC **get_imbuf_cache_limiter(void) |
467 { | 467 { |
468 static MEM_CacheLimiterC *c = NULL; | 468 static MEM_CacheLimiterC *c = NULL; |
469 | 469 |
470 if(!c) | 470 if(!c) |
471 » » c = new_MEM_CacheLimiter(imbuf_cache_destructor); | 471 » » c = new_MEM_CacheLimiter(imbuf_cache_destructor, NULL); |
472 | 472 |
473 return &c; | 473 return &c; |
474 } | 474 } |
475 | 475 |
476 void IMB_free_cache_limiter(void) | 476 void IMB_free_cache_limiter(void) |
477 { | 477 { |
478 delete_MEM_CacheLimiter(*get_imbuf_cache_limiter()); | 478 delete_MEM_CacheLimiter(*get_imbuf_cache_limiter()); |
479 *get_imbuf_cache_limiter() = NULL; | 479 *get_imbuf_cache_limiter() = NULL; |
480 } | 480 } |
481 | 481 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 } | 518 } |
519 | 519 |
520 int IMB_cache_limiter_get_refcount(ImBuf *i) | 520 int IMB_cache_limiter_get_refcount(ImBuf *i) |
521 { | 521 { |
522 if(i->c_handle) | 522 if(i->c_handle) |
523 return MEM_CacheLimiter_get_refcount(i->c_handle); | 523 return MEM_CacheLimiter_get_refcount(i->c_handle); |
524 | 524 |
525 return 0; | 525 return 0; |
526 } | 526 } |
527 | 527 |
OLD | NEW |