Implement ProcessorOnce 97/311797/2
authorEunki, Hong <eunkiki.hong@samsung.com>
Tue, 28 May 2024 04:44:02 +0000 (13:44 +0900)
committersunghyun kim <scholb.kim@samsung.com>
Tue, 28 May 2024 06:58:50 +0000 (15:58 +0900)
Since unregister processor during Process will give overhead,
we'd better make another container to process only once time
during ProcessCoreEvent.

Change-Id: Iba6de22000328329b036018481b90f98a961d6b9
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor-impl.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor.cpp

index 6a69f938b4bab9deb76475accb529fc36bbf6361..07e8ffdb3fec5589a7527f2d31fbc57c8cc470fa 100644 (file)
@@ -85,6 +85,8 @@ public:
 
   void RegisterProcessor(Integration::Processor& processor, bool postProcessor = false);
   void UnregisterProcessor(Integration::Processor& processor, bool postProcessor = false);
+  void RegisterProcessorOnce(Integration::Processor& processor, bool postProcessor = false);
+  void UnregisterProcessorOnce(Integration::Processor& processor, bool postProcessor = false);
 
   void SetApplication(Dali::TestApplication& testApplication);
 
index 40c73ae1a74d46275baf12363438b170904f67bf..3c9445aa80baa52425cdb80055cfb39fc2699f59 100644 (file)
@@ -237,6 +237,20 @@ void Adaptor::UnregisterProcessor(Integration::Processor& processor, bool postPr
   core.UnregisterProcessor(processor, postProcessor);
 }
 
+void Adaptor::RegisterProcessorOnce(Integration::Processor& processor, bool postProcessor)
+{
+  Integration::Core& core = mTestApplication->GetCore();
+  tet_printf("Adaptor::RegisterProcessorOnce : %s\n", processor.GetProcessorName().data());
+  core.RegisterProcessorOnce(processor, postProcessor);
+}
+
+void Adaptor::UnregisterProcessorOnce(Integration::Processor& processor, bool postProcessor)
+{
+  Integration::Core& core = mTestApplication->GetCore();
+  tet_printf("Adaptor::UnregisterProcessorOnce : %s\n", processor.GetProcessorName().data());
+  core.UnregisterProcessorOnce(processor, postProcessor);
+}
+
 void Adaptor::SetApplication(Dali::TestApplication& testApplication)
 {
   mTestApplication = &testApplication;
@@ -459,4 +473,14 @@ void Adaptor::UnregisterProcessor(Integration::Processor& processor, bool postPr
   mImpl->UnregisterProcessor(processor, postProcessor);
 }
 
+void Adaptor::RegisterProcessorOnce(Integration::Processor& processor, bool postProcessor)
+{
+  mImpl->RegisterProcessorOnce(processor, postProcessor);
+}
+
+void Adaptor::UnregisterProcessorOnce(Integration::Processor& processor, bool postProcessor)
+{
+  mImpl->UnregisterProcessorOnce(processor, postProcessor);
+}
+
 } // namespace Dali