Skip to content

Commit

Permalink
Introduce AssetEntry.
Browse files Browse the repository at this point in the history
  • Loading branch information
kring committed Oct 28, 2024
1 parent 083cb92 commit 727a68d
Show file tree
Hide file tree
Showing 11 changed files with 451 additions and 215 deletions.
12 changes: 3 additions & 9 deletions Cesium3DTilesSelection/src/TilesetContentManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -666,9 +666,7 @@ TilesetContentManager::TilesetContentManager(
_tileLoadsInProgress{0},
_loadedTilesCount{0},
_tilesDataUsed{0},
_pSharedAssets(CesiumGltfReader::GltfSharedAssetSystem::getDefault(
CesiumGltfReader::AssetSystemOptions{
tilesetOptions.contentOptions.ktx2TranscodeTargets})),
_pSharedAssets(CesiumGltfReader::GltfSharedAssetSystem::getDefault()),
_destructionCompletePromise{externals.asyncSystem.createPromise<void>()},
_destructionCompleteFuture{
this->_destructionCompletePromise.getFuture().share()},
Expand Down Expand Up @@ -698,9 +696,7 @@ TilesetContentManager::TilesetContentManager(
_tileLoadsInProgress{0},
_loadedTilesCount{0},
_tilesDataUsed{0},
_pSharedAssets(CesiumGltfReader::GltfSharedAssetSystem::getDefault(
CesiumGltfReader::AssetSystemOptions{
tilesetOptions.contentOptions.ktx2TranscodeTargets})),
_pSharedAssets(CesiumGltfReader::GltfSharedAssetSystem::getDefault()),
_destructionCompletePromise{externals.asyncSystem.createPromise<void>()},
_destructionCompleteFuture{
this->_destructionCompletePromise.getFuture().share()},
Expand Down Expand Up @@ -852,9 +848,7 @@ TilesetContentManager::TilesetContentManager(
_tileLoadsInProgress{0},
_loadedTilesCount{0},
_tilesDataUsed{0},
_pSharedAssets(CesiumGltfReader::GltfSharedAssetSystem::getDefault(
CesiumGltfReader::AssetSystemOptions{
tilesetOptions.contentOptions.ktx2TranscodeTargets})),
_pSharedAssets(CesiumGltfReader::GltfSharedAssetSystem::getDefault()),
_destructionCompletePromise{externals.asyncSystem.createPromise<void>()},
_destructionCompleteFuture{
this->_destructionCompletePromise.getFuture().share()},
Expand Down
10 changes: 1 addition & 9 deletions CesiumAsync/include/CesiumAsync/SharedAsset.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,7 @@ class CESIUMASYNC_API SharedAsset : public CesiumUtility::ExtensibleObject {
mutable std::atomic<std::int32_t> _referenceCount{0};
IDepotOwningAsset<T>* _pDepot{nullptr};

protected:
mutable CesiumUtility::DoublyLinkedListPointers<T> _deletionListPointers;

private:
// The size of this asset when it was counted by the depot. This is stored so
// that the exact same size can be subtracted later.
mutable int64_t _sizeInDepot{0};

// To allow the depot to modify _pDepot and _sizeInDepot.
// To allow the depot to modify _pDepot.
template <typename TAssetType, typename TAssetKey>
friend class SharedAssetDepot;
};
Expand Down
Loading

0 comments on commit 727a68d

Please sign in to comment.