Commit f826a096 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Revert "add ability to use offscreen buffers for screen capture"

This reverts commit 354c09da.
parent e31b4eda
......@@ -41,8 +41,7 @@
#include "vtkSmartPointer.h"
#include "vtkWindowToImageFilter.h"
#include <cassert>
#include <cstdlib>
#include <assert.h>
namespace vtkSMViewProxyNS
{
......@@ -123,15 +122,6 @@ private:
vtkStandardNewMacro(WindowToImageFilter);
};
namespace
{
static bool GetUseOffScreenBuffersEnvironmentFlag()
{
static bool flag = (getenv("PV_USE_OFFSCREEN_BUFFERS_FOR_IMAGE_CAPTURE") != nullptr);
return flag;
}
}
bool vtkSMViewProxy::TransparentBackground = false;
vtkStandardNewMacro(vtkSMViewProxy);
......@@ -606,14 +596,6 @@ vtkImageData* vtkSMViewProxy::CaptureWindowInternal(int magX, int magY)
int swapBuffers = renWin->GetSwapBuffers();
renWin->SwapBuffersOff();
const bool prevOB = renWin->GetUseOffScreenBuffers();
static bool use_offscreen_buffers_flag = ::GetUseOffScreenBuffersEnvironmentFlag();
if (use_offscreen_buffers_flag)
{
// see #18446 for why we need UseOffScreenBuffers.
renWin->SetUseOffScreenBuffers(true);
}
// this is needed to ensure that view gets setup correctly before go ahead to
// capture the image.
this->RenderForImageCapture();
......@@ -632,10 +614,6 @@ vtkImageData* vtkSMViewProxy::CaptureWindowInternal(int magX, int magY)
w2i->Update();
renWin->SetSwapBuffers(swapBuffers);
if (use_offscreen_buffers_flag)
{
renWin->SetUseOffScreenBuffers(prevOB);
}
vtkImageData* capture = vtkImageData::New();
capture->ShallowCopy(w2i->GetOutput());
......
......@@ -17,7 +17,6 @@ PV_ALLOW_BATCH_INTERACTION | Allow interactions in batch mode.
PV_PLUGIN_CONFIG_FILE | XML Plugin Configuration Files to specify which plugin to load on startup.
PV_PLUGIN_PATH | Directories containing plugins to be loaded on startup.
QT_MAC_NO_NATIVE_MENUBAR | Qt flag to force the Qt menu bar rather than the native mac menu bar.
PV_USE_OFFSCREEN_BUFFERS_FOR_IMAGE_CAPTURE | A temporary environment variable which defined causes ParaView to use offscreen frame buffer when capturing images (see #18446). This may be removed in future without notice.
PV_PLUGIN_DEBUG | (obsolete) Use **PARAVIEW_LOG_PLUGIN_VERBOSITY** instead.
PV_SETTINGS_DEBUG | (obsolete) Use **PARAVIEW_LOG_APPLICATION_VERBOSITY** instead.
PV_DEBUG_APPLY_BUTTON | (obsolete) Use **PARAVIEW_LOG_APPLICATION_VERBOSITY** instead.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment