Remove boost::shared_ptr from rendering library

The remove boost::shared_ptr and the rendering library branches where
developed simultaneously, and thus some of the rendering library
implementation was using boost::shared_ptr like the old code. Bring up
to date with the rest of VTK-m by using std::shared_ptr instead.
This commit is contained in:
Kenneth Moreland 2016-09-12 11:08:06 -06:00
parent 0846d2c890
commit 5455608c69
13 changed files with 26 additions and 43 deletions

@ -26,9 +26,7 @@
#include <vtkm/rendering/Canvas.h>
#include <vtkm/rendering/Mapper.h>
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/shared_ptr.hpp>
VTKM_THIRDPARTY_POST_INCLUDE
#include <memory>
namespace vtkm {
namespace rendering {
@ -68,7 +66,7 @@ public:
private:
struct InternalsType;
boost::shared_ptr<InternalsType> Internals;
std::shared_ptr<InternalsType> Internals;
struct RangeFunctor;
};

@ -24,9 +24,7 @@
#include <vtkm/rendering/CanvasGL.h>
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/shared_ptr.hpp>
VTKM_THIRDPARTY_POST_INCLUDE
#include <memory>
namespace vtkm {
namespace rendering {
@ -57,7 +55,7 @@ public:
vtkm::rendering::Canvas *NewCopy() const VTKM_OVERRIDE;
private:
boost::shared_ptr<detail::CanvasEGLInternals> Internals;
std::shared_ptr<detail::CanvasEGLInternals> Internals;
};
}} //namespace vtkm::rendering

@ -24,9 +24,7 @@
#include <vtkm/rendering/CanvasGL.h>
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/shared_ptr.hpp>
VTKM_THIRDPARTY_POST_INCLUDE
#include <memory>
namespace vtkm {
namespace rendering {
@ -63,7 +61,7 @@ public:
vtkm::rendering::Canvas *NewCopy() const VTKM_OVERRIDE;
private:
boost::shared_ptr<detail::CanvasOSMesaInternals> Internals;
std::shared_ptr<detail::CanvasOSMesaInternals> Internals;
};
}} //namespace vtkm::rendering

@ -20,6 +20,7 @@
#include <vtkm/rendering/ColorTable.h>
#include <string>
#include <vector>
namespace vtkm {
@ -227,8 +228,7 @@ void ColorTable::Clear()
void ColorTable::Reverse()
{
boost::shared_ptr<detail::ColorTableInternals> oldInternals =
this->Internals;
std::shared_ptr<detail::ColorTableInternals> oldInternals = this->Internals;
this->Clear();

@ -24,11 +24,7 @@
#include <vtkm/rendering/Color.h>
#include <string>
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/shared_ptr.hpp>
VTKM_THIRDPARTY_POST_INCLUDE
#include <memory>
namespace vtkm {
namespace rendering {
@ -49,7 +45,7 @@ struct ColorTableInternals;
class ColorTable
{
private:
boost::shared_ptr<detail::ColorTableInternals> Internals;
std::shared_ptr<detail::ColorTableInternals> Internals;
public:
VTKM_RENDERING_EXPORT

@ -36,7 +36,7 @@ struct MapperRayTracer::InternalsType
{
vtkm::rendering::CanvasRayTracer *Canvas;
vtkm::cont::internal::RuntimeDeviceTracker DeviceTracker;
boost::shared_ptr<vtkm::cont::internal::SimplePolymorphicContainerBase>
std::shared_ptr<vtkm::cont::internal::SimplePolymorphicContainerBase>
RayTracerContainer;
VTKM_CONT_EXPORT

@ -24,9 +24,7 @@
#include <vtkm/rendering/Mapper.h>
#include <vtkm/rendering/Camera.h>
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/shared_ptr.hpp>
VTKM_THIRDPARTY_POST_INCLUDE
#include <memory>
namespace vtkm {
namespace rendering {
@ -61,7 +59,7 @@ public:
private:
struct InternalsType;
boost::shared_ptr<InternalsType> Internals;
std::shared_ptr<InternalsType> Internals;
struct RenderFunctor;
};

@ -40,7 +40,7 @@ struct MapperVolume::InternalsType
{
vtkm::rendering::CanvasRayTracer *Canvas;
vtkm::cont::internal::RuntimeDeviceTracker DeviceTracker;
boost::shared_ptr<vtkm::cont::internal::SimplePolymorphicContainerBase>
std::shared_ptr<vtkm::cont::internal::SimplePolymorphicContainerBase>
RayTracerContainer;
VTKM_CONT_EXPORT

@ -22,9 +22,7 @@
#include <vtkm/rendering/Mapper.h>
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/shared_ptr.hpp>
VTKM_THIRDPARTY_POST_INCLUDE
#include <memory>
namespace vtkm {
namespace rendering {
@ -59,7 +57,7 @@ public:
private:
struct InternalsType;
boost::shared_ptr<InternalsType> Internals;
std::shared_ptr<InternalsType> Internals;
struct RenderFunctor;
};

@ -27,6 +27,8 @@
#include <vtkm/rendering/Canvas.h>
#include <vtkm/rendering/Mapper.h>
#include <memory>
namespace vtkm {
namespace rendering {
@ -55,7 +57,7 @@ public:
private:
struct InternalsType;
boost::shared_ptr<InternalsType> Internals;
std::shared_ptr<InternalsType> Internals;
};
}} //namespace vtkm::rendering

@ -26,12 +26,9 @@
#include <vtkm/rendering/ColorTable.h>
#include <memory>
#include <vector>
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/shared_ptr.hpp>
VTKM_THIRDPARTY_POST_INCLUDE
namespace vtkm {
namespace rendering {
@ -60,7 +57,7 @@ public:
private:
struct InternalsType;
boost::shared_ptr<InternalsType> Internals;
std::shared_ptr<InternalsType> Internals;
};

@ -28,6 +28,8 @@
#include <vtkm/rendering/Mapper.h>
#include <vtkm/rendering/Scene.h>
#include <memory>
namespace vtkm {
namespace rendering {
@ -137,9 +139,9 @@ protected:
private:
vtkm::rendering::Scene Scene;
boost::shared_ptr<vtkm::rendering::Mapper> MapperPointer;
boost::shared_ptr<vtkm::rendering::Canvas> CanvasPointer;
boost::shared_ptr<vtkm::rendering::WorldAnnotator> WorldAnnotatorPointer;
std::shared_ptr<vtkm::rendering::Mapper> MapperPointer;
std::shared_ptr<vtkm::rendering::Canvas> CanvasPointer;
std::shared_ptr<vtkm::rendering::WorldAnnotator> WorldAnnotatorPointer;
vtkm::rendering::Camera Camera;
};

@ -24,10 +24,6 @@
#include <vtkm/cont/testing/Testing.h>
#include <vtkm/cont/testing/MakeTestDataSet.h>
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/shared_ptr.hpp>
VTKM_THIRDPARTY_POST_INCLUDE
namespace {
void TestCellAverageUniform3D()