Blender V5.3
blender::imbuf::partial_update::Changeset Struct Reference

Public Member Functions

void clear ()
bool update_resolution (const ImBuf *image_buffer)
void mark_region (const rcti &updated_region)
void mark_chunks_modified (int start_x_chunk, int start_y_chunk, int end_x_chunk, int end_y_chunk)
bool has_modified_chunks () const
void init_chunks (int chunk_x_len_, int chunk_y_len_)
void merge (const Changeset &other)
bool is_modified (int chunk_x, int chunk_y) const
BitVector extract_modified_flags ()

Public Attributes

ChangesetID changeset_id = 0
int buffer_width = 0
int buffer_height = 0
int chunk_x_len = 0
int chunk_y_len = 0

Detailed Description

Dirty chunks of a buffer at a given resolution.

Definition at line 52 of file partial_update.cc.

Member Function Documentation

◆ clear()

void blender::imbuf::partial_update::Changeset::clear ( )
inline

◆ extract_modified_flags()

BitVector blender::imbuf::partial_update::Changeset::extract_modified_flags ( )
inline

Definition at line 175 of file partial_update.cc.

◆ has_modified_chunks()

bool blender::imbuf::partial_update::Changeset::has_modified_chunks ( ) const
inline

◆ init_chunks()

void blender::imbuf::partial_update::Changeset::init_chunks ( int chunk_x_len_,
int chunk_y_len_ )
inline

Definition at line 136 of file partial_update.cc.

References chunk_x_len, chunk_y_len, has_modified_chunks(), and blender::min_ii().

Referenced by clear(), and update_resolution().

◆ is_modified()

bool blender::imbuf::partial_update::Changeset::is_modified ( int chunk_x,
int chunk_y ) const
inline

Has the given chunk changed inside this changeset.

Definition at line 169 of file partial_update.cc.

References chunk_x_len.

◆ mark_chunks_modified()

void blender::imbuf::partial_update::Changeset::mark_chunks_modified ( int start_x_chunk,
int start_y_chunk,
int end_x_chunk,
int end_y_chunk )
inline

Definition at line 120 of file partial_update.cc.

References chunk_x_len.

Referenced by mark_region().

◆ mark_region()

◆ merge()

void blender::imbuf::partial_update::Changeset::merge ( const Changeset & other)
inline

Merge the given changeset into the receiver.

Definition at line 155 of file partial_update.cc.

References blender::BLI_assert(), chunk_x_len, and chunk_y_len.

◆ update_resolution()

bool blender::imbuf::partial_update::Changeset::update_resolution ( const ImBuf * image_buffer)
inline

Update the chunk grid to match the buffer resolution.

Returns
true: resolution has been updated. false: resolution was unchanged.

Definition at line 82 of file partial_update.cc.

References buffer_height, buffer_width, blender::imbuf::partial_update::CHUNK_SIZE, blender::divide_ceil_u(), init_chunks(), blender::ImBuf::x, and blender::ImBuf::y.

Referenced by blender::imbuf::partial_update::Tracker::update_resolution().

Member Data Documentation

◆ buffer_height

int blender::imbuf::partial_update::Changeset::buffer_height = 0

Height of the buffer in pixels.

Definition at line 65 of file partial_update.cc.

Referenced by update_resolution().

◆ buffer_width

int blender::imbuf::partial_update::Changeset::buffer_width = 0

Width of the buffer in pixels.

Definition at line 63 of file partial_update.cc.

Referenced by update_resolution().

◆ changeset_id

ChangesetID blender::imbuf::partial_update::Changeset::changeset_id = 0

Global changeset ID for these changes.

Definition at line 61 of file partial_update.cc.

Referenced by blender::imbuf::partial_update::Tracker::commit_current_changeset().

◆ chunk_x_len

int blender::imbuf::partial_update::Changeset::chunk_x_len = 0

Number of chunks along the x-axis.

Definition at line 67 of file partial_update.cc.

Referenced by clear(), init_chunks(), is_modified(), mark_chunks_modified(), mark_region(), and merge().

◆ chunk_y_len

int blender::imbuf::partial_update::Changeset::chunk_y_len = 0

Number of chunks along the y-axis.

Definition at line 69 of file partial_update.cc.

Referenced by clear(), init_chunks(), mark_region(), and merge().


The documentation for this struct was generated from the following file: