52 std::atomic<bool> is_cancelled_ =
false;
57 is_cancelled_.store(
true, std::memory_order_release);
62 is_cancelled_.store(
false, std::memory_order_release);
67 return is_cancelled_.load(std::memory_order_acquire);
74#define THUMB_SIZE_MAX (100 * 1024 * 1024)
76#define PREVIEW_RENDER_DEFAULT_HEIGHT 128
77#define PREVIEW_RENDER_LARGE_HEIGHT 256
84#define THUMB_DEFAULT_HASH "00000000000000000000000000000000"
120 const ThumbCancellationToken *cancel_token =
nullptr);
140 const float color[4],
141 const char *sample_text =
nullptr);
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
ImBuf * IMB_font_preview(const char *filepath, unsigned int width, const float color[4], const char *sample_text=nullptr)
void IMB_thumb_locks_release()
void IMB_thumb_path_unlock(const char *path)
ImBuf * IMB_thumb_create(const char *filepath, ThumbSize size, ThumbSource source, ImBuf *img)
void IMB_thumb_locks_acquire()
ImBuf * IMB_thumb_load_blend(const char *blen_path, const char *blen_group, const char *blen_id)
ImBuf * IMB_thumb_read(const char *file_or_lib_path, ThumbSize size)
void IMB_thumb_delete(const char *file_or_lib_path, ThumbSize size)
void IMB_thumb_path_lock(const char *path)
bool IMB_thumb_load_font_get_hash(char *r_hash)
void IMB_thumb_makedirs()
ImBuf * IMB_thumb_load_font(const char *filepath, unsigned int x, unsigned int y)
ImBuf * IMB_thumb_manage(const char *file_or_lib_path, ThumbSize size, ThumbSource source, const ThumbCancellationToken *cancel_token=nullptr)
bool is_cancelled() const