Let we said more detail reason why we need to keep rendering.
KeepRendering called vs FrameCallbackInterface return true vs Renderer behaviour is Continuously.
Change-Id: I00310a718f4667f401512e2f370bb2930318f5b2
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
mBakeColorCallSuccess = updateProxy.BakeColor(mActorId, vec4);
mBakeScaleCallSuccess = updateProxy.BakeScale(mActorId, vec3);
- mGetOrientationCallSuccess = updateProxy.GetOrientation(mActorId, quat);
- mSetOrientationCallSuccess = updateProxy.SetOrientation(mActorId, quat);
- mBakeOrientationCallSuccess = updateProxy.BakeOrientation(mActorId, quat);
- mGetWorldTransformCallSuccess = updateProxy.GetWorldTransformAndSize(mActorId, vec3, vec3, quat, vec3);
- mGetUpdateAreaCallSuccess = updateProxy.GetUpdateArea(mActorId, vec4);
- mSetUpdateAreaCallSuccess = updateProxy.SetUpdateArea(mActorId, vec4);
+ mGetOrientationCallSuccess = updateProxy.GetOrientation(mActorId, quat);
+ mSetOrientationCallSuccess = updateProxy.SetOrientation(mActorId, quat);
+ mBakeOrientationCallSuccess = updateProxy.BakeOrientation(mActorId, quat);
+ mGetWorldTransformCallSuccess = updateProxy.GetWorldTransformAndSize(mActorId, vec3, vec3, quat, vec3);
+ mGetUpdateAreaCallSuccess = updateProxy.GetUpdateArea(mActorId, vec4);
+ mSetUpdateAreaCallSuccess = updateProxy.SetUpdateArea(mActorId, vec4);
return false;
}
mBakeColorCallSuccess = false;
mBakeScaleCallSuccess = false;
- mSetOrientationCallSuccess = false;
- mGetOrientationCallSuccess = false;
- mBakeOrientationCallSuccess = false;
+ mSetOrientationCallSuccess = false;
+ mGetOrientationCallSuccess = false;
+ mBakeOrientationCallSuccess = false;
- mGetWorldTransformCallSuccess = false;
- mGetUpdateAreaCallSuccess = false;
- mSetUpdateAreaCallSuccess = false;
+ mGetWorldTransformCallSuccess = false;
+ mGetUpdateAreaCallSuccess = false;
+ mSetUpdateAreaCallSuccess = false;
}
const uint32_t mActorId;
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS(application.GetUpdateStatus(), Integration::KeepUpdating::STAGE_KEEP_RENDERING, TEST_LOCATION);
+ DALI_TEST_EQUALS(application.GetUpdateStatus(), Integration::KeepUpdating::FRAME_UPDATE_CALLBACK, TEST_LOCATION);
END_TEST;
}
uint32_t updateStatus = application.GetUpdateStatus();
- DALI_TEST_CHECK(!(updateStatus & Integration::KeepUpdating::STAGE_KEEP_RENDERING));
+ DALI_TEST_CHECK(!(updateStatus & (Integration::KeepUpdating::STAGE_KEEP_RENDERING | Integration::KeepUpdating::RENDERER_CONTINUOUSLY)));
TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
TraceCallStack& drawTrace = glAbstraction.GetDrawTrace();
updateStatus = application.GetUpdateStatus();
- DALI_TEST_CHECK(updateStatus & Integration::KeepUpdating::STAGE_KEEP_RENDERING);
+ DALI_TEST_CHECK(updateStatus & Integration::KeepUpdating::RENDERER_CONTINUOUSLY);
value = renderer.GetCurrentProperty(DevelRenderer::Property::RENDERING_BEHAVIOR);
DALI_TEST_CHECK(value.Get(renderingBehavior));
updateStatus = application.GetUpdateStatus();
- DALI_TEST_CHECK(updateStatus & Integration::KeepUpdating::STAGE_KEEP_RENDERING);
+ DALI_TEST_CHECK(updateStatus & Integration::KeepUpdating::RENDERER_CONTINUOUSLY);
DALI_TEST_EQUALS(drawTrace.CountMethod("DrawElements"), 1, TEST_LOCATION);
updateStatus = application.GetUpdateStatus();
- DALI_TEST_CHECK(updateStatus & Integration::KeepUpdating::STAGE_KEEP_RENDERING);
+ DALI_TEST_CHECK(updateStatus & Integration::KeepUpdating::RENDERER_CONTINUOUSLY);
DALI_TEST_EQUALS(drawTrace.CountMethod("DrawElements"), 1, TEST_LOCATION);
}
updateStatus = application.GetUpdateStatus();
- DALI_TEST_CHECK(!(updateStatus & Integration::KeepUpdating::STAGE_KEEP_RENDERING));
+ DALI_TEST_CHECK(!(updateStatus & (Integration::KeepUpdating::STAGE_KEEP_RENDERING | Integration::KeepUpdating::RENDERER_CONTINUOUSLY)));
END_TEST;
}
uint32_t updateStatus = application.GetUpdateStatus();
- DALI_TEST_CHECK(!(updateStatus & Integration::KeepUpdating::STAGE_KEEP_RENDERING));
+ DALI_TEST_CHECK(!(updateStatus & (Integration::KeepUpdating::STAGE_KEEP_RENDERING | Integration::KeepUpdating::RENDERER_CONTINUOUSLY)));
// Update for several frames
application.SendNotification();
updateStatus = application.GetUpdateStatus();
- DALI_TEST_CHECK(!(updateStatus & Integration::KeepUpdating::STAGE_KEEP_RENDERING));
+ DALI_TEST_CHECK(!(updateStatus & (Integration::KeepUpdating::STAGE_KEEP_RENDERING | Integration::KeepUpdating::RENDERER_CONTINUOUSLY)));
DALI_TEST_EQUALS(drawTrace.CountMethod("DrawElements"), 1, TEST_LOCATION);
STAGE_KEEP_RENDERING = 1 << 1, ///< - Stage::KeepRendering() is being used
ANIMATIONS_RUNNING = 1 << 2, ///< - Animations are ongoing
MONITORING_PERFORMANCE = 1 << 3, ///< - The --enable-performance-monitor option is being used
- RENDER_TASK_SYNC = 1 << 4 ///< - A render task is waiting for render sync
+ RENDER_TASK_SYNC = 1 << 4, ///< - A render task is waiting for render sync
+ FRAME_UPDATE_CALLBACK = 1 << 5, ///< - Some FrameUpdateCallback return true
+ RENDERER_CONTINUOUSLY = 1 << 6 ///< - Some Renderer renderinb behaviour is continuously
};
}
mImpl->frameCallbackProcessor || // ..a frame callback processor is existed OR
gestureUpdated; // ..a gesture property was updated
- uint32_t keepUpdating = 0;
- bool keepRendererRendering = false;
- mImpl->renderingRequired = false;
+ uint32_t keepUpdating = 0;
+ mImpl->renderingRequired = false;
// Although the scene-graph may not require an update, we still need to synchronize double-buffered
// values if the scene was updated in the previous frame.
// Call the frame-callback-processor if set
if(mImpl->frameCallbackProcessor)
{
- keepRendererRendering |= mImpl->frameCallbackProcessor->Update(bufferIndex, elapsedSeconds);
+ if(mImpl->frameCallbackProcessor->Update(bufferIndex, elapsedSeconds))
+ {
+ keepUpdating |= KeepUpdating::FRAME_UPDATE_CALLBACK;
+ }
}
// Update node hierarchy, apply constraints,
if(mImpl->renderersAdded)
{
// Calculate how many render tasks we have in total
- std::size_t numberOfRenderTasks = 0;
+ std::size_t numberOfRenderTasks = 0;
+ std::size_t numberOfRenderInstructions = 0;
+ bool renderContinuously = false;
for(auto&& scene : mImpl->scenes)
{
if(scene && scene->taskList)
}
}
- std::size_t numberOfRenderInstructions = 0;
- mImpl->renderInstructionCapacity = 0u;
+ mImpl->renderInstructionCapacity = 0u;
for(auto&& scene : mImpl->scenes)
{
if(scene && scene->root && scene->taskList && scene->scene)
// or keep rendering is requested
if(!isAnimationRunning || animationActive || mImpl->renderingRequired || (mImpl->nodeDirtyFlags & RenderableUpdateFlags) || sceneKeepUpdating)
{
- keepRendererRendering |= mImpl->renderTaskProcessor.Process(bufferIndex,
- *scene->taskList,
- *scene->root,
- scene->sortedLayerList,
- scene->scene->GetRenderInstructions(),
- renderToFboEnabled,
- isRenderingToFbo);
+ renderContinuously |= mImpl->renderTaskProcessor.Process(bufferIndex,
+ *scene->taskList,
+ *scene->root,
+ scene->sortedLayerList,
+ scene->scene->GetRenderInstructions(),
+ renderToFboEnabled,
+ isRenderingToFbo);
mImpl->renderInstructionCapacity += scene->scene->GetRenderInstructions().GetCapacity();
scene->scene->SetSkipRendering(false);
}
}
+ if(renderContinuously)
+ {
+ keepUpdating |= KeepUpdating::RENDERER_CONTINUOUSLY;
+ }
+
DALI_LOG_INFO(gLogFilter, Debug::General, "Update: numberOfRenderTasks(%d), Render Instructions(%d)\n", numberOfRenderTasks, numberOfRenderInstructions);
}
}
// Check whether further updates are required
keepUpdating |= KeepUpdatingCheck(elapsedSeconds);
- if(keepRendererRendering)
- {
- keepUpdating |= KeepUpdating::STAGE_KEEP_RENDERING;
- }
-
- if(keepUpdating & KeepUpdating::STAGE_KEEP_RENDERING)
+ if(keepUpdating & (KeepUpdating::STAGE_KEEP_RENDERING | KeepUpdating::FRAME_UPDATE_CALLBACK | KeepUpdating::RENDERER_CONTINUOUSLY))
{
// Set dirty flags for next frame to continue rendering
mImpl->nodeDirtyFlags |= RenderableUpdateFlags;