From e3fde842b31d703ae640b7b9f0bbf0962863c55a Mon Sep 17 00:00:00 2001 From: zhongjin Date: Mon, 14 Nov 2022 20:20:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'simgear/scene/tsync/terra?= =?UTF-8?q?sync.cxx'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- simgear/scene/tsync/terrasync.cxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/simgear/scene/tsync/terrasync.cxx b/simgear/scene/tsync/terrasync.cxx index 288c8d5b..50c8fbbf 100644 --- a/simgear/scene/tsync/terrasync.cxx +++ b/simgear/scene/tsync/terrasync.cxx @@ -986,6 +986,8 @@ void SGTerraSync::WorkerThread::drainWaitingTiles() << " next._dir=" << next._dir << " cacheStatus=" << cacheStatus ); + +/* if (cacheStatus != SyncItem::Invalid) { incrementCacheHits(); SG_LOG(SG_TERRASYNC, SG_BULK, "TerraSync Cache hit for: '" << next._dir << "'"); @@ -997,6 +999,22 @@ void SGTerraSync::WorkerThread::drainWaitingTiles() const auto slot = syncSlotForType(next._type); SG_LOG(SG_TERRASYNC, SG_INFO, "adding to _syncSlots slot=" << slot); _syncSlots[slot].queue.push_back(next); +*/ + +//zhongjin 11-14 + + if (cacheStatus == SyncItem::Invalid) { + const auto slot = syncSlotForType(next._type); + SG_LOG(SG_TERRASYNC, SG_INFO, "adding to _syncSlots slot=" << slot); + _syncSlots[slot].queue.push_back(next); + continue; + } + + incrementCacheHits(); + SG_LOG(SG_TERRASYNC, SG_BULK, "TerraSync Cache hit for: '" << next._dir << "'"); + next._status = cacheStatus; + _freshTiles.push_back(next); + } }