Commit 07671104 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Fixed BUG #13525. Avoid rendering pipeline resets when playing animation.

When playing animation, display lists are always discarded even if pipeline data
didn't change with time. Although the geometry filter and the vtkPVCacheKeeper
in vtkGeometryRepresentation didn't re-execute, the data was still treated as
modified. This was due to the logic in vtkPVDataDeliveryManager::SetPiece(). The
code was implemented to look at the DataTime provided by the pipeline. That was
done so that we could detect the change in data object when representation type
changes. However, the same can be done simply by comparing the data-object
pointer. Doing that addresses this bug as well.

Note however, in client-server mode, we still would force delivery for all
representations when time changes irrespective of whether the data really
changed.

Change-Id: I1b41778a5e3fcfa041ff48860c5311245a5182a7
parent d40f6f16
......@@ -331,18 +331,13 @@ void vtkPVDataDeliveryManager::SetPiece(
vtkPVDataRepresentationPipeline* executive =
vtkPVDataRepresentationPipeline::SafeDownCast(repr->GetExecutive());
// SetPiece() is called in every REQUEST_UPDATE() or REQUEST_UPDATE_LOD()
// pass irrespective of whether the data has actually changed.
// (I think that's a mistake, but the fact that representations can be
// updated without view makes it tricky since we cannot set the data to
// deliver in vtkPVDataRepresentation::RequestData() easily). Hence we need
// to ensure that the data we are getting is newer than what we have.
unsigned long data_time = executive? executive->GetDataTime() : 0;
unsigned long data_time = 0;
if (data && (data->GetMTime() > data_time))
{
data_time = data->GetMTime();
}
if (data_time > item->GetTimeStamp())
if (data_time > item->GetTimeStamp() ||
item->GetDataObject() != data)
{
item->SetDataObject(data);
}
......
......@@ -33,13 +33,6 @@ public:
vtkTypeMacro(vtkPVDataRepresentationPipeline, vtkCompositeDataPipeline);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Exposes the internal time-step updated when the RequestData() method on the
// representation is called. This makes it easier for us to determine when the
// representation executed.
unsigned long GetDataTime() const
{ return this->DataTime; }
//BTX
protected:
vtkPVDataRepresentationPipeline();
......
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