Blender
V3.3
|
#include <optional>
#include "BKE_image.h"
#include "BKE_image_partial_update.hh"
#include "DNA_image_types.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "BLI_vector.hh"
Go to the source code of this file.
Classes | |
struct | blender::bke::image::partial_update::PartialUpdateUserImpl |
struct | blender::bke::image::partial_update::TileChangeset |
Dirty chunks of an ImageTile. More... | |
struct | blender::bke::image::partial_update::Changeset |
Changeset keeping track of changes for an image. More... | |
struct | blender::bke::image::partial_update::PartialUpdateRegisterImpl |
Partial update changes stored inside the image runtime. More... | |
Namespaces | |
blender | |
blender::bke | |
blender::bke::image | |
blender::bke::image::partial_update | |
Typedefs | |
using | blender::bke::image::partial_update::TileNumber = int32_t |
using | blender::bke::image::partial_update::ChangesetID = int64_t |
Variables | |
constexpr int | blender::bke::image::partial_update::CHUNK_SIZE = 256 |
Size of chunks to track changes. More... | |
constexpr int | blender::bke::image::partial_update::MAX_HISTORY_LEN = 4 |
Max number of changesets to keep in history. More... | |
constexpr ChangesetID | blender::bke::image::partial_update::UnknownChangesetID = -1 |
To reduce the overhead of image processing this file contains a mechanism to detect areas of the image that are changed. These areas are organized in chunks. Changes that happen over time are organized in changesets.
A common use case is to update GPUTexture for drawing where only that part is uploaded that only changed.
Usage:
Definition in file image_partial_update.cc.
struct PartialUpdateUser* BKE_image_partial_update_create | ( | const struct Image * | image | ) |
Create a new PartialUpdateUser. An Object that contains data to use partial updates.
Definition at line 546 of file image_partial_update.cc.
References image(), UNUSED_VARS, and blender::bke::image::partial_update::wrap().
Referenced by image_get_gpu_texture(), and blender::bke::image::partial_update::ImagePartialUpdateTest::SetUp().
void BKE_image_partial_update_free | ( | PartialUpdateUser * | user | ) |
free a partial update user.
Definition at line 559 of file image_partial_update.cc.
References blender::bke::image::partial_update::unwrap().
Referenced by image_runtime_free_data(), and blender::bke::image::partial_update::ImagePartialUpdateTest::TearDown().
Mark the whole image to be updated.
Definition at line 587 of file image_partial_update.cc.
References image(), blender::bke::image::partial_update::image_partial_update_register_ensure(), blender::bke::image::partial_update::PartialUpdateRegisterImpl::mark_full_update(), and blender::bke::image::partial_update::unwrap().
Referenced by blender::bke::pbvh::pixels::apply_watertight_check(), bake_targets_refresh(), BKE_image_acquire_renderresult(), BKE_image_add_tile(), BKE_image_reassign_tile(), BKE_image_update_gputexture_delayed(), BKE_image_user_frame_calc(), current_scene_update(), blender::compositor::CompositorOperation::deinit_execution(), ED_image_slot_cycle(), image_flip_exec(), image_free_tile(), image_invert_exec(), image_listener(), image_scale_exec(), image_tag_reload(), multiresbake_freejob(), screen_opengl_render_apply(), blender::bke::image::partial_update::TEST_F(), uhandle_restore_list(), and update_image_from_plane_marker_exec().
void BKE_image_partial_update_mark_region | ( | Image * | image, |
const ImageTile * | image_tile, | ||
const ImBuf * | image_buffer, | ||
const rcti * | updated_region | ||
) |
Definition at line 577 of file image_partial_update.cc.
References image(), blender::bke::image::partial_update::image_partial_update_register_ensure(), blender::bke::image::partial_update::PartialUpdateRegisterImpl::mark_region(), blender::bke::image::partial_update::unwrap(), and blender::bke::image::partial_update::PartialUpdateRegisterImpl::update_resolution().
Definition at line 567 of file image_partial_update.cc.
References image(), and blender::bke::image::partial_update::unwrap().
Referenced by image_runtime_free_data().