Deprecate Camera::Activate() and Camera::Finish()

This commit is contained in:
NAThompson 2020-06-14 11:04:06 -04:00
parent bbfa1f1b8b
commit 0f0c465c1b
12 changed files with 5 additions and 29 deletions

@ -17,7 +17,6 @@ int UnitTestFancyTransferEGL(int argc, char* argv[])
//get egl canvas to construct a context for us
vtkm::rendering::CanvasEGL canvas(1024, 1024);
canvas.Activate();
//get glew to bind all the opengl functions
glewInit();

@ -18,7 +18,6 @@ int UnitTestFancyTransferOSMesa(int argc, char* argv[])
//get osmesa canvas to construct a context for us
vtkm::rendering::CanvasOSMesa canvas(1024, 1024);
canvas.Activate();
//get glew to bind all the opengl functions
glewInit();

@ -20,7 +20,6 @@ int UnitTestTransferEGL(int argc, char* argv[])
//get egl canvas to construct a context for us
vtkm::rendering::CanvasEGL canvas(1024, 1024);
canvas.Activate();
//get glew to bind all the opengl functions
glewInit();

@ -20,7 +20,6 @@ int UnitTestTransferOSMesa(int argc, char* argv[])
//get osmesa canvas to construct a context for us
vtkm::rendering::CanvasOSMesa canvas(1024, 1024);
canvas.Activate();
//get glew to bind all the opengl functions
glewInit();

@ -151,7 +151,6 @@ void TestImage()
{
vtkm::rendering::Canvas canvas(16, 16);
canvas.SetBackgroundColor(vtkm::rendering::Color::red);
canvas.Activate();
canvas.Clear();
// Line from top left to bottom right, ensures correct transposedness
canvas.AddLine(-0.9, 0.9, 0.9, -0.9, 2.0f, vtkm::rendering::Color::black);

@ -316,14 +316,6 @@ void Canvas::SetForegroundColor(const vtkm::rendering::Color& color)
Internals->ForegroundColor = color;
}
void Canvas::Initialize()
{
}
void Canvas::Activate()
{
}
void Canvas::Clear()
{
internal::ClearBuffers worklet;
@ -331,10 +323,6 @@ void Canvas::Clear()
dispatcher.Invoke(this->GetColorBuffer(), this->GetDepthBuffer());
}
void Canvas::Finish()
{
}
void Canvas::BlendBackground()
{
internal::BlendBackground worklet(GetBackgroundColor().Components);

@ -45,13 +45,15 @@ public:
virtual vtkm::rendering::Canvas* NewCopy() const;
VTKM_DEPRECATED(1.6, "Initialize() does nothing.")
virtual void Initialize();
virtual void Initialize() {}
virtual void Activate();
VTKM_DEPRECATED(1.6, "Activate() does nothing.")
virtual void Activate() {}
virtual void Clear();
virtual void Finish();
VTKM_DEPRECATED(1.6, "Finish() does nothing.")
virtual void Finish() {}
virtual void BlendBackground();

@ -341,7 +341,6 @@ void MapperWireframer::RenderCells(const vtkm::cont::DynamicCellSet& inCellSet,
CanvasRayTracer canvas(this->Internals->Canvas->GetWidth(),
this->Internals->Canvas->GetHeight());
canvas.SetBackgroundColor(vtkm::rendering::Color::white);
canvas.Activate();
canvas.Clear();
MapperRayTracer raytracer;
raytracer.SetCanvas(&canvas);

@ -42,7 +42,6 @@ View1D::~View1D()
void View1D::Paint()
{
this->GetCanvas().Activate();
this->GetCanvas().Clear();
this->UpdateCameraProperties();
this->SetupForWorldSpace();
@ -52,7 +51,6 @@ void View1D::Paint()
this->RenderScreenAnnotations();
this->RenderColorLegendAnnotations();
this->RenderAnnotations();
this->GetCanvas().Finish();
}
void View1D::RenderScreenAnnotations()

@ -40,7 +40,6 @@ View2D::~View2D()
void View2D::Paint()
{
this->GetCanvas().Activate();
this->GetCanvas().Clear();
this->UpdateCameraProperties();
this->SetupForWorldSpace();
@ -49,7 +48,6 @@ void View2D::Paint()
this->SetupForScreenSpace();
this->RenderScreenAnnotations();
this->RenderAnnotations();
this->GetCanvas().Finish();
}
void View2D::RenderScreenAnnotations()

@ -40,7 +40,6 @@ View3D::~View3D()
void View3D::Paint()
{
this->GetCanvas().Activate();
this->GetCanvas().Clear();
this->SetupForWorldSpace();
@ -50,8 +49,6 @@ void View3D::Paint()
this->SetupForScreenSpace();
this->RenderAnnotations();
this->RenderScreenAnnotations();
this->GetCanvas().Finish();
}
void View3D::RenderScreenAnnotations()

@ -19,7 +19,6 @@ void RenderTests()
{
vtkm::rendering::Canvas canvas;
canvas.SetBackgroundColor(vtkm::rendering::Color::white);
canvas.Activate();
canvas.Clear();
canvas.AddLine(-0.8, 0.8, 0.8, 0.8, 1.0f, vtkm::rendering::Color::black);
canvas.AddLine(0.8, 0.8, 0.8, -0.8, 1.0f, vtkm::rendering::Color::black);