Merge pull request #606 from CesiumGS/tracing-fixes
Fix compile error when tracing is enabled, disable trace tracks for raster overlays
This commit is contained in:
commit
6f7ff95ce7
|
|
@ -47,7 +47,7 @@ RasterOverlayCollection::~RasterOverlayCollection() noexcept {
|
|||
|
||||
void RasterOverlayCollection::add(
|
||||
const CesiumUtility::IntrusivePointer<RasterOverlay>& pOverlay) {
|
||||
CESIUM_TRACE_USE_TRACK_SET(this->_loadingSlots);
|
||||
// CESIUM_TRACE_USE_TRACK_SET(this->_loadingSlots);
|
||||
|
||||
if (!this->_pOverlays)
|
||||
this->_pOverlays = new OverlayList();
|
||||
|
|
@ -64,7 +64,7 @@ void RasterOverlayCollection::add(
|
|||
pList->tileProviders.emplace_back(pPlaceholder);
|
||||
pList->placeholders.emplace_back(pPlaceholder);
|
||||
|
||||
CESIUM_TRACE_BEGIN_IN_TRACK("createTileProvider");
|
||||
// CESIUM_TRACE_BEGIN_IN_TRACK("createTileProvider");
|
||||
|
||||
CesiumAsync::Future<RasterOverlay::CreateTileProviderResult> future =
|
||||
pOverlay->createTileProvider(
|
||||
|
|
@ -131,7 +131,7 @@ void RasterOverlayCollection::add(
|
|||
}
|
||||
}
|
||||
|
||||
CESIUM_TRACE_END_IN_TRACK("createTileProvider");
|
||||
// CESIUM_TRACE_END_IN_TRACK("createTileProvider");
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ void RasterOverlayTileProvider::doLoad(
|
|||
return;
|
||||
}
|
||||
|
||||
CESIUM_TRACE_USE_TRACK_SET(this->_loadingSlots);
|
||||
// CESIUM_TRACE_USE_TRACK_SET(this->_loadingSlots);
|
||||
|
||||
// Don't let this tile be destroyed while it's loading.
|
||||
tile.setState(RasterOverlayTile::LoadState::Loading);
|
||||
|
|
|
|||
|
|
@ -276,6 +276,9 @@ public:
|
|||
|
||||
int64_t getTracingID(size_t trackIndex) noexcept;
|
||||
|
||||
TrackSet(TrackSet&& rhs) noexcept;
|
||||
TrackSet& operator=(TrackSet&& rhs) noexcept;
|
||||
|
||||
private:
|
||||
struct Track {
|
||||
Track(int64_t id_, bool inUse_)
|
||||
|
|
|
|||
|
|
@ -212,6 +212,20 @@ int64_t TrackSet::getTracingID(size_t trackIndex) noexcept {
|
|||
return this->tracks[trackIndex].id;
|
||||
}
|
||||
|
||||
TrackSet::TrackSet(TrackSet&& rhs) noexcept : name(), tracks(), mutex() {
|
||||
std::scoped_lock lock(rhs.mutex);
|
||||
name = rhs.name;
|
||||
tracks = rhs.tracks;
|
||||
}
|
||||
|
||||
TrackSet& TrackSet::operator=(TrackSet&& rhs) noexcept {
|
||||
std::scoped_lock lock(rhs.mutex);
|
||||
std::scoped_lock lock2(this->mutex);
|
||||
name = std::move(rhs.name);
|
||||
tracks = std::move(rhs.tracks);
|
||||
return *this;
|
||||
}
|
||||
|
||||
LambdaCaptureTrack::LambdaCaptureTrack() : pSet(nullptr), index(0) {
|
||||
const TrackReference* pTrack = TrackReference::current();
|
||||
if (pTrack) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue