24 struct PartialUpdateRegister;
25 struct PartialUpdateUser;
32 namespace partial_update {
94 struct Image *
image,
struct PartialUpdateUser *user);
void BKE_image_release_ibuf(struct Image *ima, struct ImBuf *ibuf, void *lock)
struct ImBuf * BKE_image_acquire_ibuf(struct Image *ima, struct ImageUser *iuser, void **r_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.
void free_data() override
Unload the data that has been loaded.
void init_data(TileNumber UNUSED(new_tile_number)) override
NoTileData(Image *UNUSED(image), ImageUser *UNUSED(image_user))
depth_tx normal_tx diffuse_light_tx specular_light_tx volume_light_tx environment_tx ambient_occlusion_tx aov_value_tx in_weight_img image(1, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D_ARRAY, "out_weight_img") .image(3
void * BKE_image_get_tile
ePartialUpdateCollectResult BKE_image_partial_update_collect_changes(struct Image *image, struct PartialUpdateUser *user)
collect the partial update since the last request.
ePartialUpdateIterResult BKE_image_partial_update_get_next_change(struct PartialUpdateUser *user, struct 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.
struct 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.