Make OffscreenApplication also use FrameworkFactory 61/295961/1
authorEunki, Hong <eunkiki.hong@samsung.com>
Tue, 18 Jul 2023 01:54:45 +0000 (10:54 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Tue, 18 Jul 2023 01:56:33 +0000 (10:56 +0900)
Change-Id: I806d5d6d7db7e0dfecb216387ff2ba8086859d8d
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali/internal/offscreen/common/offscreen-application-impl.cpp
dali/internal/offscreen/common/offscreen-application-impl.h

index 3676131..0b2682c 100644 (file)
@@ -51,7 +51,8 @@ OffscreenApplication::OffscreenApplication(uint16_t width, uint16_t height, Dali
   Dali::Accessibility::Bridge::DisableAutoInit();
 
   // Now we assume separated main loop for the offscreen application
-  mFramework = Internal::Adaptor::GetFrameworkFactory()->CreateFramework(Internal::Adaptor::FrameworkBackend::GLIB, *this, *this, nullptr, nullptr, Adaptor::Framework::NORMAL, false);
+  mFrameworkFactory = std::unique_ptr<Adaptor::FrameworkFactory>(Dali::Internal::Adaptor::CreateFrameworkFactory());
+  mFramework        = mFrameworkFactory->CreateFramework(Internal::Adaptor::FrameworkBackend::GLIB, *this, *this, nullptr, nullptr, Adaptor::Framework::NORMAL, false);
 
   // Generate a default window
   IntrusivePtr<Internal::OffscreenWindow> impl = Internal::OffscreenWindow::New(width, height, surface, isTranslucent);
index b049c13..f12ce4d 100644 (file)
@@ -35,6 +35,11 @@ class Adaptor;
 
 namespace Internal
 {
+namespace Adaptor
+{
+class FrameworkFactory;
+} // namespace Adaptor
+
 /**
  * Implementation of the OffscreenApplication class.
  */
@@ -138,7 +143,8 @@ private:
   std::unique_ptr<Dali::Adaptor> mAdaptor;
   Dali::OffscreenWindow          mDefaultWindow;
 
-  std::unique_ptr<Internal::Adaptor::Framework> mFramework;
+  std::unique_ptr<Internal::Adaptor::Framework>        mFramework;
+  std::unique_ptr<Internal::Adaptor::FrameworkFactory> mFrameworkFactory;
 
   OffscreenApplicationSignalType mInitSignal;
   OffscreenApplicationSignalType mTerminateSignal;