Moved SharedAsset and SharedAssetDepot into CesiumAsync.
Renamed SharedAssetSystem to GltfSharedAssetSystem and moved it to CesiumGltfReader.
Guard against the size of an asset changing in between when it's added to the deletion list and when it's removed, which would disrupt the depot size tracking.
Remove SharedAsset::isShareable. Even non-depot assets can be shared, so this method was misleading.
Lots of small tweaks to the shared asset system.
Make SharedAsset constructor and destructor protected, so instances of
this type can't be created directly.
Change the staleAssetSizeLimit to 16 MiB.
Add some defensive assertions.
Fix use-after-free when removing deletion candidates.
Still to do:
[x] Construct SharedAssetDepot with a Factory, instead of passing one in on getOrFetch call.
[x] Rename ImageCesium to ImageAsset.
[x] Put asset state documentation from #964 somewhere in the code.
[x] Convert non-Doxygen comments at the top of SharedAsset to Doxygen.
[x] Kind of vague, but I'm not happy with GltfSharedAssetSystem just yet.
This is a PR into #964.
SharedAsset
andSharedAssetDepot
intoCesiumAsync
.SharedAssetSystem
toGltfSharedAssetSystem
and moved it toCesiumGltfReader
.SharedAsset::isShareable
. Even non-depot assets can be shared, so this method was misleading.Still to do:
SharedAssetDepot
with a Factory, instead of passing one in ongetOrFetch
call.ImageCesium
toImageAsset
.GltfSharedAssetSystem
just yet.