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:
parent
435a81a905
commit
0dd625f17e
@ -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),
|
||||
|
@ -1366,6 +1366,7 @@ class CompileStateCallback : public osg::Operation
|
||||
{
|
||||
public:
|
||||
CompileStateCallback(GameEventHandler* eh):
|
||||
osg::Referenced(true),
|
||||
osg::Operation("CompileStateCallback", false),
|
||||
_gameEventHandler(eh) {}
|
||||
|
||||
|
@ -29,6 +29,7 @@ class CalibrateCostEsimator : public osg::GraphicsOperation
|
||||
public:
|
||||
|
||||
CalibrateCostEsimator(osg::GraphicsCostEstimator* gce):
|
||||
osg::Referenced(true),
|
||||
osg::GraphicsOperation("CalbirateCostEstimator",false),
|
||||
_gce(gce) {}
|
||||
|
||||
|
@ -26,6 +26,7 @@ class MotionBlurOperation: public osg::Operation
|
||||
{
|
||||
public:
|
||||
MotionBlurOperation(double persistence):
|
||||
osg::Referenced(true),
|
||||
osg::Operation("MotionBlur",true),
|
||||
cleared_(false),
|
||||
persistence_(persistence)
|
||||
|
@ -261,6 +261,7 @@ class TestSupportOperation: public osg::GraphicsOperation
|
||||
public:
|
||||
|
||||
TestSupportOperation():
|
||||
osg::Referenced(true),
|
||||
osg::GraphicsOperation("TestSupportOperation",false),
|
||||
_supported(true),
|
||||
_errorMessage() {}
|
||||
|
@ -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),
|
||||
|
@ -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)
|
||||
|
@ -306,6 +306,7 @@ class TestSupportOperation: public osg::GraphicsOperation
|
||||
public:
|
||||
|
||||
TestSupportOperation():
|
||||
osg::Referenced(true),
|
||||
osg::GraphicsOperation("TestSupportOperation",false),
|
||||
supported(true),
|
||||
errorMessage(),
|
||||
|
@ -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();
|
||||
|
@ -52,7 +52,6 @@ class Operation : virtual public Referenced
|
||||
public:
|
||||
|
||||
Operation(const std::string& name, bool keep):
|
||||
osg::Referenced(true),
|
||||
_name(name),
|
||||
_keep(keep) {}
|
||||
|
||||
@ -75,14 +74,12 @@ class Operation : virtual public Referenced
|
||||
/** Do the actual task of this operation.*/
|
||||
virtual void operator () (Object*) = 0;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
|
||||
Operation():
|
||||
Referenced(true),
|
||||
_keep(false) {}
|
||||
|
||||
Operation(const Operation& op):
|
||||
Referenced(true),
|
||||
_name(op._name),
|
||||
_keep(op._keep) {}
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -22,6 +22,7 @@ using namespace OpenThreads;
|
||||
struct BlockOperation : public Operation, public Block
|
||||
{
|
||||
BlockOperation():
|
||||
osg::Referenced(true),
|
||||
Operation("Block",false)
|
||||
{
|
||||
reset();
|
||||
|
@ -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)
|
||||
|
@ -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),
|
||||
|
@ -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) {}
|
||||
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user