Blender  V3.3
Public Member Functions | Public Attributes | List of all members
blender::bke::image::partial_update::TileChangeset Struct Reference

Dirty chunks of an ImageTile. More...

Public Member Functions

void clear ()
 
bool update_resolution (const ImBuf *image_buffer)
 Update the resolution of the tile. More...
 
void mark_region (const rcti *updated_region)
 
void mark_chunks_dirty (int start_x_chunk, int start_y_chunk, int end_x_chunk, int end_y_chunk)
 
bool has_dirty_chunks () const
 
void init_chunks (int chunk_x_len_, int chunk_y_len_)
 
void merge (const TileChangeset &other)
 Merge the given changeset into the receiver. More...
 
bool is_chunk_dirty (int chunk_x, int chunk_y) const
 has a chunk changed inside this changeset. More...
 

Public Attributes

int tile_width
 Width of the tile in pixels. More...
 
int tile_height
 Height of the tile in pixels. More...
 
int chunk_x_len
 Number of chunks along the x-axis. More...
 
int chunk_y_len
 Number of chunks along the y-axis. More...
 
TileNumber tile_number
 

Detailed Description

Dirty chunks of an ImageTile.

Internally dirty tiles are grouped together in change sets to make sure that the correct answer can be built for different users reducing the amount of merges.

Definition at line 162 of file image_partial_update.cc.

Member Function Documentation

◆ clear()

void blender::bke::image::partial_update::TileChangeset::clear ( )
inline

Definition at line 181 of file image_partial_update.cc.

References chunk_x_len, chunk_y_len, and init_chunks().

◆ has_dirty_chunks()

bool blender::bke::image::partial_update::TileChangeset::has_dirty_chunks ( ) const
inline

◆ init_chunks()

void blender::bke::image::partial_update::TileChangeset::init_chunks ( int  chunk_x_len_,
int  chunk_y_len_ 
)
inline

Definition at line 253 of file image_partial_update.cc.

References chunk_x_len, chunk_y_len, has_dirty_chunks(), and min_ii().

Referenced by clear(), and update_resolution().

◆ is_chunk_dirty()

bool blender::bke::image::partial_update::TileChangeset::is_chunk_dirty ( int  chunk_x,
int  chunk_y 
) const
inline

has a chunk changed inside this changeset.

Definition at line 287 of file image_partial_update.cc.

References chunk_x_len.

◆ mark_chunks_dirty()

void blender::bke::image::partial_update::TileChangeset::mark_chunks_dirty ( int  start_x_chunk,
int  start_y_chunk,
int  end_x_chunk,
int  end_y_chunk 
)
inline

Definition at line 237 of file image_partial_update.cc.

References chunk_x_len.

Referenced by mark_region().

◆ mark_region()

void blender::bke::image::partial_update::TileChangeset::mark_region ( const rcti updated_region)
inline

◆ merge()

void blender::bke::image::partial_update::TileChangeset::merge ( const TileChangeset other)
inline

Merge the given changeset into the receiver.

Definition at line 273 of file image_partial_update.cc.

References BLI_assert, chunk_x_len, and chunk_y_len.

◆ update_resolution()

bool blender::bke::image::partial_update::TileChangeset::update_resolution ( const ImBuf image_buffer)
inline

Update the resolution of the tile.

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

Definition at line 192 of file image_partial_update.cc.

References blender::bke::image::partial_update::CHUNK_SIZE, chunk_x_len, chunk_y_len, init_chunks(), tile_height, tile_width, ImBuf::x, and ImBuf::y.

Referenced by blender::bke::image::partial_update::PartialUpdateRegisterImpl::update_resolution().

Member Data Documentation

◆ chunk_x_len

int blender::bke::image::partial_update::TileChangeset::chunk_x_len

◆ chunk_y_len

int blender::bke::image::partial_update::TileChangeset::chunk_y_len

◆ tile_height

int blender::bke::image::partial_update::TileChangeset::tile_height

Height of the tile in pixels.

Definition at line 173 of file image_partial_update.cc.

Referenced by update_resolution().

◆ tile_number

TileNumber blender::bke::image::partial_update::TileChangeset::tile_number

◆ tile_width

int blender::bke::image::partial_update::TileChangeset::tile_width

Width of the tile in pixels.

Definition at line 171 of file image_partial_update.cc.

Referenced by update_resolution().


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