streamline DatabasePager::requiresUpdateSceneGraph()
would trigger unnecessary redraws when there were pending file requests or active database threads tested ok with and without IncrementalCompileOperation
This commit is contained in:
@@ -1371,10 +1371,7 @@ bool DatabasePager::getRequestsInProgress() const
|
||||
{
|
||||
if (getFileRequestListSize()>0) return true;
|
||||
|
||||
if (getDataToCompileListSize()>0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (getDataToCompileListSize()>0) return true;
|
||||
|
||||
if (getDataToMergeListSize()>0) return true;
|
||||
|
||||
@@ -1595,7 +1592,11 @@ void DatabasePager::setDatabasePagerThreadPause(bool pause)
|
||||
|
||||
bool DatabasePager::requiresUpdateSceneGraph() const
|
||||
{
|
||||
return !(_dataToMergeList->empty());
|
||||
if (getDataToCompileListSize()>0) return true;
|
||||
|
||||
if (getDataToMergeListSize()>0) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void DatabasePager::updateSceneGraph(const osg::FrameStamp& frameStamp)
|
||||
|
||||
@@ -116,7 +116,7 @@ void Scene::setImagePager(osgDB::ImagePager* ip)
|
||||
bool Scene::requiresUpdateSceneGraph() const
|
||||
{
|
||||
// check if the database pager needs to update the scene
|
||||
if (getDatabasePager()->requiresUpdateSceneGraph() || getDatabasePager()->getRequestsInProgress()) return true;
|
||||
if (getDatabasePager()->requiresUpdateSceneGraph()) return true;
|
||||
|
||||
// check if the image pager needs to update the scene
|
||||
if (getImagePager()->requiresUpdateSceneGraph()) return true;
|
||||
|
||||
@@ -1135,7 +1135,7 @@ bool View::requiresUpdateSceneGraph() const
|
||||
// check if there are camera update callbacks
|
||||
if (_camera->getUpdateCallback()) return true;
|
||||
|
||||
// check if there scene requires an update traversal
|
||||
// check if the scene requires an update traversal
|
||||
if (_scene.valid() && _scene->requiresUpdateSceneGraph()) return true;
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user