From 0739c15e0aa1af90380f43e008f024ce59c0f921 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 29 Nov 2010 09:32:43 +0000 Subject: [PATCH] Removed deperecated variables that are no longer used. --- include/osgDB/DatabasePager | 51 ++++------------- src/osgDB/DatabasePager.cpp | 109 +----------------------------------- 2 files changed, 12 insertions(+), 148 deletions(-) diff --git a/include/osgDB/DatabasePager b/include/osgDB/DatabasePager index 5e1c38793..9fd90d8f7 100644 --- a/include/osgDB/DatabasePager +++ b/include/osgDB/DatabasePager @@ -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 _fileRequestQueue; osg::ref_ptr _httpRequestQueue; - + osg::ref_ptr _dataToCompileList; DrawablePolicy _drawablePolicy; @@ -622,39 +597,33 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl bool _deleteRemovedSubgraphsInDatabaseThread; osg::ref_ptr _dataToMergeList; - + osg::ref_ptr _activePagedLODList; osg::ref_ptr _inactivePagedLODList; - + unsigned int _targetMaximumNumberOfPageLOD; - double _expiryDelay; - int _expiryFrames; - - double _releaseDelay; - int _releaseFrames; - ActiveGraphicsContexts _activeGraphicsContexts; // CompileGraphicsContexts _compileGraphicsContexts; - + bool _doPreCompile; osg::ref_ptr _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; }; }; diff --git a/src/osgDB/DatabasePager.cpp b/src/osgDB/DatabasePager.cpp index 8e75b5c8e..299307a5b 100644 --- a/src/osgDB/DatabasePager.cpp +++ b/src/osgDB/DatabasePager.cpp @@ -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<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="<get(); - - double t = thread->getTimeSinceStartOfIteration(); - if (thread->getActive()) - { - OSG_NOTICE<<" "<getName()<<" active for "<getName()<<" inactive for "<