MCPcopy Create free account
hub / github.com/MrKepzie/Natron / getInputsRoIsFunctor

Method getInputsRoIsFunctor

Engine/ParallelRenderArgs.cpp:306–534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

304} // EffectInstance::treeRecurseFunctor
305
306StatusEnum
307EffectInstance::getInputsRoIsFunctor(bool useTransforms,
308 double time,
309 ViewIdx view,
310 unsigned originalMipMapLevel,
311 const NodePtr& node,
312 const NodePtr& /*callerNode*/,
313 const NodePtr& treeRoot,
314 const RectD& canonicalRenderWindow,
315 FrameRequestMap& requests)
316{
317 boost::shared_ptr<NodeFrameRequest> nodeRequest;
318 EffectInstPtr effect = node->getEffectInstance();
319
320 assert(effect);
321
322 if (effect->supportsRenderScaleMaybe() == EffectInstance::eSupportsMaybe) {
323 /*
324 If this flag was not set already that means it probably failed all calls to getRegionOfDefinition.
325 We safely fail here
326 */
327 return eStatusFailed;
328 }
329 assert(effect->supportsRenderScaleMaybe() == EffectInstance::eSupportsNo ||
330 effect->supportsRenderScaleMaybe() == EffectInstance::eSupportsYes);
331 bool supportsRs = effect->supportsRenderScale();
332 unsigned int mappedLevel = supportsRs ? originalMipMapLevel : 0;
333 FrameRequestMap::iterator foundNode = requests.find(node);
334 if ( foundNode != requests.end() ) {
335 nodeRequest = foundNode->second;
336 } else {
337 ///Setup global data for the node for the whole frame render
338
339 boost::shared_ptr<NodeFrameRequest> tmp(new NodeFrameRequest);
340 tmp->mappedScale.x = tmp->mappedScale.y = Image::getScaleFromMipMapLevel(mappedLevel);
341 tmp->nodeHash = effect->getRenderHash();
342
343 std::pair<FrameRequestMap::iterator, bool> ret = requests.insert( std::make_pair(node, tmp) );
344 assert(ret.second);
345 nodeRequest = ret.first->second;
346 }
347 assert(nodeRequest);
348
349 ///Okay now we concentrate on this particular frame/view pair
350
351 FrameViewPair frameView;
352 frameView.time = time;
353 frameView.view = view;
354
355 FrameViewRequest* fvRequest = 0;
356 NodeFrameViewRequestData::iterator foundFrameView = nodeRequest->frames.find(frameView);
357 double par = effect->getAspectRatio(-1);
358 ViewInvarianceLevel viewInvariance = effect->isViewInvariant();
359
360
361 if ( foundFrameView != nodeRequest->frames.end() ) {
362 fvRequest = &foundFrameView->second;
363 } else {

Callers

nothing calls this directly

Calls 15

getEffectInstanceMethod · 0.80
supportsRenderScaleMethod · 0.80
getRenderHashMethod · 0.80
toPixelEnclosingMethod · 0.80
isIdentity_publicMethod · 0.80
ViewIdxClass · 0.70
findMethod · 0.45

Tested by

no test coverage detected