Blender V4.3
COM_MemoryBuffer.cc File Reference

Go to the source code of this file.

Namespaces

namespace  blender
 
namespace  blender::compositor
 

Macros

#define ASSERT_BUFFER_CONTAINS_AREA(buf, area)    BLI_assert(BLI_rcti_inside_rcti(&(buf)->get_rect(), &(area)))
 
#define ASSERT_BUFFER_CONTAINS_AREA_AT_COORDS(buf, area, x, y)
 
#define ASSERT_VALID_ELEM_SIZE(buf, channel_offset, elem_size)    BLI_assert((buf)->get_num_channels() >= (channel_offset) + (elem_size))
 

Functions

static rcti blender::compositor::create_rect (const int width, const int height)
 
static void blender::compositor::colorspace_to_scene_linear (MemoryBuffer *buf, const rcti &area, ColorSpace *colorspace)
 
static void blender::compositor::premultiply_alpha (MemoryBuffer *buf, const rcti &area)
 
static void blender::compositor::read_ewa_elem_checked (void *userdata, int x, int y, float result[4])
 
static void blender::compositor::read_ewa_elem_clamped (void *userdata, int x, int y, float result[4])
 

Macro Definition Documentation

◆ ASSERT_BUFFER_CONTAINS_AREA

#define ASSERT_BUFFER_CONTAINS_AREA ( buf,
area )    BLI_assert(BLI_rcti_inside_rcti(&(buf)->get_rect(), &(area)))

Definition at line 10 of file COM_MemoryBuffer.cc.

◆ ASSERT_BUFFER_CONTAINS_AREA_AT_COORDS

#define ASSERT_BUFFER_CONTAINS_AREA_AT_COORDS ( buf,
area,
x,
y )
Value:
BLI_assert((buf)->get_rect().xmin <= (x)); \
BLI_assert((buf)->get_rect().ymin <= (y)); \
BLI_assert((buf)->get_rect().xmax >= (x) + BLI_rcti_size_x(&(area))); \
BLI_assert((buf)->get_rect().ymax >= (y) + BLI_rcti_size_y(&(area)))
#define BLI_assert(a)
Definition BLI_assert.h:50
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
Definition BLI_rect.h:193
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
Definition BLI_rect.h:189

Definition at line 13 of file COM_MemoryBuffer.cc.

Referenced by blender::compositor::MemoryBuffer::copy_from().

◆ ASSERT_VALID_ELEM_SIZE

#define ASSERT_VALID_ELEM_SIZE ( buf,
channel_offset,
elem_size )    BLI_assert((buf)->get_num_channels() >= (channel_offset) + (elem_size))

Definition at line 19 of file COM_MemoryBuffer.cc.

Referenced by blender::compositor::MemoryBuffer::copy_from().