diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-06-29 17:41:00 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-06-29 18:18:11 +0300 |
commit | d140e70c496122915eb5c05aba83153e2e0d7998 (patch) | |
tree | 1e589247d69da64aa7b0e7802319237ec050b5d6 /source/blender/imbuf/IMB_thumbs.h | |
parent | 147bd16ed1bb3415b30408b0eab110d0854eadd2 (diff) | |
parent | 295d0c52a26730edc6d4ed1276e4051cce006be5 (diff) |
Merge branch 'master' into temp-ghash-experimentstemp-ghash-experiments
Note that 'store hash' feature was removed for now - to complex to maintain (conflicts)
and relatively easy to re-add if we ever really want this one day.
Conflicts:
source/blender/blenlib/BLI_ghash.h
source/blender/blenlib/intern/BLI_ghash.c
source/blender/blenlib/intern/hash_mm2a.c
source/blender/bmesh/tools/bmesh_region_match.c
tests/gtests/blenlib/BLI_ghash_performance_test.cc
tests/gtests/blenlib/BLI_ghash_test.cc
tests/gtests/blenlib/CMakeLists.txt
Diffstat (limited to 'source/blender/imbuf/IMB_thumbs.h')
-rw-r--r-- | source/blender/imbuf/IMB_thumbs.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/source/blender/imbuf/IMB_thumbs.h b/source/blender/imbuf/IMB_thumbs.h index 9fc075e4e8b..f2f75973bcd 100644 --- a/source/blender/imbuf/IMB_thumbs.h +++ b/source/blender/imbuf/IMB_thumbs.h @@ -54,13 +54,19 @@ typedef enum ThumbSize { typedef enum ThumbSource { THB_SOURCE_IMAGE, THB_SOURCE_MOVIE, - THB_SOURCE_BLEND + THB_SOURCE_BLEND, + THB_SOURCE_FONT, } ThumbSource; /* don't generate thumbs for images bigger then this (100mb) */ #define THUMB_SIZE_MAX (100 * 1024 * 1024) -// IB_metadata +#define PREVIEW_RENDER_DEFAULT_HEIGHT 128 + +/* Note this can also be used as versionning system, + * to force refreshing all thumbnails if e.g. we change some thumb generating code or so. + * Only used by fonts so far. */ +#define THUMB_DEFAULT_HASH "00000000000000000000000000000000" /* create thumbnail for file and returns new imbuf for thumbnail */ ImBuf *IMB_thumb_create(const char *path, ThumbSize size, ThumbSource source, ImBuf *ibuf); @@ -78,8 +84,12 @@ ImBuf *IMB_thumb_manage(const char *path, ThumbSize size, ThumbSource source); void IMB_thumb_makedirs(void); /* special function for loading a thumbnail embedded into a blend file */ -ImBuf *IMB_loadblend_thumb(const char *path); -void IMB_overlayblend_thumb(unsigned int *thumb, int width, int height, float aspect); +ImBuf *IMB_thumb_load_blend(const char *path); +void IMB_thumb_overlay_blend(unsigned int *thumb, int width, int height, float aspect); + +/* special function for previewing fonts */ +ImBuf *IMB_thumb_load_font(const char *filename, unsigned int x, unsigned int y); +bool IMB_thumb_load_font_get_hash(char *r_hash); #ifdef __cplusplus } |