27struct PartialUpdateUser;
32namespace partial_update {
94 PartialUpdateUser *user);
97 PartialUpdateRegion *r_region);
172 this->image_user.
framenr = image->lastframe;
ImBuf * BKE_image_acquire_ibuf(Image *ima, ImageUser *iuser, void **r_lock)
void BKE_image_release_ibuf(Image *ima, ImBuf *ibuf, void *lock)
#define BLI_assert_unreachable()
Abstract class to load tile data when using the PartialUpdateChecker.
virtual void free_data()=0
Unload the data that has been loaded.
virtual void init_data(TileNumber tile_number)=0
Load the data for the given tile_number.
virtual ~AbstractTileData()=default
Load the ImageTile and ImBuf associated with the partial change.
ImageTileData(Image *image, ImageUser *image_user)
ImageTile * tile
ImageTile associated with the loaded tile. Data is not owned by this instance but by the image.
ImBuf * tile_buffer
ImBuf of the loaded tile.
void free_data() override
Unload the data that has been loaded.
void init_data(TileNumber new_tile_number) override
Load the data for the given tile_number.
Image * image
Not owned Image that is being iterated over.
ImageUser image_user
Local copy of the image user.
Class to not load any tile specific data when iterating over changes.
NoTileData(Image *, ImageUser *)
void init_data(TileNumber) override
Load the data for the given tile_number.
void free_data() override
Unload the data that has been loaded.
ePartialUpdateCollectResult BKE_image_partial_update_collect_changes(Image *image, PartialUpdateUser *user)
collect the partial update since the last request.
ePartialUpdateIterResult BKE_image_partial_update_get_next_change(PartialUpdateUser *user, PartialUpdateRegion *r_region)
ePartialUpdateCollectResult
Result codes of BKE_image_partial_update_collect_changes.
@ PartialChangesDetected
Changes detected since the last time requested.
@ FullUpdateNeeded
Unable to construct partial updates. Caller should perform a full update.
@ NoChangesDetected
No changes detected since the last time requested.
ePartialUpdateIterResult
Return codes of BKE_image_partial_update_get_next_change.
@ Finished
no tiles left when iterating over tiles.
@ ChangeAvailable
a chunk was available and has been loaded.
CollectResult(PartialUpdateChecker< TileData > *checker, ePartialUpdateCollectResult result_code)
PartialUpdateChecker< TileData > * checker
ePartialUpdateCollectResult result_code
TileData tile_data
Tile specific data.
PartialUpdateRegion changed_region
ePartialUpdateIterResult get_next_change()
Load the next changed region.
const ePartialUpdateCollectResult get_result_code() const
PartialUpdateChecker(Image *image, ImageUser *image_user, PartialUpdateUser *user)
PartialUpdateUser * user
the collected changes are stored inside the PartialUpdateUser.
Image * image
Not owned Image that is being iterated over.
CollectResult collect_changes()
Check for new changes since the last time this method was invoked for this user.
TileNumber tile_number
Tile number (UDIM) that this region belongs to.
void * BKE_image_get_tile