Blender  V3.3
Public Member Functions | Public Attributes | List of all members
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>

Inheritance diagram for blender::bke::image::partial_update::ImageTileData:
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. More...
 
void free_data () override
 Unload the data that has been loaded. More...
 

Public Attributes

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

Detailed Description

Load the ImageTile and ImBuf associated with the partial change.

Definition at line 141 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 170 of file BKE_image_partial_update.hh.

References ImageUser::framenr, image, image_user, and Image::lastframe.

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 189 of file BKE_image_partial_update.hh.

References BKE_image_release_ibuf(), image, 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 182 of file BKE_image_partial_update.hh.

References BKE_image_acquire_ibuf(), BKE_image_get_tile, image, 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 146 of file BKE_image_partial_update.hh.

Referenced by free_data(), ImageTileData(), and init_data().

◆ 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 154 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 160 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 167 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 168 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: