|
Blender V4.3
|
Namespaces | |
| namespace | detail |
Classes | |
| class | MEMFreeImplicitSharing |
Functions | |
| template<typename T > | |
| void | copy_shared_pointer (T *src_ptr, const ImplicitSharingInfo *src_sharing_info, T **r_dst_ptr, const ImplicitSharingInfo **r_dst_sharing_info) |
| template<typename T > | |
| void | free_shared_data (T **data, const ImplicitSharingInfo **sharing_info) |
| const ImplicitSharingInfo * | info_for_mem_free (void *data) |
| template<typename T > | |
| void | make_trivial_data_mutable (T **data, const ImplicitSharingInfo **sharing_info, const int64_t size) |
| template<typename T > | |
| void | resize_trivial_array (T **data, const ImplicitSharingInfo **sharing_info, int64_t old_size, int64_t new_size) |
| void blender::implicit_sharing::copy_shared_pointer | ( | T * | src_ptr, |
| const ImplicitSharingInfo * | src_sharing_info, | ||
| T ** | r_dst_ptr, | ||
| const ImplicitSharingInfo ** | r_dst_sharing_info ) |
Copy shared data from the source to the destination, adding a user count.
Definition at line 257 of file BLI_implicit_sharing.hh.
References BLI_assert.
Referenced by mesh_copy_data().
| void blender::implicit_sharing::free_shared_data | ( | T ** | data, |
| const ImplicitSharingInfo ** | sharing_info ) |
Remove this reference to the shared data and remove dangling pointers.
Definition at line 273 of file BLI_implicit_sharing.hh.
References BLI_assert.
Referenced by mesh_clear_geometry(), and blender::bke::CurvesGeometry::~CurvesGeometry().
| const ImplicitSharingInfo * blender::implicit_sharing::info_for_mem_free | ( | void * | data | ) |
Create an implicit sharing object that takes ownership of the data, allowing it to be shared. When it is no longer used, the data is freed with MEM_freeN, so it must be a trivial type.
Definition at line 31 of file implicit_sharing.cc.
Referenced by BKE_mesh_face_offsets_ensure_alloc(), BKE_packedfile_new_from_memory(), blender::bke::CurvesGeometry::blend_read(), blender::bke::CurvesGeometry::CurvesGeometry(), ED_mesh_join_objects_exec(), blender::implicit_sharing::detail::make_trivial_data_mutable_impl(), blender::bke::bake::read_blob_shared_simple_gspan(), blender::implicit_sharing::detail::resize_trivial_array_impl(), blender::tests::TEST(), and um_arraystore_expand().
| void blender::implicit_sharing::make_trivial_data_mutable | ( | T ** | data, |
| const ImplicitSharingInfo ** | sharing_info, | ||
| const int64_t | size ) |
Make data mutable (single-user) if it is shared. For trivially-copyable data only.
Definition at line 293 of file BLI_implicit_sharing.hh.
References blender::implicit_sharing::detail::make_trivial_data_mutable_impl().
Referenced by blender::bke::CurvesGeometry::offsets_for_write().
| void blender::implicit_sharing::resize_trivial_array | ( | T ** | data, |
| const ImplicitSharingInfo ** | sharing_info, | ||
| int64_t | old_size, | ||
| int64_t | new_size ) |
Resize an array of shared data. For trivially-copyable data only. Any new values are not initialized.
Definition at line 306 of file BLI_implicit_sharing.hh.
References blender::implicit_sharing::detail::resize_trivial_array_impl().
Referenced by blender::nodes::node_geo_extrude_mesh_cc::expand_mesh(), and blender::bke::CurvesGeometry::resize().