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

Partial update changes stored inside the image runtime. More...

Public Member Functions

void update_resolution (const ImageTile *image_tile, const ImBuf *image_buffer)
 
void mark_full_update ()
 
void mark_region (const ImageTile *image_tile, const rcti *updated_region)
 
void ensure_empty_changeset ()
 
void commit_current_changeset ()
 Move the current changeset to the history and resets the current changeset. More...
 
void limit_history ()
 Limit the number of items in the changeset. More...
 
bool can_construct (ChangesetID changeset_id)
 
std::optional< TileChangesetchanged_tile_chunks_since (const ImageTile *image_tile, const ChangesetID from_changeset)
 collect all historic changes since a given changeset. More...
 

Public Attributes

ChangesetID first_changeset_id
 changeset id of the first changeset kept in history. More...
 
ChangesetID last_changeset_id
 changeset id of the top changeset kept in history. More...
 
Vector< Changesethistory
 history of changesets. More...
 
Changeset current_changeset
 The current changeset. New changes will be added to this changeset. More...
 

Detailed Description

Partial update changes stored inside the image runtime.

The PartialUpdateRegisterImpl will keep track of changes over time. Changes are groups inside TileChangesets.

Definition at line 348 of file image_partial_update.cc.

Member Function Documentation

◆ can_construct()

bool blender::bke::image::partial_update::PartialUpdateRegisterImpl::can_construct ( ChangesetID  changeset_id)
inline

/brief Check if data is available to construct the update tiles for the given changeset_id.

The update tiles can be created when changeset id is between

Definition at line 421 of file image_partial_update.cc.

References first_changeset_id, and last_changeset_id.

Referenced by blender::bke::image::partial_update::BKE_image_partial_update_collect_changes().

◆ changed_tile_chunks_since()

std::optional<TileChangeset> blender::bke::image::partial_update::PartialUpdateRegisterImpl::changed_tile_chunks_since ( const ImageTile image_tile,
const ChangesetID  from_changeset 
)
inline

◆ commit_current_changeset()

void blender::bke::image::partial_update::PartialUpdateRegisterImpl::commit_current_changeset ( )
inline

Move the current changeset to the history and resets the current changeset.

Definition at line 397 of file image_partial_update.cc.

References blender::bke::image::partial_update::Changeset::clear(), current_changeset, history, and last_changeset_id.

Referenced by ensure_empty_changeset().

◆ ensure_empty_changeset()

void blender::bke::image::partial_update::PartialUpdateRegisterImpl::ensure_empty_changeset ( )
inline

◆ limit_history()

void blender::bke::image::partial_update::PartialUpdateRegisterImpl::limit_history ( )
inline

Limit the number of items in the changeset.

Definition at line 405 of file image_partial_update.cc.

References first_changeset_id, history, blender::bke::image::partial_update::MAX_HISTORY_LEN, and max_ii().

Referenced by ensure_empty_changeset().

◆ mark_full_update()

void blender::bke::image::partial_update::PartialUpdateRegisterImpl::mark_full_update ( )
inline

◆ mark_region()

void blender::bke::image::partial_update::PartialUpdateRegisterImpl::mark_region ( const ImageTile image_tile,
const rcti updated_region 
)
inline

◆ update_resolution()

void blender::bke::image::partial_update::PartialUpdateRegisterImpl::update_resolution ( const ImageTile image_tile,
const ImBuf image_buffer 
)
inline

Member Data Documentation

◆ current_changeset

Changeset blender::bke::image::partial_update::PartialUpdateRegisterImpl::current_changeset

The current changeset. New changes will be added to this changeset.

Definition at line 357 of file image_partial_update.cc.

Referenced by commit_current_changeset(), ensure_empty_changeset(), mark_full_update(), mark_region(), and update_resolution().

◆ first_changeset_id

ChangesetID blender::bke::image::partial_update::PartialUpdateRegisterImpl::first_changeset_id

changeset id of the first changeset kept in history.

Definition at line 350 of file image_partial_update.cc.

Referenced by can_construct(), changed_tile_chunks_since(), limit_history(), and mark_full_update().

◆ history

Vector<Changeset> blender::bke::image::partial_update::PartialUpdateRegisterImpl::history

◆ last_changeset_id

ChangesetID blender::bke::image::partial_update::PartialUpdateRegisterImpl::last_changeset_id

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