Removed deperecated variables that are no longer used.

This commit is contained in:
Robert Osfield 2010-11-29 09:32:43 +00:00
parent b523cb15c1
commit 0739c15e0a
2 changed files with 12 additions and 148 deletions

View File

@ -234,31 +234,6 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl
unsigned int getTargetMaximumNumberOfPageLOD() const { return _targetMaximumNumberOfPageLOD; }
/** Deprecated.*/
void setExpiryDelay(double expiryDelay) { _expiryDelay = expiryDelay; }
/** Deprecated.*/
double getExpiryDelay() const { return _expiryDelay; }
/** Deprecated.*/
void setExpiryFrames(int expiryFrames) { _expiryFrames = expiryFrames; }
/** Deprecated.*/
int getExpiryFrames() const { return _expiryFrames; }
/** Deprecated.*/
void setReleaseDelay(double releaseDelay);
/** Deprecated.*/
double getReleaseDelay() const { return _releaseDelay; }
/** Deprecated.*/
void setReleaseFrames(int releaseFrames) { _releaseFrames = releaseFrames; }
/** Deprecated.*/
int getReleaseFrames() const { return _releaseFrames; }
/** Set whether the removed subgraphs should be deleted in the database thread or not.*/
void setDeleteRemovedSubgraphsInDatabaseThread(bool flag) { _deleteRemovedSubgraphsInDatabaseThread = flag; }
@ -587,7 +562,7 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl
void compileCompleted(DatabaseRequest* databaseRequest);
/** Iterate through the active PagedLOD nodes children removing
/** Iterate through the active PagedLOD nodes children removing
* children which havn't been visited since specified expiryTime.
* note, should be only be called from the update thread. */
virtual void removeExpiredSubgraphs(const osg::FrameStamp &frameStamp);
@ -599,7 +574,7 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl
bool _done;
bool _acceptNewRequests;
bool _databasePagerThreadPaused;
DatabaseThreadList _databaseThreads;
int _numFramesActive;
@ -609,7 +584,7 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl
osg::ref_ptr<ReadQueue> _fileRequestQueue;
osg::ref_ptr<ReadQueue> _httpRequestQueue;
osg::ref_ptr<RequestQueue> _dataToCompileList;
DrawablePolicy _drawablePolicy;
@ -622,39 +597,33 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl
bool _deleteRemovedSubgraphsInDatabaseThread;
osg::ref_ptr<RequestQueue> _dataToMergeList;
osg::ref_ptr<PagedLODList> _activePagedLODList;
osg::ref_ptr<PagedLODList> _inactivePagedLODList;
unsigned int _targetMaximumNumberOfPageLOD;
double _expiryDelay;
int _expiryFrames;
double _releaseDelay;
int _releaseFrames;
ActiveGraphicsContexts _activeGraphicsContexts;
// CompileGraphicsContexts _compileGraphicsContexts;
bool _doPreCompile;
osg::ref_ptr<osgUtil::IncrementalCompileOperation> _incrementalCompileOperation;
double _targetFrameRate;
double _minimumTimeAvailableForGLCompileAndDeletePerFrame;
unsigned int _maximumNumOfObjectsToCompilePerFrame;
double _minimumTimeToMergeTile;
double _maximumTimeToMergeTile;
double _totalTimeToMergeTiles;
unsigned int _numTilesMerges;
struct CompileOperation : public osg::GraphicsOperation
{
CompileOperation(DatabasePager* databasePager);
virtual void operator () (osg::GraphicsContext* context);
osg::observer_ptr<DatabasePager> _databasePager;
};
};

View File

@ -1169,47 +1169,6 @@ DatabasePager::DatabasePager()
}
_expiryDelay = 10.0;
if( (ptr = getenv("OSG_EXPIRY_DELAY")) != 0)
{
_expiryDelay = osg::asciiToDouble(ptr);
OSG_NOTICE<<"DatabasePager: Expiry delay = "<<_expiryDelay<<std::endl;
}
_expiryFrames = 1; // Last frame will not be expired
if( (ptr = getenv("OSG_EXPIRY_FRAMES")) != 0)
{
_expiryFrames = atoi(ptr);
OSG_NOTICE<<"DatabasePager: Expiry frames = "<<_expiryFrames<<std::endl;
}
if( (ptr = getenv("OSG_RELEASE_DELAY")) != 0)
{
if (strcmp(ptr,"OFF")==0 || strcmp(ptr,"Off")==0 || strcmp(ptr,"off")==0)
{
setReleaseDelay(DBL_MAX);
}
else
{
setReleaseDelay(osg::asciiToDouble(ptr));
}
OSG_NOTICE<<"DatabasePager: Release delay = "<<_releaseDelay<<std::endl;
}
else
{
setReleaseDelay(DBL_MAX);
}
_releaseFrames = 1; // Last frame will not be release
if( (ptr = getenv("OSG_RELEASE_FRAMES")) != 0)
{
_releaseFrames = atoi(ptr);
OSG_NOTICE<<"Release frames = "<<_releaseFrames<<std::endl;
}
_targetMaximumNumberOfPageLOD = 300;
if( (ptr = getenv("OSG_MAX_PAGEDLOD")) != 0)
{
@ -1312,13 +1271,8 @@ DatabasePager::DatabasePager(const DatabasePager& rhs)
_deleteRemovedSubgraphsInDatabaseThread = rhs._deleteRemovedSubgraphsInDatabaseThread;
_expiryDelay = rhs._expiryDelay;
_expiryFrames = rhs._expiryFrames;
_releaseDelay = rhs._releaseDelay;
_releaseFrames = rhs._releaseFrames;
_targetMaximumNumberOfPageLOD = rhs._targetMaximumNumberOfPageLOD;
_doPreCompile = rhs._doPreCompile;
@ -1417,23 +1371,6 @@ unsigned int DatabasePager::addDatabaseThread(DatabaseThread::Mode mode, const s
return pos;
}
void DatabasePager::setReleaseDelay(double releaseDelay)
{
_releaseDelay = releaseDelay;
if (_releaseDelay==DBL_MAX)
{
_changeAutoUnRef = true;
_valueAutoUnRef = true;
}
else
{
// when GLObject release is used make sure Images aren't unref'd as they may be needed later.
_changeAutoUnRef = true;
_valueAutoUnRef = false;
}
}
int DatabasePager::setSchedulePriority(OpenThreads::Thread::ThreadPriority priority)
{
int result = 0;
@ -1723,52 +1660,10 @@ bool DatabasePager::requiresUpdateSceneGraph() const
return !(_dataToMergeList->empty());
}
#define UPDATE_TIMING 0
void DatabasePager::updateSceneGraph(const osg::FrameStamp& frameStamp)
{
#if 0
{
// check threads to see which are active and how long the active ones have been working in their current iteration.
double timeToSuspectADeadlock = 1.0;
bool possibleDeadLock = false;
unsigned int numThreadsActive = 0;
for(DatabaseThreadList::iterator itr = _databaseThreads.begin(); itr != _databaseThreads.end(); ++itr)
{
DatabaseThread* thread = itr->get();
if (thread->getActive())
{
++numThreadsActive;
if (thread->getTimeSinceStartOfIteration()>timeToSuspectADeadlock)
{
possibleDeadLock = true;
}
}
}
if (possibleDeadLock && numThreadsActive>0)
{
OSG_NOTICE<<"DatabasePager::updateSceneGraph() possibleDeadLock="<<possibleDeadLock<<std::endl;
for(DatabaseThreadList::iterator itr = _databaseThreads.begin(); itr != _databaseThreads.end(); ++itr)
{
DatabaseThread* thread = itr->get();
double t = thread->getTimeSinceStartOfIteration();
if (thread->getActive())
{
OSG_NOTICE<<" "<<thread->getName()<<" active for "<<t*1000<<"ms"<<std::endl;
}
else
{
OSG_NOTICE<<" "<<thread->getName()<<" inactive for "<<t*1000<<"ms"<<std::endl;
}
}
}
}
#endif
#define UPDATE_TIMING 0
#if UPDATE_TIMING
osg::ElapsedTime timer;
double timeFor_removeExpiredSubgraphs, timeFor_addLoadedDataToSceneGraph;