26struct PartialUpdateUser;
94 PartialUpdateUser *user);
97 PartialUpdateRegion *r_region);
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
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.
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
ePartialUpdateCollectResult get_result_code() const
TileData tile_data
Tile specific data.
PartialUpdateRegion changed_region
ePartialUpdateIterResult get_next_change()
Load the next changed region.
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.
rcti region
region of the image that has been updated. Region can be bigger than actual changes.
TileNumber tile_number
Tile number (UDIM) that this region belongs to.
void * BKE_image_get_tile