|
Blender V4.3
|
#include "CLG_log.h"#include "MEM_guardedalloc.h"#include "BLI_blenlib.h"#include "BLI_map.hh"#include "BLI_threads.h"#include "BLI_utildefines.h"#include "DNA_image_types.h"#include "DNA_object_types.h"#include "DNA_screen_types.h"#include "DNA_space_types.h"#include "DNA_windowmanager_types.h"#include "IMB_imbuf.hh"#include "IMB_imbuf_types.hh"#include "BKE_context.hh"#include "BKE_image.hh"#include "BKE_paint.hh"#include "BKE_undo_system.hh"#include "DEG_depsgraph.hh"#include "ED_object.hh"#include "ED_paint.hh"#include "ED_undo.hh"#include "ED_util.hh"#include "WM_api.hh"Go to the source code of this file.
Classes | |
| struct | PaintTileKey |
| struct | PaintTile |
| struct | PaintTileMap |
| struct | UndoImageTile |
| struct | UndoImageBuf |
| struct | UndoImageHandle |
| struct | ImageUndoStep |
Functions | |
Paint Tiles | |
Created on demand while painting, use to access the previous state for some paint operations. These buffers are also used for undo when available. | |
| static ImBuf * | imbuf_alloc_temp_tile () |
| static void | ptile_free (PaintTile *ptile) |
| static void | ptile_invalidate_map (PaintTileMap *paint_tile_map) |
| void * | ED_image_paint_tile_find (PaintTileMap *paint_tile_map, Image *image, ImBuf *ibuf, ImageUser *iuser, int x_tile, int y_tile, ushort **r_mask, bool validate) |
| static uint8_t * | image_undo_steal_and_assign_byte_buffer (ImBuf *ibuf, uint8_t *new_buffer_data) |
| static float * | image_undo_steal_and_assign_float_buffer (ImBuf *ibuf, float *new_buffer_data) |
| void * | ED_image_paint_tile_push (PaintTileMap *paint_tile_map, Image *image, ImBuf *ibuf, ImBuf **tmpibuf, ImageUser *iuser, int x_tile, int y_tile, ushort **r_mask, bool **r_valid, bool use_thread_lock, bool find_prev) |
| static void | ptile_restore_runtime_map (PaintTileMap *paint_tile_map) |
Image Undo Tile | |
| static uint32_t | index_from_xy (uint32_t tile_x, uint32_t tile_y, const uint32_t tiles_dims[2]) |
| static UndoImageTile * | utile_alloc (bool has_float) |
| static void | utile_init_from_imbuf (UndoImageTile *utile, const uint32_t x, const uint32_t y, const ImBuf *ibuf, ImBuf *tmpibuf) |
| static void | utile_restore (const UndoImageTile *utile, const uint x, const uint y, ImBuf *ibuf, ImBuf *tmpibuf) |
| static void | utile_decref (UndoImageTile *utile) |
Image Undo Buffer | |
| static UndoImageBuf * | ubuf_from_image_no_tiles (Image *image, const ImBuf *ibuf) |
| static void | ubuf_from_image_all_tiles (UndoImageBuf *ubuf, const ImBuf *ibuf) |
| static void | ubuf_ensure_compat_ibuf (const UndoImageBuf *ubuf, ImBuf *ibuf) |
| static void | ubuf_free (UndoImageBuf *ubuf) |
Image Undo Handle | |
| static void | uhandle_restore_list (ListBase *undo_handles, bool use_init) |
| static void | uhandle_free_list (ListBase *undo_handles) |
Image Undo Internal Utilities | |
| static UndoImageBuf * | uhandle_lookup_ubuf (UndoImageHandle *uh, const Image *, const char *ibuf_filepath) |
| static UndoImageBuf * | uhandle_add_ubuf (UndoImageHandle *uh, Image *image, ImBuf *ibuf) |
| static UndoImageBuf * | uhandle_ensure_ubuf (UndoImageHandle *uh, Image *image, ImBuf *ibuf) |
| static UndoImageHandle * | uhandle_lookup_by_name (ListBase *undo_handles, const Image *image, int tile_number) |
| static UndoImageHandle * | uhandle_lookup (ListBase *undo_handles, const Image *image, int tile_number) |
| static UndoImageHandle * | uhandle_add (ListBase *undo_handles, Image *image, ImageUser *iuser) |
| static UndoImageHandle * | uhandle_ensure (ListBase *undo_handles, Image *image, ImageUser *iuser) |
Implements ED Undo System | |
| static UndoImageBuf * | ubuf_lookup_from_reference (ImageUndoStep *us_prev, const Image *image, int tile_number, const UndoImageBuf *ubuf) |
| static bool | image_undosys_poll (bContext *C) |
| static void | image_undosys_step_encode_init (bContext *, UndoStep *us_p) |
| static bool | image_undosys_step_encode (bContext *C, Main *, UndoStep *us_p) |
| static void | image_undosys_step_decode_undo_impl (ImageUndoStep *us, bool is_final) |
| static void | image_undosys_step_decode_redo_impl (ImageUndoStep *us) |
| static void | image_undosys_step_decode_undo (ImageUndoStep *us, bool is_final) |
| static void | image_undosys_step_decode_redo (ImageUndoStep *us) |
| static void | image_undosys_step_decode (bContext *C, Main *bmain, UndoStep *us_p, const eUndoStepDir dir, bool is_final) |
| static void | image_undosys_step_free (UndoStep *us_p) |
| static void | image_undosys_foreach_ID_ref (UndoStep *us_p, UndoTypeForEachIDRefFn foreach_ID_ref_fn, void *user_data) |
| void | ED_image_undosys_type (UndoType *ut) |
Utilities | |
Unlike most other undo stacks this is needed:
| |
| PaintTileMap * | ED_image_paint_tile_map_get () |
| void | ED_image_undo_restore (UndoStep *us) |
| static ImageUndoStep * | image_undo_push_begin (const char *name, PaintMode paint_mode) |
| void | ED_image_undo_push_begin (const char *name, PaintMode paint_mode) |
| void | ED_image_undo_push_begin_with_image (const char *name, Image *image, ImBuf *ibuf, ImageUser *iuser) |
| void | ED_image_undo_push_end () |
Variables | |
| static CLG_LogRef | LOG = {"ed.image.undo"} |
Thread Locking | |
| static SpinLock | paint_tiles_lock |
| void | ED_image_paint_tile_lock_init () |
| void | ED_image_paint_tile_lock_end () |
When the undo system manages an image, there will always be a full copy (as a UndoImageBuf) each new undo step only stores modified tiles.
Definition in file image_undo.cc.
| void * ED_image_paint_tile_find | ( | PaintTileMap * | paint_tile_map, |
| Image * | image, | ||
| ImBuf * | ibuf, | ||
| ImageUser * | iuser, | ||
| int | x_tile, | ||
| int | y_tile, | ||
| ushort ** | r_mask, | ||
| bool | validate ) |
Definition at line 159 of file image_undo.cc.
References ED_IMAGE_UNDO_TILE_SIZE, PaintTileKey::ibuf, image(), PaintTileKey::image, PaintTileKey::iuser_tile, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr(), PaintTileMap::map, PaintTile::mask, MEM_callocN, PaintTile::pt, PaintTile::rect, square_i(), ImageUser::tile, PaintTile::valid, PaintTileKey::x_tile, and PaintTileKey::y_tile.
Referenced by ED_image_paint_tile_push(), and paint_2d_do_making_brush().
| void ED_image_paint_tile_lock_end | ( | ) |
Definition at line 70 of file image_undo.cc.
References BLI_spin_end(), and paint_tiles_lock.
Referenced by project_paint_end().
| void ED_image_paint_tile_lock_init | ( | ) |
Definition at line 65 of file image_undo.cc.
References BLI_spin_init(), and paint_tiles_lock.
Referenced by proj_paint_state_thread_init().
| PaintTileMap * ED_image_paint_tile_map_get | ( | ) |
Definition at line 1085 of file image_undo.cc.
References BKE_undosys_stack_init_or_active_with_type(), BKE_UNDOSYS_TYPE_IMAGE, BLI_assert, ED_undo_stack_get(), ImageUndoStep::paint_mode, ImageUndoStep::paint_tile_map, UndoStack::step_init, and Texture2D.
Referenced by ED_imapaint_dirty_region(), paint_2d_do_making_brush(), project_paint_undo_subtiles(), and blender::ed::sculpt_paint::paint::image::push_undo().
| void * ED_image_paint_tile_push | ( | PaintTileMap * | paint_tile_map, |
| Image * | image, | ||
| ImBuf * | ibuf, | ||
| ImBuf ** | tmpibuf, | ||
| ImageUser * | iuser, | ||
| int | x_tile, | ||
| int | y_tile, | ||
| ushort ** | r_mask, | ||
| bool ** | r_valid, | ||
| bool | use_thread_lock, | ||
| bool | find_prev ) |
Definition at line 208 of file image_undo.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_or_modify(), BLI_spin_lock(), BLI_spin_unlock(), PaintTile::byte_ptr, data, ImBufFloatBuffer::data, ED_image_paint_tile_find(), ED_IMAGE_UNDO_TILE_SIZE, ImBuf::float_buffer, PaintTile::fp, PaintTile::ibuf, PaintTileKey::ibuf, image(), PaintTile::image, PaintTileKey::image, image_undo_steal_and_assign_byte_buffer(), image_undo_steal_and_assign_float_buffer(), IMB_rectcpy(), imbuf_alloc_temp_tile(), PaintTile::iuser, PaintTileKey::iuser_tile, PaintTileMap::map, PaintTile::mask, MEM_callocN, paint_tiles_lock, PaintTile::pt, ptile_free(), PaintTile::rect, ImageUser::scene, square_i(), ImageUser::tile, PaintTile::use_float, PaintTile::valid, PaintTile::x_tile, PaintTileKey::x_tile, PaintTile::y_tile, and PaintTileKey::y_tile.
Referenced by ED_imapaint_dirty_region(), project_paint_undo_subtiles(), and blender::ed::sculpt_paint::paint::image::push_undo().
| void ED_image_undo_push_begin | ( | const char * | name, |
| PaintMode | paint_mode ) |
The caller is responsible for running ED_image_undo_push_end, failure to do so causes an invalid state for the undo system.
Definition at line 1119 of file image_undo.cc.
References image_undo_push_begin().
Referenced by ED_imapaint_bucket_fill(), stroke_undo_begin(), texture_paint_camera_project_exec(), and blender::ed::sculpt_paint::image::ops::paint::texture_paint_init().
| void ED_image_undo_push_begin_with_image | ( | const char * | name, |
| Image * | image, | ||
| ImBuf * | ibuf, | ||
| ImageUser * | iuser ) |
Definition at line 1124 of file image_undo.cc.
References BKE_image_get_tile, BKE_UNDOSYS_TYPE_IMAGE, BLI_assert, ED_undo_stack_get(), ImageUndoStep::handles, image_undo_push_begin(), UndoImageBuf::post, UndoStep::prev, ImageUndoStep::step, UndoStack::step_active, Texture2D, ImageUser::tile, UndoImageBuf::tiles, UndoImageBuf::tiles_len, UndoStep::type, ubuf_from_image_all_tiles(), ubuf_lookup_from_reference(), uhandle_ensure(), uhandle_ensure_ubuf(), and UndoImageTile::users.
Referenced by image_flip_exec(), image_invert_exec(), image_rotate_orthogonal_exec(), and image_scale_exec().
| void ED_image_undo_push_end | ( | ) |
Definition at line 1157 of file image_undo.cc.
References BKE_undosys_stack_limit_steps_and_memory_defaults, BKE_undosys_step_push(), ED_undo_stack_get(), and WM_file_tag_modified().
Referenced by ED_imapaint_bucket_fill(), image_flip_exec(), image_invert_exec(), image_rotate_orthogonal_exec(), image_scale_exec(), blender::ed::sculpt_paint::image::ops::paint::paint_stroke_done(), stroke_undo_end(), and texture_paint_camera_project_exec().
| void ED_image_undo_restore | ( | UndoStep * | us | ) |
Restore painting image to previous state. Used for anchored and drag-dot style brushes.
Definition at line 1101 of file image_undo.cc.
References ptile_invalidate_map(), and ptile_restore_runtime_map().
Referenced by blender::ed::sculpt_paint::image::ops::paint::paint_stroke_update_step().
| void ED_image_undosys_type | ( | UndoType * | ut | ) |
Export for ED_undo_sys.
Definition at line 1051 of file image_undo.cc.
References UndoType::flags, image_undosys_foreach_ID_ref(), image_undosys_poll(), image_undosys_step_decode(), image_undosys_step_encode(), image_undosys_step_encode_init(), image_undosys_step_free(), UndoType::name, UndoType::poll, UndoType::step_decode, UndoType::step_encode, UndoType::step_encode_init, UndoType::step_foreach_ID_ref, UndoType::step_free, UndoType::step_size, and UNDOTYPE_FLAG_DECODE_ACTIVE_STEP.
Referenced by ED_undosys_type_init().
|
static |
Definition at line 1108 of file image_undo.cc.
References BKE_undosys_step_push_init_with_type(), BKE_UNDOSYS_TYPE_IMAGE, BLI_assert, ED_undo_stack_get(), ELEM, ImageUndoStep::paint_mode, Sculpt, Texture2D, and Texture3D.
Referenced by ED_image_undo_push_begin(), and ED_image_undo_push_begin_with_image().
|
static |
Definition at line 195 of file image_undo.cc.
References IB_TAKE_OWNERSHIP, IMB_assign_byte_buffer(), and IMB_steal_byte_buffer().
Referenced by ED_image_paint_tile_push(), ptile_restore_runtime_map(), and utile_init_from_imbuf().
|
static |
Definition at line 201 of file image_undo.cc.
References IB_TAKE_OWNERSHIP, IMB_assign_float_buffer(), and IMB_steal_float_buffer().
Referenced by ED_image_paint_tile_push(), ptile_restore_runtime_map(), and utile_init_from_imbuf().
|
static |
Definition at line 1041 of file image_undo.cc.
References ImageUndoStep::handles, and LISTBASE_FOREACH.
Referenced by ED_image_undosys_type().
|
static |
Definition at line 787 of file image_undo.cc.
References CTX_data_active_object(), CTX_wm_area(), Object::mode, SpaceImage::mode, OB_MODE_TEXTURE_PAINT, SI_MODE_PAINT, and SPACE_IMAGE.
Referenced by ED_image_undosys_type().
|
static |
Definition at line 1009 of file image_undo.cc.
References BLI_assert, ED_editors_init_for_undo(), image_undosys_step_decode_redo(), image_undosys_step_decode_undo(), blender::ed::object::mode_set_ex(), OB_MODE_TEXTURE_PAINT, ImageUndoStep::paint_mode, STEP_INVALID, STEP_REDO, STEP_UNDO, and Texture3D.
Referenced by ED_image_undosys_type().
|
static |
Definition at line 991 of file image_undo.cc.
References image_undosys_step_decode_redo_impl(), UndoStep::is_applied, UndoStep::next, UndoStep::prev, ImageUndoStep::step, and UndoStep::type.
Referenced by image_undosys_step_decode().
|
static |
Definition at line 963 of file image_undo.cc.
References BLI_assert, ImageUndoStep::handles, UndoStep::is_applied, ImageUndoStep::step, and uhandle_restore_list().
Referenced by image_undosys_step_decode_redo().
|
static |
Definition at line 970 of file image_undo.cc.
References BLI_assert, image_undosys_step_decode_undo_impl(), UndoStep::is_applied, UndoStep::next, UndoStep::prev, ImageUndoStep::step, and UndoStep::type.
Referenced by image_undosys_step_decode().
|
static |
Definition at line 956 of file image_undo.cc.
References BLI_assert, ImageUndoStep::handles, UndoStep::is_applied, ImageUndoStep::step, and uhandle_restore_list().
Referenced by image_undosys_step_decode_undo().
Definition at line 815 of file image_undo.cc.
References BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), BKE_paintmode_get_active_from_context(), BKE_UNDOSYS_TYPE_IMAGE, BLI_assert, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear(), ImBufFloatBuffer::data, UndoStep::data_size, ED_IMAGE_UNDO_TILE_BITS, ED_undo_stack_get(), ELEM, ImBuf::float_buffer, ImageUndoStep::handles, UndoImageBuf::image_dims, IMB_freeImBuf(), imbuf_alloc_temp_tile(), index_from_xy(), UndoStep::is_applied, ImageUndoStep::is_encode_init, LISTBASE_FOREACH, PaintTileMap::map, MEM_callocN, ImageUndoStep::paint_mode, ImageUndoStep::paint_tile_map, UndoImageBuf::post, UndoStep::prev, UndoImageTile::pt, ptile_free(), UndoImageTile::rect, ImageUndoStep::step, UndoStack::step_active, Texture2D, Texture3D, tile_index, UndoImageBuf::tiles, UndoImageBuf::tiles_dims, UndoImageBuf::tiles_len, UndoStep::type, ubuf_from_image_all_tiles(), ubuf_from_image_no_tiles(), ubuf_lookup_from_reference(), uhandle_ensure(), uhandle_ensure_ubuf(), uhandle_restore_list(), UndoImageTile::users, utile_alloc(), utile_init_from_imbuf(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::values().
Referenced by ED_image_undosys_type().
Definition at line 806 of file image_undo.cc.
References BLI_listbase_clear(), ImageUndoStep::handles, ImageUndoStep::is_encode_init, and ImageUndoStep::paint_tile_map.
Referenced by ED_image_undosys_type().
|
static |
Definition at line 1031 of file image_undo.cc.
References ImageUndoStep::handles, ImageUndoStep::paint_tile_map, and uhandle_free_list().
Referenced by ED_image_undosys_type().
|
static |
Definition at line 87 of file image_undo.cc.
References ED_IMAGE_UNDO_TILE_SIZE, IB_rect, IB_rectfloat, and IMB_allocImBuf().
Referenced by ED_image_paint_tile_push(), image_undosys_step_encode(), ptile_restore_runtime_map(), ubuf_from_image_all_tiles(), and uhandle_restore_list().
|
static |
Definition at line 367 of file image_undo.cc.
References BLI_assert.
Referenced by image_undosys_step_encode().
|
static |
Definition at line 130 of file image_undo.cc.
References PaintTile::mask, MEM_freeN(), PaintTile::pt, and PaintTile::rect.
Referenced by ED_image_paint_tile_push(), image_undosys_step_encode(), and PaintTileMap::~PaintTileMap().
|
static |
Definition at line 152 of file image_undo.cc.
References PaintTileMap::map, and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::values().
Referenced by ED_image_undo_restore().
|
static |
Definition at line 308 of file image_undo.cc.
References BKE_image_acquire_ibuf(), BKE_image_free_gputextures(), BKE_image_release_ibuf(), ImBufFloatBuffer::data, ED_IMAGE_UNDO_TILE_SIZE, ImBuf::float_buffer, IB_DISPLAY_BUFFER_INVALID, IB_MIPMAP_INVALID, IB_RECT_INVALID, image_undo_steal_and_assign_byte_buffer(), image_undo_steal_and_assign_float_buffer(), IMB_freeImBuf(), IMB_rectcpy(), imbuf_alloc_temp_tile(), PaintTileMap::map, ImBuf::mipmap, ImBuf::userflags, and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::values().
Referenced by ED_image_undo_restore().
|
static |
Ensure we can copy the ubuf into the ibuf.
Definition at line 532 of file image_undo.cc.
References ImBuf::byte_buffer, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, UndoImageBuf::image_dims, UndoImageBuf::image_state, imb_addrectfloatImBuf(), imb_addrectImBuf(), imb_freerectfloatImBuf(), imb_freerectImbuf_all(), IMB_rect_size_set(), UndoImageBuf::use_float, ImBuf::x, and ImBuf::y.
Referenced by uhandle_restore_list().
|
static |
Definition at line 558 of file image_undo.cc.
References MEM_freeN(), UndoImageBuf::post, UndoImageBuf::tiles, UndoImageBuf::tiles_len, ubuf_free(), and utile_decref().
Referenced by ubuf_free(), and uhandle_free_list().
|
static |
Definition at line 505 of file image_undo.cc.
References BLI_assert, ImBufFloatBuffer::data, ED_IMAGE_UNDO_TILE_BITS, ImBuf::float_buffer, IMB_freeImBuf(), imbuf_alloc_temp_tile(), UndoImageBuf::tiles, UndoImageBuf::tiles_dims, UndoImageBuf::tiles_len, UndoImageTile::users, utile_alloc(), and utile_init_from_imbuf().
Referenced by ED_image_undo_push_begin_with_image(), and image_undosys_step_encode().
|
static |
Definition at line 484 of file image_undo.cc.
References ImBufFloatBuffer::data, ED_IMAGE_UNDO_TILE_NUMBER, ImBuf::filepath, ImBuf::float_buffer, UndoImageBuf::ibuf_filepath, UndoImageBuf::image_dims, UndoImageBuf::image_state, MEM_callocN, UndoImageBuf::source, STRNCPY, UndoImageBuf::tiles, UndoImageBuf::tiles_dims, UndoImageBuf::tiles_len, UndoImageBuf::use_float, ImBuf::x, and ImBuf::y.
Referenced by image_undosys_step_encode(), and uhandle_add_ubuf().
|
static |
Find the previous undo buffer from this one.
Definition at line 766 of file image_undo.cc.
References ImageUndoStep::handles, UndoImageBuf::ibuf_filepath, UndoImageBuf::image_dims, UndoImageBuf::post, uhandle_lookup_by_name(), and uhandle_lookup_ubuf().
Referenced by ED_image_undo_push_begin_with_image(), and image_undosys_step_encode().
|
static |
Definition at line 720 of file image_undo.cc.
References BLI_addtail(), BLI_assert, image(), UndoImageHandle::image_ref, UndoImageHandle::iuser, MEM_callocN, ImageUser::scene, ImageUser::tile, and uhandle_lookup().
Referenced by uhandle_ensure().
|
static |
Definition at line 678 of file image_undo.cc.
References BLI_addtail(), BLI_assert, UndoImageHandle::buffers, ImBuf::filepath, UndoImageBuf::post, ubuf_from_image_no_tiles(), and uhandle_lookup_ubuf().
Referenced by uhandle_ensure_ubuf().
|
static |
Definition at line 731 of file image_undo.cc.
References ImageUser::tile, uhandle_add(), and uhandle_lookup().
Referenced by ED_image_undo_push_begin_with_image(), and image_undosys_step_encode().
|
static |
Definition at line 689 of file image_undo.cc.
References ImBuf::filepath, uhandle_add_ubuf(), and uhandle_lookup_ubuf().
Referenced by ED_image_undo_push_begin_with_image(), and image_undosys_step_encode().
|
static |
Definition at line 647 of file image_undo.cc.
References BLI_listbase_clear(), LISTBASE_FOREACH_MUTABLE, MEM_freeN(), and ubuf_free().
Referenced by image_undosys_step_free().
|
static |
Definition at line 710 of file image_undo.cc.
References LISTBASE_FOREACH.
Referenced by uhandle_add(), and uhandle_ensure().
|
static |
Definition at line 698 of file image_undo.cc.
References LISTBASE_FOREACH, and STREQ.
Referenced by ubuf_lookup_from_reference().
|
static |
UndoImageHandle utilities
Definition at line 666 of file image_undo.cc.
References UndoImageHandle::buffers, LISTBASE_FOREACH, and STREQ.
Referenced by ubuf_lookup_from_reference(), uhandle_add_ubuf(), and uhandle_ensure_ubuf().
|
static |
Definition at line 596 of file image_undo.cc.
References BKE_image_acquire_ibuf(), BKE_image_mark_dirty(), BKE_image_partial_update_mark_full_update(), BKE_image_release_ibuf(), CLOG_ERROR, ImBufFloatBuffer::data, DEG_id_tag_update(), ED_IMAGE_UNDO_TILE_BITS, ImBuf::float_buffer, IB_DISPLAY_BUFFER_INVALID, IB_MIPMAP_INVALID, IB_RECT_INVALID, IMB_freeImBuf(), imbuf_alloc_temp_tile(), LISTBASE_FOREACH, LOG, ImBuf::mipmap, UndoImageBuf::post, UndoImageBuf::tiles, UndoImageBuf::tiles_dims, ubuf_ensure_compat_ibuf(), UNLIKELY, ImBuf::userflags, and utile_restore().
Referenced by image_undosys_step_decode_redo_impl(), image_undosys_step_decode_undo_impl(), and image_undosys_step_encode().
|
static |
Definition at line 382 of file image_undo.cc.
References UndoImageTile::byte_ptr, ED_IMAGE_UNDO_TILE_SIZE, UndoImageTile::fp, MEM_callocN, MEM_mallocN, UndoImageTile::rect, and square_i().
Referenced by image_undosys_step_encode(), and ubuf_from_image_all_tiles().
|
static |
Definition at line 443 of file image_undo.cc.
References BLI_assert, MEM_freeN(), UndoImageTile::pt, UndoImageTile::rect, and UndoImageTile::users.
Referenced by ubuf_free().
|
static |
Definition at line 397 of file image_undo.cc.
References UndoImageTile::byte_ptr, ImBufFloatBuffer::data, ED_IMAGE_UNDO_TILE_SIZE, ImBuf::float_buffer, UndoImageTile::fp, image_undo_steal_and_assign_byte_buffer(), image_undo_steal_and_assign_float_buffer(), IMB_rectcpy(), and UndoImageTile::rect.
Referenced by image_undosys_step_encode(), and ubuf_from_image_all_tiles().
|
static |
Definition at line 421 of file image_undo.cc.
References ImBuf::byte_buffer, UndoImageTile::byte_ptr, ImBufByteBuffer::data, ImBufFloatBuffer::data, ED_IMAGE_UNDO_TILE_SIZE, ImBuf::float_buffer, UndoImageTile::fp, IMB_rectcpy(), and UndoImageTile::rect.
Referenced by uhandle_restore_list().
|
static |
Definition at line 54 of file image_undo.cc.
Referenced by uhandle_restore_list().
|
static |
Definition at line 63 of file image_undo.cc.
Referenced by ED_image_paint_tile_lock_end(), ED_image_paint_tile_lock_init(), and ED_image_paint_tile_push().