Added controls over the datatbase pager threading priority during and outwith the frame.
This commit is contained in:
@@ -98,6 +98,19 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl
|
||||
/** Get the whether UseFrameBlock is on or off.*/
|
||||
bool getUseFrameBlock() const { return _useFrameBlock; }
|
||||
|
||||
|
||||
/** Set the priority of the database pager thread during the frame (i.e. while cull and draw are running.)*/
|
||||
void setThreadPriorityDuringFrame(ThreadPriority duringFrame) { _threadPriorityDuringFrame = duringFrame; }
|
||||
|
||||
/** Get the priority of the database pager thread during the frame*/
|
||||
ThreadPriority getThreadPriorityDuringFrame() const { return _threadPriorityDuringFrame; }
|
||||
|
||||
/** Set the priority of the database pager thread when the frame is not being exectuted (i.e. before or after cull and draw have run.)*/
|
||||
void setThreadPriorityOutwithFrame(ThreadPriority outwithFrame) { _threadPriorityOutwithFrame = outwithFrame; }
|
||||
|
||||
/** Get the priority of the database pager thread when the frame is not being exectuted.*/
|
||||
ThreadPriority getThreadPriorityOutwithFrame() const { return _threadPriorityOutwithFrame; }
|
||||
|
||||
|
||||
/** Signal the database thread that the update, cull and draw has begun for a new frame.
|
||||
* Note, this is called by the application so that the database pager can go to sleep while the CPU is busy on the main rendering threads. */
|
||||
@@ -214,6 +227,9 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl
|
||||
osg::ref_ptr<Block> _frameBlock;
|
||||
int _frameNumber;
|
||||
|
||||
ThreadPriority _threadPriorityDuringFrame;
|
||||
ThreadPriority _threadPriorityOutwithFrame;
|
||||
|
||||
DatabaseRequestList _fileRequestList;
|
||||
OpenThreads::Mutex _fileRequestListMutex;
|
||||
osg::ref_ptr<Block> _fileRequestListEmptyBlock;
|
||||
|
||||
Reference in New Issue
Block a user