|
Blender V4.3
|
#include <BKE_bake_items_serialize.hh>
Inherits blender::NonCopyable, and blender::NonMovable.
Public Member Functions | |
| ~BlobWriteSharing () | |
| std::shared_ptr< io::serialize::DictionaryValue > | write_implicitly_shared (const ImplicitSharingInfo *sharing_info, FunctionRef< std::shared_ptr< io::serialize::DictionaryValue >()> write_fn) |
| std::shared_ptr< io::serialize::DictionaryValue > | write_deduplicated (BlobWriter &writer, const void *data, int64_t size_in_bytes) |
Allows deduplicating data before it's written.
Definition at line 82 of file BKE_bake_items_serialize.hh.
| blender::bke::bake::BlobWriteSharing::~BlobWriteSharing | ( | ) |
Definition at line 209 of file bake_items_serialize.cc.
|
nodiscard |
Checks if the given data was written before. If it was, it's not written again, but a reference to the previously written data is returned. If the data is new, it's written now. Its hash is remembered so that the same data won't be written again.
Definition at line 253 of file bake_items_serialize.cc.
References blender::bke::bake::BlobSlice::serialize(), and blender::bke::bake::BlobWriter::write().
Referenced by blender::bke::bake::write_blob_raw_bytes(), and blender::bke::bake::write_blob_raw_data_with_endian().
|
nodiscard |
Check if the data referenced by sharing_info has been written before. If yes, return the identifier for the previously written data. Otherwise, write the data now and store the identifier for later use.
Definition at line 225 of file bake_items_serialize.cc.
References blender::ImplicitSharingInfo::add_weak_user(), BLI_assert, and blender::ImplicitSharingInfo::version().
Referenced by blender::bke::bake::write_blob_shared_simple_gspan().