Blender V4.3
blender::bke::image::partial_update::ImageTileData Class Reference

Load the ImageTile and ImBuf associated with the partial change. More...

#include <BKE_image_partial_update.hh>

Inherits blender::bke::image::partial_update::AbstractTileData.

Public Member Functions

 ImageTileData (Image *image, ImageUser *image_user)
 
void init_data (TileNumber new_tile_number) override
 Load the data for the given tile_number.
 
void free_data () override
 Unload the data that has been loaded.
 

Public Attributes

Imageimage
 Not owned Image that is being iterated over.
 
ImageUser image_user = {0}
 Local copy of the image user.
 
ImageTiletile = nullptr
 ImageTile associated with the loaded tile. Data is not owned by this instance but by the image.
 
ImBuftile_buffer = nullptr
 ImBuf of the loaded tile.
 
void * tile_buffer_lock = nullptr
 

Detailed Description

Load the ImageTile and ImBuf associated with the partial change.

Definition at line 135 of file BKE_image_partial_update.hh.

Constructor & Destructor Documentation

◆ ImageTileData()

blender::bke::image::partial_update::ImageTileData::ImageTileData ( Image * image,
ImageUser * image_user )
inline

Definition at line 164 of file BKE_image_partial_update.hh.

References ImageUser::framenr, and image_user.

Member Function Documentation

◆ free_data()

void blender::bke::image::partial_update::ImageTileData::free_data ( )
inlineoverridevirtual

Unload the data that has been loaded.

Invoked when changes are on a different tile compared to the previous tile or when finished iterating over the changes.

Implements blender::bke::image::partial_update::AbstractTileData.

Definition at line 183 of file BKE_image_partial_update.hh.

References BKE_image_release_ibuf(), tile, tile_buffer, and tile_buffer_lock.

◆ init_data()

void blender::bke::image::partial_update::ImageTileData::init_data ( TileNumber tile_number)
inlineoverridevirtual

Load the data for the given tile_number.

Invoked when changes are on a different tile compared to the previous tile..

Implements blender::bke::image::partial_update::AbstractTileData.

Definition at line 176 of file BKE_image_partial_update.hh.

References BKE_image_acquire_ibuf(), BKE_image_get_tile, image_user, tile, ImageUser::tile, tile_buffer, and tile_buffer_lock.

Member Data Documentation

◆ image

Image* blender::bke::image::partial_update::ImageTileData::image

Not owned Image that is being iterated over.

Definition at line 140 of file BKE_image_partial_update.hh.

◆ image_user

ImageUser blender::bke::image::partial_update::ImageTileData::image_user = {0}

Local copy of the image user.

The local copy is required so we don't change the image user of the caller. We need to change it in order to request data for a specific tile.

Definition at line 148 of file BKE_image_partial_update.hh.

Referenced by ImageTileData(), and init_data().

◆ tile

ImageTile* blender::bke::image::partial_update::ImageTileData::tile = nullptr

ImageTile associated with the loaded tile. Data is not owned by this instance but by the image.

Definition at line 154 of file BKE_image_partial_update.hh.

Referenced by free_data(), and init_data().

◆ tile_buffer

ImBuf* blender::bke::image::partial_update::ImageTileData::tile_buffer = nullptr

ImBuf of the loaded tile.

Can be nullptr when the file doesn't exist or when the tile hasn't been initialized.

Definition at line 161 of file BKE_image_partial_update.hh.

Referenced by free_data(), and init_data().

◆ tile_buffer_lock

void* blender::bke::image::partial_update::ImageTileData::tile_buffer_lock = nullptr

Definition at line 162 of file BKE_image_partial_update.hh.

Referenced by free_data(), and init_data().


The documentation for this class was generated from the following file: