Go to file
Sergey Sharybin ce893552c3 Image cache rewrite to using generic movie cache
Summary:
Behaves very much the same as cache for Movie Clip datablock:

- Image now have `MovieCache *cache` field which replaced
  legacy `ListBase ibufs`.

  This allows image datablock to easily keep of image
  buffers which are owned by itself. This field isn't
  saved to the file and getting restored on undo steps.

  However, cache limit is global for movies, sequences
  and image datablocks now. So overall cached image buffers
  size will not go above cache limit size in user
  preferences.

- Image buffers which are marked as BITMAPDIRTY will never
  be freed from the cache.

- Added utility function to iterate over image buffers
  saved in movie cache.

- Movie cache cleanup check callback now have ImBuf argument
  which can be used in a condition of cleanup.

- Added some utility functions which replaces legacy ibufs
  iterations with image cache iteration which happens from
  inside a lock.

- Fixed `image_mem_size()` which was only counting one of
  the buffers if both float and byte buffer present.

Additional notes:

- `BKE_image_get_first_ibuf()` is rather stupid, but direct
  access to ibufs->first was also the same stupid idea.

  Would consider avoid this function is another project.

- There are some places which doesn't look threadsafe, but
  they already were not so much threadsafe anyway before.

  So think not a big deal with solving this later.

Finally solves infinite memory usage by image sequences! :)

Reviewers: brecht, campbellbarton

Reviewed By: brecht

CC: sebastian_k

Differential Revision: http://developer.blender.org/D95
2013-12-13 16:30:00 +06:00
build_files Raise llvm min version to 3.3, looks like this is needed for OSL nowadays... 2013-12-12 17:24:41 +01:00
doc Game Engine: Option to record static objects animation 2013-12-09 22:28:38 +11:00
extern CMake: report messages as status (else ccmake treats like an error) 2013-12-10 13:18:46 +11:00
intern Implement GPU-side dither 2013-12-13 12:36:45 +06:00
release Interface / Particles: Fix bad alignment in Rotation panel, sub layout missed the flag. 2013-12-13 10:54:44 +01:00
scons@2d6ebcb239 Squashed commit of the following: 2013-11-21 16:51:29 +01:00
source Image cache rewrite to using generic movie cache 2013-12-13 16:30:00 +06:00
.arcconfig Added the wrong file. Now addin .arcconfig for real. 2013-11-15 20:40:43 +06:00
.gitignore Ignore *.patch and *.diff files which are in the working tree root 2013-11-22 23:28:35 +06:00
.gitmodules
CMakeLists.txt Cycles: network render code updated for latest changes and improved 2013-12-07 12:26:58 +01:00
COPYING
GNUmakefile Convenience Makefile: spaces in the build path would fail still. 2013-11-17 21:16:39 +11:00
SConstruct Fix T37780: no languages in user preferences with SCons on Windows / Linux. 2013-12-12 06:09:58 +01:00