34 other.source_buffer =
nullptr;
35 other.float_buffer =
nullptr;
47 this->source_buffer = other.source_buffer;
50 other.source_buffer =
nullptr;
51 other.float_buffer =
nullptr;
78 "Expected float buffer to be scene_linear or data - if there are code paths where this "
79 "isn't the case we should convert those and add to the FloatBufferCache as well.");
85 if (item.source_buffer == image_buffer) {
87 return item.float_buffer;
106 buffer.is_used =
false;
113 if (item.source_buffer == image_buffer) {
122 for (
int64_t i = cache_.size() - 1; i >= 0; i--) {
123 if (!cache_[i].is_used) {
124 cache_.remove_and_reorder(i);
#define BLI_assert_msg(a, msg)
void IMB_float_from_byte(ImBuf *ibuf)
bool IMB_colormanagement_space_is_scene_linear(const ColorSpace *colorspace)
void IMB_freeImBuf(ImBuf *ibuf)
ImBuf * IMB_allocImBuf(unsigned int x, unsigned int y, ImBufFlags flags)
bool IMB_colormanagement_space_is_data(const ColorSpace *colorspace)
ImBufFloatBuffer float_buffer
const float * float_data() const
const ColorSpace & float_colorspace() const
Float buffer cache for image buffers.
ImBuf * cached_float_buffer(ImBuf *image_buffer)
void mark_used(const ImBuf *image_buffer)
void remove_unused_buffers()
FloatImageBuffer & operator=(FloatImageBuffer &&other) noexcept
FloatImageBuffer(ImBuf *source_buffer, ImBuf *float_buffer)
FloatImageBuffer(FloatImageBuffer &&other) noexcept
virtual ~FloatImageBuffer()