Added explicit initialization of osg::Referenced(true) to osg::Operation subclasses as it uses virtual inhertiance from osg::Referenced.

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15025 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield 2015-07-23 15:46:47 +00:00
parent 435a81a905
commit 0dd625f17e
16 changed files with 21 additions and 4 deletions

View File

@ -540,6 +540,7 @@ public:
const std::string& outputFilename,
SceneGraphProcessor* sceneGraphProcessor,
osgUtil::IncrementalCompileOperation* ico):
osg::Referenced(true),
Operation("DatabasePaging Operation", false),
_filename(filename),
_outputFilename(outputFilename),

View File

@ -1366,6 +1366,7 @@ class CompileStateCallback : public osg::Operation
{
public:
CompileStateCallback(GameEventHandler* eh):
osg::Referenced(true),
osg::Operation("CompileStateCallback", false),
_gameEventHandler(eh) {}

View File

@ -29,6 +29,7 @@ class CalibrateCostEsimator : public osg::GraphicsOperation
public:
CalibrateCostEsimator(osg::GraphicsCostEstimator* gce):
osg::Referenced(true),
osg::GraphicsOperation("CalbirateCostEstimator",false),
_gce(gce) {}

View File

@ -26,6 +26,7 @@ class MotionBlurOperation: public osg::Operation
{
public:
MotionBlurOperation(double persistence):
osg::Referenced(true),
osg::Operation("MotionBlur",true),
cleared_(false),
persistence_(persistence)

View File

@ -261,6 +261,7 @@ class TestSupportOperation: public osg::GraphicsOperation
public:
TestSupportOperation():
osg::Referenced(true),
osg::GraphicsOperation("TestSupportOperation",false),
_supported(true),
_errorMessage() {}

View File

@ -559,6 +559,7 @@ class UpdateTextOperation : public osg::Operation
public:
UpdateTextOperation(const osg::Vec3& center, float diameter, osg::Group* group):
osg::Referenced(true),
Operation("UpdateTextOperation", true),
_center(center),
_diameter(diameter),

View File

@ -83,6 +83,7 @@ class LoadAndCompileOperation : public osg::Operation
public:
LoadAndCompileOperation(const std::string& filename, osgUtil::IncrementalCompileOperation* ico , osg::RefBlockCount* block):
osg::Referenced(true),
Operation("Load and compile Operation", false),
_filename(filename),
_incrementalCompileOperation(ico),
@ -128,6 +129,7 @@ public:
MasterOperation(const std::string& filename, osgUtil::IncrementalCompileOperation* ico):
osg::Referenced(true),
Operation("Master reading operation",true),
_filename(filename),
_incrementalCompileOperation(ico)

View File

@ -306,6 +306,7 @@ class TestSupportOperation: public osg::GraphicsOperation
public:
TestSupportOperation():
osg::Referenced(true),
osg::GraphicsOperation("TestSupportOperation",false),
supported(true),
errorMessage(),

View File

@ -49,6 +49,7 @@ struct OSG_EXPORT GraphicsOperation : public Operation
struct OSG_EXPORT SwapBuffersOperation : public GraphicsOperation
{
SwapBuffersOperation():
osg::Referenced(true),
GraphicsOperation("SwapBuffers",true) {}
virtual void operator () (GraphicsContext* context);
@ -65,6 +66,7 @@ struct OSG_EXPORT BarrierOperation : public Operation, public OpenThreads::Barri
};
BarrierOperation(int numThreads, PreBlockOp op=NO_OPERATION, bool keep=true):
osg::Referenced(true),
Operation("Barrier", keep),
OpenThreads::Barrier(numThreads),
_preBlockOp(op) {}
@ -81,6 +83,7 @@ struct OSG_EXPORT BarrierOperation : public Operation, public OpenThreads::Barri
struct OSG_EXPORT ReleaseContext_Block_MakeCurrentOperation : public GraphicsOperation, public RefBlock
{
ReleaseContext_Block_MakeCurrentOperation():
osg::Referenced(true),
GraphicsOperation("ReleaseContext_Block_MakeCurrent", false) {}
virtual void release();

View File

@ -52,7 +52,6 @@ class Operation : virtual public Referenced
public:
Operation(const std::string& name, bool keep):
osg::Referenced(true),
_name(name),
_keep(keep) {}
@ -78,11 +77,9 @@ class Operation : virtual public Referenced
protected:
Operation():
Referenced(true),
_keep(false) {}
Operation(const Operation& op):
Referenced(true),
_name(op._name),
_keep(op._keep) {}

View File

@ -98,6 +98,7 @@ void ReleaseContext_Block_MakeCurrentOperation::operator () (GraphicsContext* co
BlockAndFlushOperation::BlockAndFlushOperation():
osg::Referenced(true),
GraphicsOperation("Block",false)
{
reset();
@ -115,6 +116,7 @@ void BlockAndFlushOperation::operator () (GraphicsContext*)
}
FlushDeletedGLObjectsOperation::FlushDeletedGLObjectsOperation(double availableTime, bool keep):
osg::Referenced(true),
GraphicsOperation("FlushDeletedGLObjectsOperation",keep),
_availableTime(availableTime)
{

View File

@ -22,6 +22,7 @@ using namespace OpenThreads;
struct BlockOperation : public Operation, public Block
{
BlockOperation():
osg::Referenced(true),
Operation("Block",false)
{
reset();

View File

@ -181,12 +181,14 @@ void GLObjectsVisitor::apply(osg::StateSet& stateset)
//
GLObjectsOperation::GLObjectsOperation(GLObjectsVisitor::Mode mode):
osg::Referenced(true),
osg::GraphicsOperation("GLObjectOperation",false),
_mode(mode)
{
}
GLObjectsOperation::GLObjectsOperation(osg::Node* subgraph, GLObjectsVisitor::Mode mode):
osg::Referenced(true),
osg::GraphicsOperation("GLObjectOperation",false),
_subgraph(subgraph),
_mode(mode)

View File

@ -445,6 +445,7 @@ bool IncrementalCompileOperation::CompileSet::compile(CompileInfo& compileInfo)
// IncrementalCompileOperation
//
IncrementalCompileOperation::IncrementalCompileOperation():
osg::Referenced(true),
osg::GraphicsOperation("IncrementalCompileOperation",true),
_flushTimeRatio(0.5),
_conservativeTimeRatio(0.5),

View File

@ -1122,6 +1122,7 @@ void RenderStage::drawInner(osg::RenderInfo& renderInfo,RenderLeaf*& previous, b
struct DrawInnerOperation : public osg::Operation
{
DrawInnerOperation(RenderStage* stage, osg::RenderInfo& renderInfo) :
osg::Referenced(true),
osg::Operation("DrawInnerStage",false),
_stage(stage),
_renderInfo(renderInfo) {}

View File

@ -352,6 +352,7 @@ static OpenThreads::ReentrantMutex s_drawSerializerMutex;
//
// Renderer
Renderer::Renderer(osg::Camera* camera):
osg::Referenced(true),
osg::GraphicsOperation("Renderer",true),
_camera(camera),
_done(false),