------------------------------------------------------------------------------
| 455 | |
| 456 | //------------------------------------------------------------------------------ |
| 457 | void vtkParallelRenderManager::StartRender() |
| 458 | { |
| 459 | vtkParallelRenderManager::RenderWindowInfo winInfo; |
| 460 | vtkParallelRenderManager::RendererInfo renInfo; |
| 461 | vtkParallelRenderManager::LightInfo lightInfo; |
| 462 | |
| 463 | vtkDebugMacro("StartRender"); |
| 464 | |
| 465 | if ((this->Controller == nullptr) || (this->Lock)) |
| 466 | { |
| 467 | return; |
| 468 | } |
| 469 | this->Lock = 1; |
| 470 | |
| 471 | this->FullImageUpToDate = 0; |
| 472 | this->ReducedImageUpToDate = 0; |
| 473 | this->RenderWindowImageUpToDate = 0; |
| 474 | |
| 475 | if (this->FullImage->GetPointer(0) == this->ReducedImage->GetPointer(0)) |
| 476 | { |
| 477 | // "Un-share" pointer for full/reduced images in case we need separate |
| 478 | // arrays this run. |
| 479 | this->ReducedImage->Initialize(); |
| 480 | } |
| 481 | |
| 482 | if (!this->ParallelRendering) |
| 483 | { |
| 484 | this->Lock = 0; |
| 485 | return; |
| 486 | } |
| 487 | |
| 488 | this->InvokeEvent(vtkCommand::StartEvent, nullptr); |
| 489 | |
| 490 | this->ImageProcessingTime = 0; |
| 491 | |
| 492 | // Used to time the total render (without compositing). |
| 493 | this->Timer->StartTimer(); |
| 494 | |
| 495 | if (this->AutoImageReductionFactor) |
| 496 | { |
| 497 | this->SetImageReductionFactorForUpdateRate(this->RenderWindow->GetDesiredUpdateRate()); |
| 498 | } |
| 499 | |
| 500 | // Make adjustments for window size. |
| 501 | int* tilesize; |
| 502 | if (this->ForceRenderWindowSize) |
| 503 | { |
| 504 | tilesize = this->ForcedRenderWindowSize; |
| 505 | } |
| 506 | else |
| 507 | { |
| 508 | tilesize = this->RenderWindow->GetActualSize(); |
| 509 | } |
| 510 | int size[2]; |
| 511 | size[0] = tilesize[0]; |
| 512 | size[1] = tilesize[1]; |
| 513 | if ((size[0] == 0) || (size[1] == 0)) |
| 514 | { |
no test coverage detected