|
Blender V5.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) |
| template<typename T> | |
| const ImplicitSharingInfo * | info_for_mem_free (T *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 271 of file BLI_implicit_sharing.hh.
References blender::BLI_assert(), copy_shared_pointer(), and T.
Referenced by blender::geometry::copy_and_reorder_mesh_edges(), blender::geometry::copy_and_reorder_mesh_verts(), blender::copy_data(), copy_shared_pointer(), blender::correctivesmooth_modifier_do(), blender::geometry::create_curves_for_faces(), blender::nodes::node_geo_construct_curves_cc::create_curves_from_topology_info(), blender::ed::object::laplaciandeform_bind_exec(), blender::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 287 of file BLI_implicit_sharing.hh.
References blender::BLI_assert(), blender::data, free_shared_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(), blender::free_data(), free_shared_data(), blender::freeBind(), blender::ed::sculpt_paint::undo::geometry_free_data(), blender::ed::object::laplaciandeform_bind_exec(), blender::LaplacianDeformModifier_do(), blender::mesh_clear_geometry(), blender::mesh_free_data(), blender::ed::object::meshdeform_bind_exec(), blender::surfacedeformBind(), blender::um_arraystore_compact(), blender::um_arraystore_expand_clear(), and blender::bke::CurvesGeometry::~CurvesGeometry().
| const ImplicitSharingInfo * blender::implicit_sharing::info_for_mem_free | ( | T * | 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_delete, so it must be a trivial type.
Definition at line 301 of file BLI_implicit_sharing.hh.
References blender::data, info_for_mem_free(), blender::implicit_sharing::detail::info_for_mem_free_impl(), and T.
Referenced by blender::ImBuf::assign_byte_data(), blender::ImBuf::assign_float_data(), blender::BKE_mesh_calc_edges_tessface(), blender::BKE_mesh_face_offsets_ensure_alloc(), blender::BKE_modifier_mdef_compact_influences(), blender::BKE_packedfile_new_from_memory(), blender::bke::CurvesGeometry::blend_read(), blender::ImBuf::byte_data_for_write(), blender::correctivesmooth_modifier_do(), blender::nodes::node_geo_distribute_points_on_faces_cc::create_points_random(), blender::bke::CurvesGeometry::CurvesGeometry(), blender::ED_mesh_deform_bind_callback(), blender::ImBuf::float_data_for_write(), blender::harmonic_coordinates_bind(), blender::imb_alloc_buffer(), info_for_mem_free(), blender::initSystem(), blender::mesh_blend_read_data(), blender::bke::mesh_calc_edges(), blender::bke::remove_invalid_edges(), blender::bke::remove_invalid_faces(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::um_arraystore_cd_expand(), and blender::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 313 of file BLI_implicit_sharing.hh.
References blender::data, make_trivial_data_mutable(), blender::implicit_sharing::detail::make_trivial_data_mutable_impl(), and T.
Referenced by make_trivial_data_mutable(), 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 326 of file BLI_implicit_sharing.hh.
References blender::data, resize_trivial_array(), blender::implicit_sharing::detail::resize_trivial_array_impl(), and T.
Referenced by blender::nodes::node_geo_extrude_mesh_cc::expand_mesh(), blender::mesh_add_faces(), blender::bke::CurvesGeometry::nurbs_custom_knots_resize(), blender::bke::CurvesGeometry::nurbs_custom_knots_update_size(), blender::bke::CurvesGeometry::resize(), and resize_trivial_array().