|
Blender V5.0
|
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 255 of file BLI_implicit_sharing.hh.
References BLI_assert, and T.
Referenced by blender::geometry::copy_and_reorder_mesh_edges(), blender::geometry::copy_and_reorder_mesh_verts(), copy_data(), copy_data(), copy_data(), copy_data(), correctivesmooth_modifier_do(), blender::geometry::create_curves_for_faces(), blender::ed::object::laplaciandeform_bind_exec(), mesh_copy_data(), blender::ed::sculpt_paint::undo::restore_geometry_data(), and blender::ed::sculpt_paint::undo::store_geometry_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 271 of file BLI_implicit_sharing.hh.
References BLI_assert, data, and T.
Referenced by blender::geometry::copy_and_reorder_mesh_edges(), blender::geometry::copy_and_reorder_mesh_verts(), blender::ed::object::correctivesmooth_bind_exec(), free_data(), free_data(), free_data(), freeBind(), blender::ed::sculpt_paint::undo::geometry_free_data(), blender::ed::object::laplaciandeform_bind_exec(), LaplacianDeformModifier_do(), mesh_clear_geometry(), mesh_free_data(), blender::ed::object::meshdeform_bind_exec(), surfacedeformBind(), 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 35 of file implicit_sharing.cc.
References data.
Referenced by blender::bke::attribute_init_to_data(), BKE_mesh_face_offsets_ensure_alloc(), BKE_modifier_mdef_compact_influences(), BKE_packedfile_new_from_memory(), blender::bke::CurvesGeometry::blend_read(), correctivesmooth_modifier_do(), blender::bke::CurvesGeometry::CurvesGeometry(), ED_mesh_deform_bind_callback(), blender::bke::Attribute::ArrayData::from_uninitialized(), blender::bke::Attribute::ArrayData::from_value(), blender::bke::Attribute::SingleData::from_value(), harmonic_coordinates_bind(), initSystem(), blender::implicit_sharing::detail::make_trivial_data_mutable_impl(), blender::bke::mesh_calc_edges(), blender::bke::bake::read_blob_shared_simple_gspan(), blender::implicit_sharing::detail::resize_trivial_array_impl(), blender::nodes::sharing_ptr_for_array(), blender::nodes::sharing_ptr_for_value(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), um_arraystore_cd_expand(), 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 291 of file BLI_implicit_sharing.hh.
References data, blender::implicit_sharing::detail::make_trivial_data_mutable_impl(), size(), and T.
Referenced by blender::bke::CurvesGeometry::nurbs_custom_knots_for_write(), and 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 304 of file BLI_implicit_sharing.hh.
References data, blender::implicit_sharing::detail::resize_trivial_array_impl(), and T.
Referenced by blender::nodes::node_geo_extrude_mesh_cc::expand_mesh(), mesh_add_faces(), blender::bke::CurvesGeometry::nurbs_custom_knots_resize(), blender::bke::CurvesGeometry::nurbs_custom_knots_update_size(), and blender::bke::CurvesGeometry::resize().