|
Blender V4.3
|
Classes | |
| class | AbstractTileData |
| Abstract class to load tile data when using the PartialUpdateChecker. More... | |
| struct | Changeset |
| Changeset keeping track of changes for an image. More... | |
| class | ImagePartialUpdateTest |
| class | ImageTileData |
| Load the ImageTile and ImBuf associated with the partial change. More... | |
| class | NoTileData |
| Class to not load any tile specific data when iterating over changes. More... | |
| struct | PartialUpdateChecker |
| struct | PartialUpdateRegion |
| A region to update. More... | |
| struct | PartialUpdateRegisterImpl |
| Partial update changes stored inside the image runtime. More... | |
| struct | PartialUpdateUserImpl |
| struct | TileChangeset |
| Dirty chunks of an ImageTile. More... | |
Typedefs | |
| using | ChangesetID = int64_t |
Enumerations | |
| enum class | ePartialUpdateCollectResult { FullUpdateNeeded , NoChangesDetected , PartialChangesDetected } |
| Result codes of #BKE_image_partial_update_collect_changes. More... | |
| enum class | ePartialUpdateIterResult { Finished = 0 , ChangeAvailable = 1 } |
| Return codes of #BKE_image_partial_update_get_next_change. More... | |
Functions | |
| 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) |
| static int | chunk_number_for_pixel (int pixel_offset) |
| get the chunk number for the give pixel coordinate. | |
| static PartialUpdateUser * | wrap (PartialUpdateUserImpl *user) |
| static PartialUpdateUserImpl * | unwrap (PartialUpdateUser *user) |
| static PartialUpdateRegister * | wrap (PartialUpdateRegisterImpl *partial_update_register) |
| static PartialUpdateRegisterImpl * | unwrap (PartialUpdateRegister *partial_update_register) |
| static PartialUpdateRegister * | image_partial_update_register_ensure (Image *image) |
| TEST_F (ImagePartialUpdateTest, mark_full_update) | |
| TEST_F (ImagePartialUpdateTest, mark_single_tile) | |
| TEST_F (ImagePartialUpdateTest, mark_unconnected_tiles) | |
| TEST_F (ImagePartialUpdateTest, donot_mark_outside_image) | |
| TEST_F (ImagePartialUpdateTest, mark_inside_image) | |
| TEST_F (ImagePartialUpdateTest, sequential_mark_region) | |
| TEST_F (ImagePartialUpdateTest, mark_multiple_chunks) | |
| TEST_F (ImagePartialUpdateTest, iterator) | |
Variables | |
| constexpr int | CHUNK_SIZE = 256 |
| Size of chunks to track changes. | |
| constexpr int | MAX_HISTORY_LEN = 4 |
| Max number of changesets to keep in history. | |
| constexpr ChangesetID | UnknownChangesetID = -1 |
| constexpr float | black_color [4] = {0.0f, 0.0f, 0.0f, 1.0f} |
Definition at line 129 of file image_partial_update.cc.
|
strong |
Result codes of BKE_image_partial_update_collect_changes.
Image partial updates.
Definition at line 40 of file BKE_image_partial_update.hh.
|
strong |
Return codes of BKE_image_partial_update_get_next_change.
| Enumerator | |
|---|---|
| Finished | no tiles left when iterating over tiles. |
| ChangeAvailable | a chunk was available and has been loaded. |
Definition at line 71 of file BKE_image_partial_update.hh.
| ePartialUpdateCollectResult blender::bke::image::partial_update::BKE_image_partial_update_collect_changes | ( | Image * | image, |
| PartialUpdateUser * | user ) |
collect the partial update since the last request.
Invoke BKE_image_partial_update_get_next_change to iterate over the collected tiles.
Definition at line 469 of file image_partial_update.cc.
References BLI_assert, BLI_rcti_init(), blender::bke::image::partial_update::PartialUpdateRegisterImpl::can_construct(), blender::bke::image::partial_update::PartialUpdateRegisterImpl::changed_tile_chunks_since(), CHUNK_SIZE, blender::bke::image::partial_update::PartialUpdateUserImpl::clear_updated_regions(), blender::bke::image::partial_update::PartialUpdateRegisterImpl::ensure_empty_changeset(), FullUpdateNeeded, image_partial_update_register_ensure(), blender::bke::image::partial_update::PartialUpdateRegisterImpl::last_changeset_id, blender::bke::image::partial_update::PartialUpdateUserImpl::last_changeset_id, LISTBASE_FOREACH, NoChangesDetected, PartialChangesDetected, tile, blender::bke::image::partial_update::PartialUpdateRegion::tile_number, unwrap(), and blender::bke::image::partial_update::PartialUpdateUserImpl::updated_regions.
Referenced by blender::bke::image::partial_update::PartialUpdateChecker< TileData >::collect_changes(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
| ePartialUpdateIterResult blender::bke::image::partial_update::BKE_image_partial_update_get_next_change | ( | PartialUpdateUser * | user, |
| PartialUpdateRegion * | r_region ) |
Definition at line 527 of file image_partial_update.cc.
References ChangeAvailable, Finished, unwrap(), and blender::bke::image::partial_update::PartialUpdateUserImpl::updated_regions.
Referenced by blender::bke::image::partial_update::PartialUpdateChecker< TileData >::CollectResult::get_next_change(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
get the chunk number for the give pixel coordinate.
As chunks are squares the this member can be used for both x and y axis.
Definition at line 85 of file image_partial_update.cc.
References CHUNK_SIZE.
Referenced by blender::bke::image::partial_update::TileChangeset::mark_region().
|
static |
Definition at line 459 of file image_partial_update.cc.
References wrap().
Referenced by BKE_image_partial_update_collect_changes(), BKE_image_partial_update_mark_full_update(), and BKE_image_partial_update_mark_region().
| blender::bke::image::partial_update::TEST_F | ( | ImagePartialUpdateTest | , |
| donot_mark_outside_image | ) |
Definition at line 181 of file image_partial_update_test.cc.
References BKE_image_partial_update_collect_changes(), BKE_image_partial_update_mark_region(), BLI_rcti_init(), EXPECT_EQ(), FullUpdateNeeded, NoChangesDetected, and result.
| blender::bke::image::partial_update::TEST_F | ( | ImagePartialUpdateTest | , |
| iterator | ) |
Definition at line 363 of file image_partial_update_test.cc.
References BKE_image_partial_update_mark_region(), BLI_rcti_init(), BLI_rcti_isect(), ChangeAvailable, blender::bke::image::partial_update::PartialUpdateChecker< TileData >::collect_changes(), EXPECT_EQ(), FullUpdateNeeded, NoChangesDetected, and PartialChangesDetected.
| blender::bke::image::partial_update::TEST_F | ( | ImagePartialUpdateTest | , |
| mark_full_update | ) |
Definition at line 91 of file image_partial_update_test.cc.
References BKE_image_partial_update_collect_changes(), BKE_image_partial_update_mark_full_update(), EXPECT_EQ(), FullUpdateNeeded, NoChangesDetected, and result.
| blender::bke::image::partial_update::TEST_F | ( | ImagePartialUpdateTest | , |
| mark_inside_image | ) |
Definition at line 236 of file image_partial_update_test.cc.
References BKE_image_partial_update_collect_changes(), BKE_image_partial_update_mark_region(), BLI_rcti_init(), EXPECT_EQ(), FullUpdateNeeded, NoChangesDetected, PartialChangesDetected, and result.
| blender::bke::image::partial_update::TEST_F | ( | ImagePartialUpdateTest | , |
| mark_multiple_chunks | ) |
Definition at line 332 of file image_partial_update_test.cc.
References BKE_image_partial_update_collect_changes(), BKE_image_partial_update_get_next_change(), BKE_image_partial_update_mark_region(), BLI_rcti_init(), BLI_rcti_isect(), ChangeAvailable, EXPECT_EQ(), FullUpdateNeeded, NoChangesDetected, PartialChangesDetected, blender::bke::image::partial_update::PartialUpdateRegion::region, and result.
| blender::bke::image::partial_update::TEST_F | ( | ImagePartialUpdateTest | , |
| mark_single_tile | ) |
Definition at line 111 of file image_partial_update_test.cc.
References BKE_image_partial_update_collect_changes(), BKE_image_partial_update_get_next_change(), BKE_image_partial_update_mark_region(), BLI_rcti_init(), BLI_rcti_inside_rcti(), ChangeAvailable, EXPECT_EQ(), Finished, FullUpdateNeeded, NoChangesDetected, PartialChangesDetected, blender::bke::image::partial_update::PartialUpdateRegion::region, and result.
| blender::bke::image::partial_update::TEST_F | ( | ImagePartialUpdateTest | , |
| mark_unconnected_tiles | ) |
Definition at line 143 of file image_partial_update_test.cc.
References BKE_image_partial_update_collect_changes(), BKE_image_partial_update_get_next_change(), BKE_image_partial_update_mark_region(), BLI_rcti_init(), BLI_rcti_inside_rcti(), ChangeAvailable, EXPECT_EQ(), Finished, FullUpdateNeeded, NoChangesDetected, PartialChangesDetected, blender::bke::image::partial_update::PartialUpdateRegion::region, and result.
| blender::bke::image::partial_update::TEST_F | ( | ImagePartialUpdateTest | , |
| sequential_mark_region | ) |
Definition at line 275 of file image_partial_update_test.cc.
References BKE_image_partial_update_collect_changes(), BKE_image_partial_update_get_next_change(), BKE_image_partial_update_mark_region(), BLI_rcti_init(), BLI_rcti_inside_rcti(), ChangeAvailable, EXPECT_EQ(), Finished, FullUpdateNeeded, NoChangesDetected, PartialChangesDetected, blender::bke::image::partial_update::PartialUpdateRegion::region, and result.
|
static |
Unwrap the PartialUpdateRegister C-struct to its CPP counterpart (PartialUpdateRegisterImpl).
Definition at line 124 of file image_partial_update.cc.
|
static |
Unwrap the PartialUpdateUser C-struct to its CPP counterpart (PartialUpdateUserImpl).
Definition at line 108 of file image_partial_update.cc.
Referenced by BKE_image_partial_update_collect_changes(), BKE_image_partial_update_free(), BKE_image_partial_update_get_next_change(), BKE_image_partial_update_mark_full_update(), BKE_image_partial_update_mark_region(), and BKE_image_partial_update_register_free().
|
static |
Wrap PartialUpdateRegisterImpl to its C-struct (PartialUpdateRegister).
Definition at line 116 of file image_partial_update.cc.
|
static |
Wrap PartialUpdateUserImpl to its C-struct (PartialUpdateUser).
Definition at line 100 of file image_partial_update.cc.
Referenced by BKE_image_partial_update_create(), and image_partial_update_register_ensure().
|
constexpr |
Definition at line 26 of file image_partial_update_test.cc.
|
constexpr |
Size of chunks to track changes.
Definition at line 66 of file image_partial_update.cc.
Referenced by BKE_image_partial_update_collect_changes(), chunk_number_for_pixel(), and blender::bke::image::partial_update::TileChangeset::update_resolution().
|
constexpr |
Max number of changesets to keep in history.
A higher number would need more memory and processing to calculate a changeset, but would lead to do partial updates for requests that don't happen every frame.
A to small number would lead to more full updates when changes couldn't be reconstructed from the available history.
Definition at line 78 of file image_partial_update.cc.
Referenced by blender::bke::image::partial_update::PartialUpdateRegisterImpl::limit_history().
|
constexpr |
Definition at line 130 of file image_partial_update.cc.