2 * Copyright (c) 2024 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali/internal/common/core-impl.h>
22 #include <dali/graphics-api/graphics-controller.h>
23 #include <dali/integration-api/core.h>
24 #include <dali/integration-api/debug.h>
25 #include <dali/integration-api/events/event.h>
26 #include <dali/integration-api/platform-abstraction.h>
27 #include <dali/integration-api/processor-interface.h>
28 #include <dali/integration-api/render-controller.h>
29 #include <dali/integration-api/trace.h>
31 #include <dali/internal/event/actors/actor-impl.h>
32 #include <dali/internal/event/animation/animation-playlist.h>
33 #include <dali/internal/event/common/event-thread-services.h>
34 #include <dali/internal/event/common/notification-manager.h>
35 #include <dali/internal/event/common/property-notification-manager.h>
36 #include <dali/internal/event/common/stage-impl.h>
37 #include <dali/internal/event/common/thread-local-storage.h>
38 #include <dali/internal/event/common/type-registry-impl.h>
39 #include <dali/internal/event/effects/shader-factory.h>
40 #include <dali/internal/event/events/event-processor.h>
41 #include <dali/internal/event/events/gesture-event-processor.h>
42 #include <dali/internal/event/render-tasks/render-task-list-impl.h>
43 #include <dali/internal/event/size-negotiation/relayout-controller-impl.h>
45 #include <dali/internal/update/common/discard-queue.h>
46 #include <dali/internal/update/manager/render-task-processor.h>
47 #include <dali/internal/update/manager/update-manager.h>
49 #include <dali/internal/render/common/performance-monitor.h>
50 #include <dali/internal/render/common/render-manager.h>
52 using Dali::Internal::SceneGraph::RenderManager;
53 using Dali::Internal::SceneGraph::RenderQueue;
54 using Dali::Internal::SceneGraph::UpdateManager;
58 // The Update for frame N+1 may be processed whilst frame N is being rendered.
59 const uint32_t MAXIMUM_UPDATE_COUNT = 2u;
61 DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_PERFORMANCE_MARKER, false);
63 #if defined(DEBUG_ENABLED)
64 Debug::Filter* gCoreFilter = Debug::Filter::New(Debug::Concise, false, "LOG_CORE");
72 using Integration::Event;
73 using Integration::PlatformAbstraction;
74 using Integration::RenderController;
75 using Integration::RenderStatus;
76 using Integration::UpdateStatus;
78 Core::Core(RenderController& renderController,
79 PlatformAbstraction& platform,
80 Graphics::Controller& graphicsController,
81 Integration::CorePolicyFlags corePolicy)
82 : mRenderController(renderController),
84 mGraphicsController(graphicsController),
85 mProcessorOnceIndex(0u),
86 mPostProcessorOnceIndex(0u),
87 mProcessingEvent(false),
88 mProcessorUnregistered(false),
89 mPostProcessorUnregistered(false),
92 // Create the thread local storage
93 CreateThreadLocalStorage();
95 // This does nothing until Core is built with --enable-performance-monitor
96 PERFORMANCE_MONITOR_INIT(platform);
98 mNotificationManager = new NotificationManager();
100 mAnimationPlaylist = AnimationPlaylist::New();
102 mPropertyNotificationManager = PropertyNotificationManager::New();
104 mRenderTaskProcessor = new SceneGraph::RenderTaskProcessor();
106 mRenderManager = RenderManager::New(graphicsController,
107 (corePolicy & Integration::CorePolicyFlags::DEPTH_BUFFER_AVAILABLE) ? Integration::DepthBufferAvailable::TRUE : Integration::DepthBufferAvailable::FALSE,
108 (corePolicy & Integration::CorePolicyFlags::STENCIL_BUFFER_AVAILABLE) ? Integration::StencilBufferAvailable::TRUE : Integration::StencilBufferAvailable::FALSE,
109 (corePolicy & Integration::CorePolicyFlags::PARTIAL_UPDATE_AVAILABLE) ? Integration::PartialUpdateAvailable::TRUE : Integration::PartialUpdateAvailable::FALSE);
111 RenderQueue& renderQueue = mRenderManager->GetRenderQueue();
113 mUpdateManager = new UpdateManager(*mNotificationManager,
115 *mPropertyNotificationManager,
119 *mRenderTaskProcessor);
121 mRenderManager->SetShaderSaver(*mUpdateManager);
123 mObjectRegistry = ObjectRegistry::New();
125 mStage = IntrusivePtr<Stage>(Stage::New(*mUpdateManager));
127 // This must be called after stage is created but before stage initialization
128 mRelayoutController = IntrusivePtr<RelayoutController>(new RelayoutController(mRenderController));
130 mGestureEventProcessor = new GestureEventProcessor(*mUpdateManager, mRenderController);
132 mShaderFactory = new ShaderFactory();
133 mUpdateManager->SetShaderSaver(*mShaderFactory);
135 GetImplementation(Dali::TypeRegistry::Get()).CallInitFunctions();
137 DALI_LOG_RELEASE_INFO("Core policy enum : 0x%x\n", static_cast<uint32_t>(corePolicy));
143 * The order of destructing these singletons is important!!!
146 // clear the thread local storage first
147 // allows core to be created / deleted many times in the same thread (how TET cases work).
148 // Do this before mStage.Reset() so Stage::IsInstalled() returns false
149 ThreadLocalStorage* tls = ThreadLocalStorage::GetInternal();
156 mObjectRegistry.Reset();
158 // Stop relayout requests being raised on stage destruction
159 mRelayoutController.Reset();
161 // remove (last?) reference to stage
165 void Core::Initialize()
167 mStage->Initialize(*mScenes[0]);
170 Integration::ContextNotifierInterface* Core::GetContextNotifier()
175 void Core::RecoverFromContextLoss()
177 DALI_LOG_INFO(gCoreFilter, Debug::Verbose, "Core::RecoverFromContextLoss()\n");
179 mStage->GetRenderTaskList().RecoverFromContextLoss(); // Re-trigger render-tasks
182 void Core::ContextCreated()
186 void Core::ContextDestroyed()
188 mRenderManager->ContextDestroyed();
191 void Core::Update(float elapsedSeconds, uint32_t lastVSyncTimeMilliseconds, uint32_t nextVSyncTimeMilliseconds, Integration::UpdateStatus& status, bool renderToFboEnabled, bool isRenderingToFbo, bool uploadOnly)
193 // set the time delta so adaptor can easily print FPS with a release build with 0 as
194 // it is cached by frametime
195 status.secondsFromLastFrame = elapsedSeconds;
197 // Render returns true when there are updates on the stage or one or more animations are completed.
198 // Use the estimated time diff till we render as the elapsed time.
199 status.keepUpdating = mUpdateManager->Update(elapsedSeconds,
200 lastVSyncTimeMilliseconds,
201 nextVSyncTimeMilliseconds,
206 // Check the Notification Manager message queue to set needsNotification
207 status.needsNotification = mNotificationManager->MessagesToProcess();
209 // No need to keep update running if there are notifications to process.
210 // Any message to update will wake it up anyways
213 void Core::PreRender(RenderStatus& status, bool forceClear)
215 mRenderManager->PreRender(status, forceClear);
218 void Core::PreRender(Integration::Scene& scene, std::vector<Rect<int>>& damagedRects)
220 mRenderManager->PreRender(scene, damagedRects);
223 void Core::RenderScene(RenderStatus& status, Integration::Scene& scene, bool renderToFbo)
225 mRenderManager->RenderScene(status, scene, renderToFbo);
228 void Core::RenderScene(RenderStatus& status, Integration::Scene& scene, bool renderToFbo, Rect<int>& clippingRect)
230 mRenderManager->RenderScene(status, scene, renderToFbo, clippingRect);
233 void Core::PostRender()
235 mUpdateManager->PostRender();
236 mRenderManager->PostRender();
239 void Core::SceneCreated()
241 mStage->EmitSceneCreatedSignal();
243 mRelayoutController->OnApplicationSceneCreated();
245 for(const auto& scene : mScenes)
247 Dali::Actor sceneRootLayer = scene->GetRootLayer();
248 mRelayoutController->RequestRelayoutTree(sceneRootLayer);
252 void Core::QueueEvent(const Integration::Event& event)
254 if(mScenes.size() != 0)
256 mScenes.front()->QueueEvent(event);
260 void Core::ForceRelayout()
264 DALI_LOG_ERROR("ForceRelayout should not be called from within RelayoutAndFlush!\n");
268 // Scene could be added or removed while processing the events
269 // Copy the Scene container locally to avoid possibly invalid iterator
270 SceneContainer scenes = mScenes;
272 RelayoutAndFlush(scenes);
275 void Core::ProcessEvents()
277 // Guard against calls to ProcessEvents() during ProcessEvents()
280 DALI_LOG_ERROR("ProcessEvents should not be called from within ProcessEvents!\n");
281 mRenderController.RequestProcessEventsOnIdle();
285 mProcessingEvent = true;
286 mRelayoutController->SetProcessingCoreEvents(true);
288 // Signal that any messages received will be flushed soon
289 mUpdateManager->EventProcessingStarted();
291 // Scene could be added or removed while processing the events
292 // Copy the Scene container locally to avoid possibly invalid iterator
293 SceneContainer scenes = mScenes;
295 // process events in all scenes
296 for(auto scene : scenes)
298 scene->ProcessEvents();
301 mNotificationManager->ProcessMessages();
303 // Emit signal here to inform listeners that event processing has finished.
304 for(auto scene : scenes)
306 scene->EmitEventProcessingFinishedSignal();
309 RelayoutAndFlush(scenes);
311 // Notify to animation play list that event processing has finished.
312 mAnimationPlaylist->EventLoopFinished();
314 mUpdateManager->EventProcessingFinished();
316 // Check if the touch or gestures require updates.
317 const bool gestureNeedsUpdate = mGestureEventProcessor->NeedsUpdate();
319 if(gestureNeedsUpdate)
321 // tell the render controller to keep update thread running
322 mRenderController.RequestUpdate();
325 mRelayoutController->SetProcessingCoreEvents(false);
327 // ProcessEvents() may now be called again
328 mProcessingEvent = false;
331 void Core::RelayoutAndFlush(SceneContainer& scenes)
335 DALI_LOG_ERROR("RelayoutAndFlush should not be called from within RelayoutAndFlush!\n");
339 const bool isProcessEvents = mProcessingEvent;
343 // Fake that we are in ProcessEvents()
344 mProcessingEvent = true;
345 mRelayoutController->SetProcessingCoreEvents(true);
347 // Signal that any messages received will be flushed soon
348 mUpdateManager->EventProcessingStarted();
351 mRelayoutFlush = true;
353 // Run any registered processors
356 // Run the size negotiation after event processing finished signal
357 mRelayoutController->Relayout();
359 // Run any registered post processors
362 // Rebuild depth tree after event processing has finished
363 for(auto& scene : scenes)
365 scene->RebuildDepthTree();
368 // Flush any queued messages for the update-thread
369 const bool messagesToProcess = mUpdateManager->FlushQueue();
371 if(messagesToProcess)
373 // tell the render controller to keep update thread running
374 mRenderController.RequestUpdate();
377 mRelayoutFlush = false;
381 // Revert fake informations
382 mProcessingEvent = false;
383 mRelayoutController->SetProcessingCoreEvents(false);
385 mUpdateManager->EventProcessingFinished();
389 uint32_t Core::GetMaximumUpdateCount() const
391 return MAXIMUM_UPDATE_COUNT;
394 void Core::RegisterProcessor(Integration::Processor& processor, bool postProcessor)
398 mPostProcessors.PushBack(&processor);
402 mProcessors.PushBack(&processor);
406 void Core::UnregisterProcessor(Integration::Processor& processor, bool postProcessor)
410 auto iter = std::find(mPostProcessors.Begin(), mPostProcessors.End(), &processor);
411 if(iter != mPostProcessors.End())
413 mPostProcessors.Erase(iter);
414 mPostProcessorUnregistered = true;
419 auto iter = std::find(mProcessors.Begin(), mProcessors.End(), &processor);
420 if(iter != mProcessors.End())
422 mProcessors.Erase(iter);
423 mProcessorUnregistered = true;
428 void Core::RegisterProcessorOnce(Integration::Processor& processor, bool postProcessor)
432 mPostProcessorsOnce[mPostProcessorOnceIndex].PushBack(&processor);
436 mProcessorsOnce[mProcessorOnceIndex].PushBack(&processor);
440 void Core::UnregisterProcessorOnce(Integration::Processor& processor, bool postProcessor)
444 for(uint32_t index = 0; index < 2; ++index)
446 auto iter = std::find(mPostProcessorsOnce[index].Begin(), mPostProcessorsOnce[index].End(), &processor);
447 if(iter != mPostProcessorsOnce[index].End())
449 mPostProcessorsOnce[index].Erase(iter);
450 if(index != mPostProcessorOnceIndex)
452 // Check processor unregistered during processing.
453 mPostProcessorUnregistered = true;
460 for(uint32_t index = 0; index < 2; ++index)
462 auto iter = std::find(mProcessorsOnce[index].Begin(), mProcessorsOnce[index].End(), &processor);
463 if(iter != mProcessorsOnce[index].End())
465 mProcessorsOnce[index].Erase(iter);
466 if(index != mProcessorOnceIndex)
468 // Check processor unregistered during processing.
469 mProcessorUnregistered = true;
476 void Core::UnregisterProcessors()
478 mPostProcessors.Clear();
479 mPostProcessorUnregistered = true;
481 mProcessorUnregistered = true;
483 for(uint32_t index = 0; index < 2; ++index)
485 mPostProcessorsOnce[index].Clear();
486 mProcessorsOnce[index].Clear();
490 void Core::RunProcessors()
492 if(mProcessorsOnce[mProcessorOnceIndex].Count() != 0)
494 DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_CORE_RUN_PROCESSORS_ONCE", [&](std::ostringstream& oss) {
495 oss << "[" << mProcessorOnceIndex << ":" << mProcessorsOnce[mProcessorOnceIndex].Count() << "]";
498 // Swap processor index.
499 uint32_t currentIndex = mProcessorOnceIndex;
500 mProcessorOnceIndex ^= 1;
502 // Copy processor pointers to prevent changes to vector affecting loop iterator.
503 Dali::Vector<Integration::Processor*> processors(mProcessorsOnce[currentIndex]);
505 // To prevent accessing processor unregistered during the loop
506 mProcessorUnregistered = false;
508 for(auto processor : processors)
512 if(!mProcessorUnregistered)
514 processor->Process(false);
518 // Run processor if the processor is still in the list.
519 // It may be removed during the loop.
520 auto iter = std::find(mProcessorsOnce[currentIndex].Begin(), mProcessorsOnce[currentIndex].End(), processor);
521 if(iter != mProcessorsOnce[currentIndex].End())
523 processor->Process(false);
529 // Clear once processor.
530 mProcessorsOnce[currentIndex].Clear();
532 DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_CORE_RUN_PROCESSORS_ONCE", [&](std::ostringstream& oss) {
533 oss << "[" << currentIndex;
534 if(mProcessorUnregistered)
536 oss << ", processor changed";
542 if(mProcessors.Count() != 0)
544 DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_CORE_RUN_PROCESSORS", [&](std::ostringstream& oss) {
545 oss << "[" << mProcessors.Count() << "]";
548 // Copy processor pointers to prevent changes to vector affecting loop iterator.
549 Dali::Vector<Integration::Processor*> processors(mProcessors);
551 // To prevent accessing processor unregistered during the loop
552 mProcessorUnregistered = false;
554 for(auto processor : processors)
558 if(!mProcessorUnregistered)
560 DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_CORE_RUN_PROCESSOR", [&](std::ostringstream& oss) {
561 oss << "[" << processor->GetProcessorName() << "]";
563 processor->Process(false);
564 DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_CORE_RUN_PROCESSOR", [&](std::ostringstream& oss) {
565 oss << "[" << processor->GetProcessorName() << "]";
570 // Run processor if the processor is still in the list.
571 // It may be removed during the loop.
572 auto iter = std::find(mProcessors.Begin(), mProcessors.End(), processor);
573 if(iter != mProcessors.End())
575 DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_CORE_RUN_PROCESSOR", [&](std::ostringstream& oss) {
576 oss << "[" << processor->GetProcessorName() << "]";
578 processor->Process(false);
579 DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_CORE_RUN_PROCESSOR", [&](std::ostringstream& oss) {
580 oss << "[" << processor->GetProcessorName() << "]";
586 DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_CORE_RUN_PROCESSORS", [&](std::ostringstream& oss) {
587 oss << "[" << mProcessors.Count();
588 if(mProcessorUnregistered)
590 oss << ", processor changed";
597 void Core::RunPostProcessors()
599 if(mPostProcessorsOnce[mPostProcessorOnceIndex].Count() != 0)
601 DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_CORE_RUN_POST_PROCESSORS_ONCE", [&](std::ostringstream& oss) {
602 oss << "[" << mPostProcessorOnceIndex << ":" << mPostProcessorsOnce[mPostProcessorOnceIndex].Count() << "]";
605 // Swap processor index.
606 uint32_t currentIndex = mPostProcessorOnceIndex;
607 mPostProcessorOnceIndex ^= 1;
609 // Copy processor pointers to prevent changes to vector affecting loop iterator.
610 Dali::Vector<Integration::Processor*> processors(mPostProcessorsOnce[currentIndex]);
612 // To prevent accessing processor unregistered during the loop
613 mPostProcessorUnregistered = false;
615 for(auto processor : processors)
619 if(!mPostProcessorUnregistered)
621 processor->Process(true);
625 // Run processor if the processor is still in the list.
626 // It may be removed during the loop.
627 auto iter = std::find(mPostProcessorsOnce[currentIndex].Begin(), mPostProcessorsOnce[currentIndex].End(), processor);
628 if(iter != mPostProcessorsOnce[currentIndex].End())
630 processor->Process(true);
636 // Clear once processor.
637 mPostProcessorsOnce[currentIndex].Clear();
639 DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_CORE_RUN_POST_PROCESSORS_ONCE", [&](std::ostringstream& oss) {
640 oss << "[" << currentIndex;
641 if(mPostProcessorUnregistered)
643 oss << ", processor changed";
649 if(mPostProcessors.Count() != 0)
651 DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_CORE_RUN_POST_PROCESSORS", [&](std::ostringstream& oss) {
652 oss << "[" << mPostProcessors.Count() << "]";
655 // Copy processor pointers to prevent changes to vector affecting loop iterator.
656 Dali::Vector<Integration::Processor*> processors(mPostProcessors);
658 // To prevent accessing processor unregistered during the loop
659 mPostProcessorUnregistered = false;
661 for(auto processor : processors)
665 if(!mPostProcessorUnregistered)
667 DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_CORE_RUN_POST_PROCESSOR", [&](std::ostringstream& oss) {
668 oss << "[" << processor->GetProcessorName() << "]";
670 processor->Process(true);
671 DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_CORE_RUN_POST_PROCESSOR", [&](std::ostringstream& oss) {
672 oss << "[" << processor->GetProcessorName() << "]";
677 // Run processor if the processor is still in the list.
678 // It may be removed during the loop.
679 auto iter = std::find(mPostProcessors.Begin(), mPostProcessors.End(), processor);
680 if(iter != mPostProcessors.End())
682 DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_CORE_RUN_POST_PROCESSOR", [&](std::ostringstream& oss) {
683 oss << "[" << processor->GetProcessorName() << "]";
685 processor->Process(true);
686 DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_CORE_RUN_POST_PROCESSOR", [&](std::ostringstream& oss) {
687 oss << "[" << processor->GetProcessorName() << "]";
694 DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_CORE_RUN_POST_PROCESSORS", [&](std::ostringstream& oss) {
695 oss << "[" << mPostProcessors.Count();
696 if(mPostProcessorUnregistered)
698 oss << ", processor changed";
705 StagePtr Core::GetCurrentStage()
710 PlatformAbstraction& Core::GetPlatform()
715 UpdateManager& Core::GetUpdateManager()
717 return *(mUpdateManager);
720 RenderManager& Core::GetRenderManager()
722 return *(mRenderManager);
725 NotificationManager& Core::GetNotificationManager()
727 return *(mNotificationManager);
730 ShaderFactory& Core::GetShaderFactory()
732 return *(mShaderFactory);
735 GestureEventProcessor& Core::GetGestureEventProcessor()
737 return *(mGestureEventProcessor);
740 RelayoutController& Core::GetRelayoutController()
742 return *(mRelayoutController.Get());
745 ObjectRegistry& Core::GetObjectRegistry() const
747 return *(mObjectRegistry.Get());
750 void Core::LogMemoryPools() const
752 uint32_t animationPoolCapacity = SceneGraph::Animation::GetMemoryPoolCapacity();
753 uint32_t renderItemPoolCapacity = SceneGraph::RenderItem::GetMemoryPoolCapacity();
754 uint32_t relayoutItemPoolCapacity = mRelayoutController->GetMemoryPoolCapacity();
755 uint32_t rendererPoolCapacity = SceneGraph::Renderer::GetMemoryPoolCapacity();
756 uint32_t textureSetPoolCapacity = SceneGraph::TextureSet::GetMemoryPoolCapacity();
757 uint32_t renderTaskPoolCapacity = SceneGraph::RenderTaskList::GetMemoryPoolCapacity();
758 uint32_t nodePoolCapacity = SceneGraph::Node::GetMemoryPoolCapacity();
760 DALI_LOG_RELEASE_INFO(
761 "\nMemory Pool capacities:\n"
763 " RenderItems: %lu\n"
764 " RelayoutItems: %lu\n"
766 " TextureSets: %lu\n"
767 " RenderTasks: %lu\n"
769 animationPoolCapacity,
770 renderItemPoolCapacity,
771 relayoutItemPoolCapacity,
772 rendererPoolCapacity,
773 textureSetPoolCapacity,
774 renderTaskPoolCapacity,
777 uint32_t updateQCapacity = mUpdateManager->GetUpdateMessageQueueCapacity();
778 uint32_t renderQCapacity = mUpdateManager->GetRenderMessageQueueCapacity();
780 DALI_LOG_RELEASE_INFO(
781 "\nMessage Queue capacities:\n"
782 " UpdateQueue: %lu\n"
783 " RenderQueue: %lu\n",
787 size_t renderInstructionCapacity = mUpdateManager->GetRenderInstructionCapacity();
788 DALI_LOG_RELEASE_INFO("\nRenderInstruction capacity: %lu\n", renderInstructionCapacity);
791 EventThreadServices& Core::GetEventThreadServices()
796 PropertyNotificationManager& Core::GetPropertyNotificationManager() const
798 return *(mPropertyNotificationManager);
801 AnimationPlaylist& Core::GetAnimationPlaylist() const
803 return *(mAnimationPlaylist);
806 Integration::GraphicsConfig& Core::GetGraphicsConfig() const
808 return mGraphicsController.GetGraphicsConfig();
811 void Core::AddScene(Scene* scene)
813 mScenes.push_back(scene);
816 void Core::RemoveScene(Scene* scene)
818 auto iter = std::find(mScenes.begin(), mScenes.end(), scene);
819 if(iter != mScenes.end())
825 void Core::CreateThreadLocalStorage()
827 // a pointer to the ThreadLocalStorage object will be stored in TLS
828 // The ThreadLocalStorage object should be deleted by the Core destructor
829 ThreadLocalStorage* tls = new ThreadLocalStorage(this);
833 void Core::RegisterObject(Dali::BaseObject* object)
835 mObjectRegistry = &ThreadLocalStorage::Get().GetObjectRegistry();
836 mObjectRegistry->RegisterObject(object);
839 void Core::UnregisterObject(Dali::BaseObject* object)
841 mObjectRegistry = &ThreadLocalStorage::Get().GetObjectRegistry();
842 mObjectRegistry->UnregisterObject(object);
845 Integration::RenderController& Core::GetRenderController()
847 return mRenderController;
850 uint32_t* Core::ReserveMessageSlot(uint32_t size, bool updateScene)
852 return mUpdateManager->ReserveMessageSlot(size, updateScene);
855 BufferIndex Core::GetEventBufferIndex() const
857 return mUpdateManager->GetEventBufferIndex();
860 } // namespace Internal