From e1455f9c97e403ca4fb69b548b43e96adbde42cb Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Wed, 12 Jul 2023 11:17:58 +0900 Subject: [PATCH] Change deletion order of FrameworkFactory Ensure to delete FrameworkFactory after WindowSystem::Shutdown in the Application destructor Change-Id: Ica037f38c15cdca60b57c3467b89f6129f4889ab --- .../adaptor-test-application.h | 6 +++++- .../adaptor/android/framework-factory-android.cpp | 25 ++++++++++++++++------ .../adaptor/android/framework-factory-android.h | 3 +++ .../androidjni/framework-factory-androidjni.cpp | 25 ++++++++++++++++------ .../androidjni/framework-factory-androidjni.h | 3 +++ dali/internal/adaptor/common/application-impl.cpp | 15 +++++++------ dali/internal/adaptor/common/application-impl.h | 6 ++++-- dali/internal/adaptor/common/framework-factory.h | 10 ++++++++- .../adaptor/glib/framework-factory-glib.cpp | 25 ++++++++++++++++------ .../internal/adaptor/glib/framework-factory-glib.h | 3 +++ .../adaptor/libuv/framework-factory-libuv.cpp | 25 ++++++++++++++++------ .../adaptor/libuv/framework-factory-libuv.h | 3 +++ .../internal/adaptor/macos/framework-factory-mac.h | 3 +++ .../adaptor/macos/framework-factory-mac.mm | 25 ++++++++++++++++------ .../tizen-wayland/framework-factory-tizen.cpp | 25 ++++++++++++++++------ .../tizen-wayland/framework-factory-tizen.h | 5 ++++- .../adaptor/ubuntu/framework-factory-ubuntu.cpp | 25 ++++++++++++++++------ .../adaptor/ubuntu/framework-factory-ubuntu.h | 3 +++ .../adaptor/windows/framework-factory-win.cpp | 25 ++++++++++++++++------ .../adaptor/windows/framework-factory-win.h | 3 +++ 20 files changed, 195 insertions(+), 68 deletions(-) diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/adaptor-test-application.h b/automated-tests/src/dali-adaptor/dali-test-suite-utils/adaptor-test-application.h index 6d23c2f..386b946 100644 --- a/automated-tests/src/dali-adaptor/dali-test-suite-utils/adaptor-test-application.h +++ b/automated-tests/src/dali-adaptor/dali-test-suite-utils/adaptor-test-application.h @@ -2,7 +2,7 @@ #define DALI_ADAPTOR_TEST_APPLICATION_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ */ // INTERNAL INCLUDES +#include #include "adaptor-test-adaptor-impl.h" #include "test-application.h" @@ -37,11 +38,14 @@ public: : TestApplication(surfaceWidth, surfaceHeight, horizontalDpi, verticalDpi) { Internal::Adaptor::Adaptor::SetAvailable(); + mFrameworkFactory = std::unique_ptr(Dali::Internal::Adaptor::CreateFrameworkFactory()); } ~AdaptorTestApplication() { } + + std::unique_ptr mFrameworkFactory; }; } // namespace Dali diff --git a/dali/internal/adaptor/android/framework-factory-android.cpp b/dali/internal/adaptor/android/framework-factory-android.cpp index 29acd0b..70b74f8 100644 --- a/dali/internal/adaptor/android/framework-factory-android.cpp +++ b/dali/internal/adaptor/android/framework-factory-android.cpp @@ -28,20 +28,31 @@ namespace Internal { namespace Adaptor { +FrameworkFactory* gFrameworkFactory = nullptr; + +FrameworkFactoryAndroid::FrameworkFactoryAndroid() +{ + gFrameworkFactory = this; +} + +FrameworkFactoryAndroid::~FrameworkFactoryAndroid() +{ + gFrameworkFactory = nullptr; +} + std::unique_ptr FrameworkFactoryAndroid::CreateFramework(FrameworkBackend backend, Framework::Observer& observer, Framework::TaskObserver& taskObserver, int* argc, char*** argv, Framework::Type type, bool useUiThread) { return Utils::MakeUnique(observer, taskObserver, argc, argv, type, useUiThread); } -FrameworkFactory* GetFrameworkFactory() +FrameworkFactory* CreateFrameworkFactory() { - static std::unique_ptr frameworkFactory = nullptr; + return (new FrameworkFactoryAndroid()); +} - if(!frameworkFactory) - { - frameworkFactory = Utils::MakeUnique(); - } - return frameworkFactory.get(); +FrameworkFactory* GetFrameworkFactory() +{ + return gFrameworkFactory; } } // namespace Adaptor diff --git a/dali/internal/adaptor/android/framework-factory-android.h b/dali/internal/adaptor/android/framework-factory-android.h index 4b3b9e6..49e2965 100644 --- a/dali/internal/adaptor/android/framework-factory-android.h +++ b/dali/internal/adaptor/android/framework-factory-android.h @@ -29,6 +29,9 @@ namespace Adaptor class FrameworkFactoryAndroid : public FrameworkFactory { public: + FrameworkFactoryAndroid(); + ~FrameworkFactoryAndroid(); + std::unique_ptr CreateFramework(FrameworkBackend frameworkType, Framework::Observer& observer, Framework::TaskObserver& taskObserver, int* argc, char*** argv, Framework::Type type, bool useUiThread) override; }; diff --git a/dali/internal/adaptor/androidjni/framework-factory-androidjni.cpp b/dali/internal/adaptor/androidjni/framework-factory-androidjni.cpp index d4dd93c..4d7849d 100644 --- a/dali/internal/adaptor/androidjni/framework-factory-androidjni.cpp +++ b/dali/internal/adaptor/androidjni/framework-factory-androidjni.cpp @@ -28,20 +28,31 @@ namespace Internal { namespace Adaptor { +FrameworkFactory* gFrameworkFactory = nullptr; + +FrameworkFactoryAndroidJni::FrameworkFactoryAndroidJni() +{ + gFrameworkFactory = this; +} + +FrameworkFactoryAndroidJni::~FrameworkFactoryAndroidJni() +{ + gFrameworkFactory = nullptr; +} + std::unique_ptr FrameworkFactoryAndroidJni::CreateFramework(FrameworkBackend backend, Framework::Observer& observer, Framework::TaskObserver& taskObserver, int* argc, char*** argv, Framework::Type type, bool useUiThread) { return Utils::MakeUnique(observer, taskObserver, argc, argv, type, useUiThread); } -FrameworkFactory* GetFrameworkFactory() +FrameworkFactory* CreateFrameworkFactory() { - static std::unique_ptr frameworkFactory = nullptr; + return (new FrameworkFactoryAndroidJni()); +} - if(!frameworkFactory) - { - frameworkFactory = Utils::MakeUnique(); - } - return frameworkFactory.get(); +FrameworkFactory* GetFrameworkFactory() +{ + return gFrameworkFactory; } } // namespace Adaptor diff --git a/dali/internal/adaptor/androidjni/framework-factory-androidjni.h b/dali/internal/adaptor/androidjni/framework-factory-androidjni.h index 782ed97..a3ead02 100644 --- a/dali/internal/adaptor/androidjni/framework-factory-androidjni.h +++ b/dali/internal/adaptor/androidjni/framework-factory-androidjni.h @@ -29,6 +29,9 @@ namespace Adaptor class FrameworkFactoryAndroidJni : public FrameworkFactory { public: + FrameworkFactoryAndroidJni(); + ~FrameworkFactoryAndroidJni(); + std::unique_ptr CreateFramework(FrameworkBackend frameworkType, Framework::Observer& observer, Framework::TaskObserver& taskObserver, int* argc, char*** argv, Framework::Type type, bool useUiThread) override; }; diff --git a/dali/internal/adaptor/common/application-impl.cpp b/dali/internal/adaptor/common/application-impl.cpp index 9bad3be..13a5fe6 100644 --- a/dali/internal/adaptor/common/application-impl.cpp +++ b/dali/internal/adaptor/common/application-impl.cpp @@ -81,11 +81,11 @@ void Application::PreInitialize(int* argc, char** argv[]) { if(!gPreInitializedApplication) { - char* retEnv = std::getenv("TIZEN_UI_THREAD"); - bool isUseUIThread = false; + char* retEnv = std::getenv("TIZEN_UI_THREAD"); + bool isUseUIThread = false; if(retEnv) { - std::string uiThreadEnv = retEnv; + std::string uiThreadEnv = retEnv; std::string enabledString = "true"; if(uiThreadEnv == enabledString) { @@ -101,15 +101,13 @@ void Application::PreInitialize(int* argc, char** argv[]) { DALI_LOG_RELEASE_INFO("PRE_INITIALIZED with UI Threading"); gPreInitializedApplication->mUIThreadLoader = new UIThreadLoader(argc, argv); - gPreInitializedApplication->mUIThreadLoader->Run([&](){gPreInitializedApplication->CreateWindow();}); + gPreInitializedApplication->mUIThreadLoader->Run([&]() { gPreInitializedApplication->CreateWindow(); }); } else { DALI_LOG_RELEASE_INFO("Only PRE_INITIALIZED"); gPreInitializedApplication->CreateWindow(); // Only create window } - - } } @@ -123,6 +121,7 @@ Application::Application(int* argc, char** argv[], const std::string& stylesheet mLanguageChangedSignal(), mRegionChangedSignal(), mFramework(nullptr), + mFrameworkFactory(nullptr), mCommandLineOptions(nullptr), mAdaptorBuilder(nullptr), mAdaptor(nullptr), @@ -152,7 +151,9 @@ Application::Application(int* argc, char** argv[], const std::string& stylesheet } mCommandLineOptions = new CommandLineOptions(argc, argv); - mFramework = Dali::Internal::Adaptor::GetFrameworkFactory()->CreateFramework(FrameworkBackend::DEFAULT, *this, *this, argc, argv, applicationType, mUseUiThread); + + mFrameworkFactory = std::unique_ptr(Dali::Internal::Adaptor::CreateFrameworkFactory()); + mFramework = mFrameworkFactory->CreateFramework(FrameworkBackend::DEFAULT, *this, *this, argc, argv, applicationType, mUseUiThread); mUseRemoteSurface = (applicationType == Framework::WATCH); } diff --git a/dali/internal/adaptor/common/application-impl.h b/dali/internal/adaptor/common/application-impl.h index 914664a..26d478f 100644 --- a/dali/internal/adaptor/common/application-impl.h +++ b/dali/internal/adaptor/common/application-impl.h @@ -54,6 +54,7 @@ enum State } // namespace Launchpad class CommandLineOptions; +class FrameworkFactory; typedef Dali::Rect PositionSize; @@ -520,7 +521,8 @@ private: LowMemorySignalType mTaskLowMemorySignal; DeviceOrientationChangedSignalType mTaskDeviceOrientationChangedSignal; - std::unique_ptr mFramework; + std::unique_ptr mFramework; + std::unique_ptr mFrameworkFactory; CommandLineOptions* mCommandLineOptions; @@ -544,7 +546,7 @@ private: SlotDelegate mSlotDelegate; - UIThreadLoader* mUIThreadLoader; + UIThreadLoader* mUIThreadLoader; static ApplicationPtr gPreInitializedApplication; }; diff --git a/dali/internal/adaptor/common/framework-factory.h b/dali/internal/adaptor/common/framework-factory.h index 885cdb1..9b67976 100644 --- a/dali/internal/adaptor/common/framework-factory.h +++ b/dali/internal/adaptor/common/framework-factory.h @@ -46,7 +46,15 @@ public: } }; -extern FrameworkFactory* GetFrameworkFactory(); +/** + * @brief Creates a framework factory + */ +FrameworkFactory* CreateFrameworkFactory(); + +/** + * @brief Gets a framework factory + */ +FrameworkFactory* GetFrameworkFactory(); } // namespace Adaptor } // namespace Internal diff --git a/dali/internal/adaptor/glib/framework-factory-glib.cpp b/dali/internal/adaptor/glib/framework-factory-glib.cpp index baf5954..aa92665 100644 --- a/dali/internal/adaptor/glib/framework-factory-glib.cpp +++ b/dali/internal/adaptor/glib/framework-factory-glib.cpp @@ -28,20 +28,31 @@ namespace Internal { namespace Adaptor { +FrameworkFactory* gFrameworkFactory = nullptr; + +FrameworkFactoryGlib::FrameworkFactoryGlib() +{ + gFrameworkFactory = this; +} + +FrameworkFactoryGlib::~FrameworkFactoryGlib() +{ + gFrameworkFactory = nullptr; +} + std::unique_ptr FrameworkFactoryGlib::CreateFramework(FrameworkBackend backend, Framework::Observer& observer, Framework::TaskObserver& taskObserver, int* argc, char*** argv, Framework::Type type, bool useUiThread) { return Utils::MakeUnique(observer, taskObserver, argc, argv, type, useUiThread); } -FrameworkFactory* GetFrameworkFactory() +FrameworkFactory* CreateFrameworkFactory() { - static std::unique_ptr frameworkFactory = nullptr; + return (new FrameworkFactoryGlib()); +} - if(!frameworkFactory) - { - frameworkFactory = Utils::MakeUnique(); - } - return frameworkFactory.get(); +FrameworkFactory* GetFrameworkFactory() +{ + return gFrameworkFactory; } } // namespace Adaptor diff --git a/dali/internal/adaptor/glib/framework-factory-glib.h b/dali/internal/adaptor/glib/framework-factory-glib.h index 5969b3b..f38877b 100644 --- a/dali/internal/adaptor/glib/framework-factory-glib.h +++ b/dali/internal/adaptor/glib/framework-factory-glib.h @@ -29,6 +29,9 @@ namespace Adaptor class FrameworkFactoryGlib : public FrameworkFactory { public: + FrameworkFactoryGlib(); + ~FrameworkFactoryGlib(); + std::unique_ptr CreateFramework(FrameworkBackend frameworkType, Framework::Observer& observer, Framework::TaskObserver& taskObserver, int* argc, char*** argv, Framework::Type type, bool useUiThread) override; }; diff --git a/dali/internal/adaptor/libuv/framework-factory-libuv.cpp b/dali/internal/adaptor/libuv/framework-factory-libuv.cpp index b608d45..8b25184 100644 --- a/dali/internal/adaptor/libuv/framework-factory-libuv.cpp +++ b/dali/internal/adaptor/libuv/framework-factory-libuv.cpp @@ -28,20 +28,31 @@ namespace Internal { namespace Adaptor { +FrameworkFactory* gFrameworkFactory = nullptr; + +FrameworkFactoryLibuv::FrameworkFactoryLibuv() +{ + gFrameworkFactory = this; +} + +FrameworkFactoryLibuv::~FrameworkFactoryLibuv() +{ + gFrameworkFactory = nullptr; +} + std::unique_ptr FrameworkFactoryLibuv::CreateFramework(FrameworkBackend backend, Framework::Observer& observer, Framework::TaskObserver& taskObserver, int* argc, char*** argv, Framework::Type type, bool useUiThread) { return Utils::MakeUnique(observer, taskObserver, argc, argv, type, useUiThread); } -FrameworkFactory* GetFrameworkFactory() +FrameworkFactory* CreateFrameworkFactory() { - static std::unique_ptr frameworkFactory = nullptr; + return (new FrameworkFactoryLibuv()); +} - if(!frameworkFactory) - { - frameworkFactory = Utils::MakeUnique(); - } - return frameworkFactory.get(); +FrameworkFactory* GetFrameworkFactory() +{ + return gFrameworkFactory; } } // namespace Adaptor diff --git a/dali/internal/adaptor/libuv/framework-factory-libuv.h b/dali/internal/adaptor/libuv/framework-factory-libuv.h index 2b4d0ae..2205761 100644 --- a/dali/internal/adaptor/libuv/framework-factory-libuv.h +++ b/dali/internal/adaptor/libuv/framework-factory-libuv.h @@ -29,6 +29,9 @@ namespace Adaptor class FrameworkFactoryLibuv : public FrameworkFactory { public: + FrameworkFactoryLibuv(); + ~FrameworkFactoryLibuv(); + std::unique_ptr CreateFramework(FrameworkBackend frameworkType, Framework::Observer& observer, Framework::TaskObserver& taskObserver, int* argc, char*** argv, Framework::Type type, bool useUiThread) override; }; diff --git a/dali/internal/adaptor/macos/framework-factory-mac.h b/dali/internal/adaptor/macos/framework-factory-mac.h index 1778d70..44663c3 100644 --- a/dali/internal/adaptor/macos/framework-factory-mac.h +++ b/dali/internal/adaptor/macos/framework-factory-mac.h @@ -29,6 +29,9 @@ namespace Adaptor class FrameworkFactoryMac : public FrameworkFactory { public: + FrameworkFactoryMac(); + ~FrameworkFactoryMac(); + std::unique_ptr CreateFramework(FrameworkBackend frameworkType, Framework::Observer& observer, Framework::TaskObserver& taskObserver, int* argc, char*** argv, Framework::Type type, bool useUiThread) override; }; diff --git a/dali/internal/adaptor/macos/framework-factory-mac.mm b/dali/internal/adaptor/macos/framework-factory-mac.mm index 8deb80e..9d8afa8 100644 --- a/dali/internal/adaptor/macos/framework-factory-mac.mm +++ b/dali/internal/adaptor/macos/framework-factory-mac.mm @@ -28,20 +28,31 @@ namespace Internal { namespace Adaptor { +FrameworkFactory* gFrameworkFactory = nullptr; + +FrameworkFactoryMac::FrameworkFactoryMac() +{ + gFrameworkFactory = this; +} + +FrameworkFactoryMac::~FrameworkFactoryMac() +{ + gFrameworkFactory = nullptr; +} + std::unique_ptr FrameworkFactoryMac::CreateFramework(FrameworkBackend backend, Framework::Observer& observer, Framework::TaskObserver& taskObserver, int* argc, char*** argv, Framework::Type type, bool useUiThread) { return Utils::MakeUnique(observer, taskObserver, argc, argv, type, useUiThread); } -FrameworkFactory* GetFrameworkFactory() +FrameworkFactory* CreateFrameworkFactory() { - static std::unique_ptr frameworkFactory = nullptr; + return (new FrameworkFactoryMac()); +} - if(!frameworkFactory) - { - frameworkFactory = Utils::MakeUnique(); - } - return frameworkFactory.get(); +FrameworkFactory* GetFrameworkFactory() +{ + return gFrameworkFactory; } } // namespace Adaptor diff --git a/dali/internal/adaptor/tizen-wayland/framework-factory-tizen.cpp b/dali/internal/adaptor/tizen-wayland/framework-factory-tizen.cpp index d466db1..fc84ee3 100644 --- a/dali/internal/adaptor/tizen-wayland/framework-factory-tizen.cpp +++ b/dali/internal/adaptor/tizen-wayland/framework-factory-tizen.cpp @@ -29,6 +29,18 @@ namespace Internal { namespace Adaptor { +FrameworkFactory* gFrameworkFactory = nullptr; + +FrameworkFactoryTizen::FrameworkFactoryTizen() +{ + gFrameworkFactory = this; +} + +FrameworkFactoryTizen::~FrameworkFactoryTizen() +{ + gFrameworkFactory = nullptr; +} + std::unique_ptr FrameworkFactoryTizen::CreateFramework(FrameworkBackend backend, Framework::Observer& observer, Framework::TaskObserver& taskObserver, int* argc, char*** argv, Framework::Type type, bool useUiThread) { mBackend = backend; @@ -42,15 +54,14 @@ std::unique_ptr FrameworkFactoryTizen::CreateFramework(FrameworkBacke } } -FrameworkFactory* GetFrameworkFactory() +FrameworkFactory* CreateFrameworkFactory() { - static std::unique_ptr frameworkFactory = nullptr; + return (new FrameworkFactoryTizen()); +} - if(!frameworkFactory) - { - frameworkFactory = Utils::MakeUnique(); - } - return frameworkFactory.get(); +FrameworkFactory* GetFrameworkFactory() +{ + return gFrameworkFactory; } } // namespace Adaptor diff --git a/dali/internal/adaptor/tizen-wayland/framework-factory-tizen.h b/dali/internal/adaptor/tizen-wayland/framework-factory-tizen.h index 68879fb..a337b3b 100644 --- a/dali/internal/adaptor/tizen-wayland/framework-factory-tizen.h +++ b/dali/internal/adaptor/tizen-wayland/framework-factory-tizen.h @@ -29,6 +29,9 @@ namespace Adaptor class FrameworkFactoryTizen : public FrameworkFactory { public: + FrameworkFactoryTizen(); + ~FrameworkFactoryTizen(); + std::unique_ptr CreateFramework(FrameworkBackend frameworkType, Framework::Observer& observer, Framework::TaskObserver& taskObserver, int* argc, char*** argv, Framework::Type type, bool useUiThread) override; FrameworkBackend GetFrameworkBackend() const override @@ -37,7 +40,7 @@ public: } private: - FrameworkBackend mBackend; + FrameworkBackend mBackend{FrameworkBackend::DEFAULT}; }; } // namespace Adaptor diff --git a/dali/internal/adaptor/ubuntu/framework-factory-ubuntu.cpp b/dali/internal/adaptor/ubuntu/framework-factory-ubuntu.cpp index ae2c084..be754e9 100644 --- a/dali/internal/adaptor/ubuntu/framework-factory-ubuntu.cpp +++ b/dali/internal/adaptor/ubuntu/framework-factory-ubuntu.cpp @@ -28,20 +28,31 @@ namespace Internal { namespace Adaptor { +FrameworkFactory* gFrameworkFactory = nullptr; + +FrameworkFactoryUbuntu::FrameworkFactoryUbuntu() +{ + gFrameworkFactory = this; +} + +FrameworkFactoryUbuntu::~FrameworkFactoryUbuntu() +{ + gFrameworkFactory = nullptr; +} + std::unique_ptr FrameworkFactoryUbuntu::CreateFramework(FrameworkBackend backend, Framework::Observer& observer, Framework::TaskObserver& taskObserver, int* argc, char*** argv, Framework::Type type, bool useUiThread) { return Utils::MakeUnique(observer, taskObserver, argc, argv, type, useUiThread); } -FrameworkFactory* GetFrameworkFactory() +FrameworkFactory* CreateFrameworkFactory() { - static std::unique_ptr frameworkFactory = nullptr; + return (new FrameworkFactoryUbuntu()); +} - if(!frameworkFactory) - { - frameworkFactory = Utils::MakeUnique(); - } - return frameworkFactory.get(); +FrameworkFactory* GetFrameworkFactory() +{ + return gFrameworkFactory; } } // namespace Adaptor diff --git a/dali/internal/adaptor/ubuntu/framework-factory-ubuntu.h b/dali/internal/adaptor/ubuntu/framework-factory-ubuntu.h index f7d6b2a..61cf122 100644 --- a/dali/internal/adaptor/ubuntu/framework-factory-ubuntu.h +++ b/dali/internal/adaptor/ubuntu/framework-factory-ubuntu.h @@ -29,6 +29,9 @@ namespace Adaptor class FrameworkFactoryUbuntu : public FrameworkFactory { public: + FrameworkFactoryUbuntu(); + ~FrameworkFactoryUbuntu(); + std::unique_ptr CreateFramework(FrameworkBackend frameworkType, Framework::Observer& observer, Framework::TaskObserver& taskObserver, int* argc, char*** argv, Framework::Type type, bool useUiThread) override; }; diff --git a/dali/internal/adaptor/windows/framework-factory-win.cpp b/dali/internal/adaptor/windows/framework-factory-win.cpp index e94a561..16c595b 100644 --- a/dali/internal/adaptor/windows/framework-factory-win.cpp +++ b/dali/internal/adaptor/windows/framework-factory-win.cpp @@ -28,20 +28,31 @@ namespace Internal { namespace Adaptor { +FrameworkFactory* gFrameworkFactory = nullptr; + +FrameworkFactoryWin::FrameworkFactoryWin() +{ + gFrameworkFactory = this; +} + +FrameworkFactoryWin::~FrameworkFactoryWin() +{ + gFrameworkFactory = nullptr; +} + std::unique_ptr FrameworkFactoryWin::CreateFramework(FrameworkBackend backend, Framework::Observer& observer, Framework::TaskObserver& taskObserver, int* argc, char*** argv, Framework::Type type, bool useUiThread) { return Utils::MakeUnique(observer, taskObserver, argc, argv, type, useUiThread); } -FrameworkFactory* GetFrameworkFactory() +FrameworkFactory* CreateFrameworkFactory() { - static std::unique_ptr frameworkFactory = nullptr; + return (new FrameworkFactoryWin()); +} - if(!frameworkFactory) - { - frameworkFactory = Utils::MakeUnique(); - } - return frameworkFactory.get(); +FrameworkFactory* GetFrameworkFactory() +{ + return gFrameworkFactory; } } // namespace Adaptor diff --git a/dali/internal/adaptor/windows/framework-factory-win.h b/dali/internal/adaptor/windows/framework-factory-win.h index 039e3fa..50c4447 100644 --- a/dali/internal/adaptor/windows/framework-factory-win.h +++ b/dali/internal/adaptor/windows/framework-factory-win.h @@ -29,6 +29,9 @@ namespace Adaptor class FrameworkFactoryWin : public FrameworkFactory { public: + FrameworkFactoryWin(); + ~FrameworkFactoryWin(); + std::unique_ptr CreateFramework(FrameworkBackend frameworkType, Framework::Observer& observer, Framework::TaskObserver& taskObserver, int* argc, char*** argv, Framework::Type type, bool useUiThread) override; }; -- 2.7.4