From 16fb3176584252fd30e0c2aad1fd500ebaf22f87 Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Tue, 12 Mar 2024 16:05:14 +0900 Subject: [PATCH] Let we make adaptor invalidate if adaptor stop There was some issue when we try to destruct some singletone class during application shutting down. Since Adaptor still available, some singletone class try to access another singletone class inside of it's destructor. It might make some problem. To avoid it, let we check that adaptor is stopped at IsAvailable() API. And also, Let we clean-up all registered processor at Stop timing, to avoid unmatched behaviour after we change IsAvailable return false even Core alive. Change-Id: I039578613d5e79b80b091fef4d7993779a395dfb Signed-off-by: Eunki, Hong --- .../dali-adaptor/utc-Dali-NativeImageSource.cpp | 4 +- dali/internal/adaptor/common/adaptor-impl.cpp | 9 +++-- dali/internal/adaptor/common/adaptor.cpp | 44 +++++++++++++++++----- .../android/native-image-source-impl-android.cpp | 5 ++- .../imaging/macos/native-image-source-impl-mac.cpp | 5 ++- .../tizen/native-image-source-impl-tizen.cpp | 5 ++- .../tizen/native-image-source-queue-impl-tizen.cpp | 3 +- .../ubuntu-x11/native-image-source-impl-x.cpp | 5 ++- .../windows/native-image-source-impl-win.cpp | 5 ++- .../imaging/x11/native-image-source-impl-x.cpp | 5 ++- .../legacy/common/tizen-platform-abstraction.cpp | 2 +- .../internal/system/android/timer-impl-android.cpp | 11 +++--- dali/internal/system/linux/timer-impl-ecore.cpp | 11 +++--- .../android/window-system-android.cpp | 4 +- .../ecore-wl/window-system-ecore-wl.cpp | 4 +- .../ecore-wl2/window-system-ecore-wl2.cpp | 4 +- .../ubuntu-x11/window-system-ecore-x.cpp | 4 +- .../window-system/windows/window-system-win.cpp | 4 +- .../internal/window-system/x11/window-system-x.cpp | 4 +- 19 files changed, 88 insertions(+), 50 deletions(-) diff --git a/automated-tests/src/dali-adaptor/utc-Dali-NativeImageSource.cpp b/automated-tests/src/dali-adaptor/utc-Dali-NativeImageSource.cpp index 58a9888..d21c9c0 100644 --- a/automated-tests/src/dali-adaptor/utc-Dali-NativeImageSource.cpp +++ b/automated-tests/src/dali-adaptor/utc-Dali-NativeImageSource.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -42,7 +42,7 @@ int UtcDaliNativeImageSourceNewN(void) catch(Dali::DaliException& e) { DALI_TEST_PRINT_ASSERT(e); - DALI_TEST_ASSERT(e, "Adaptor::IsAvailable()", TEST_LOCATION); + DALI_TEST_ASSERT(e, "Dali::Stage::IsCoreThread()", TEST_LOCATION); } catch(...) { diff --git a/dali/internal/adaptor/common/adaptor-impl.cpp b/dali/internal/adaptor/common/adaptor-impl.cpp index a77acc2..7b5c5b3 100644 --- a/dali/internal/adaptor/common/adaptor-impl.cpp +++ b/dali/internal/adaptor/common/adaptor-impl.cpp @@ -552,10 +552,13 @@ void Adaptor::Stop() mCallbackManager->Stop(); - mState = STOPPED; + mCore->UnregisterProcessors(); RemoveSystemInformation(); + // Note: Must change the state at end of function. + mState = STOPPED; + DALI_LOG_RELEASE_INFO("Adaptor::Stop\n"); } } @@ -750,13 +753,13 @@ bool Adaptor::RemoveWindow(Internal::Adaptor::SceneHolder* childWindow) Dali::Adaptor& Adaptor::Get() { - DALI_ASSERT_ALWAYS(IsAvailable() && "Adaptor not instantiated"); + DALI_ASSERT_ALWAYS((gThreadLocalAdaptor != NULL) && "Adaptor not instantiated"); return gThreadLocalAdaptor->mAdaptor; } bool Adaptor::IsAvailable() { - return gThreadLocalAdaptor != NULL; + return gThreadLocalAdaptor != NULL && (gThreadLocalAdaptor->mState != Adaptor::State::STOPPED); } void Adaptor::SceneCreated() diff --git a/dali/internal/adaptor/common/adaptor.cpp b/dali/internal/adaptor/common/adaptor.cpp index 9c347b4..5d3fbdb 100644 --- a/dali/internal/adaptor/common/adaptor.cpp +++ b/dali/internal/adaptor/common/adaptor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -87,26 +87,52 @@ void Adaptor::Stop() bool Adaptor::AddIdle(CallbackBase* callback, bool hasReturnValue) { - DALI_ASSERT_ALWAYS(IsAvailable() && "Adaptor not instantiated"); - return mImpl->AddIdle(callback, hasReturnValue); + if(IsAvailable()) + { + return mImpl->AddIdle(callback, hasReturnValue); + } + else + { + DALI_LOG_ERROR("Adaptor not instantiated"); + return false; + } } bool Adaptor::AddWindow(Dali::Integration::SceneHolder childWindow) { - DALI_ASSERT_ALWAYS(IsAvailable() && "Adaptor not instantiated"); - return mImpl->AddWindow(childWindow); + if(IsAvailable()) + { + return mImpl->AddWindow(childWindow); + } + else + { + DALI_LOG_ERROR("Adaptor not instantiated"); + return false; + } } void Adaptor::RemoveIdle(CallbackBase* callback) { - DALI_ASSERT_ALWAYS(IsAvailable() && "Adaptor not instantiated"); - mImpl->RemoveIdle(callback); + if(IsAvailable()) + { + mImpl->RemoveIdle(callback); + } + else + { + DALI_LOG_ERROR("Adaptor not instantiated"); + } } void Adaptor::ProcessIdle() { - DALI_ASSERT_ALWAYS(IsAvailable() && "Adaptor not instantiated"); - mImpl->ProcessIdle(); + if(IsAvailable()) + { + mImpl->ProcessIdle(); + } + else + { + DALI_LOG_ERROR("Adaptor not instantiated"); + } } void Adaptor::ReplaceSurface(Window window, Dali::RenderSurfaceInterface& surface) diff --git a/dali/internal/imaging/android/native-image-source-impl-android.cpp b/dali/internal/imaging/android/native-image-source-impl-android.cpp index 96a9f4f..fdf4851 100644 --- a/dali/internal/imaging/android/native-image-source-impl-android.cpp +++ b/dali/internal/imaging/android/native-image-source-impl-android.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -25,6 +25,7 @@ // EXTERNAL INCLUDES #include +#include #include #include @@ -68,7 +69,7 @@ NativeImageSourceAndroid::NativeImageSourceAndroid(uint32_t width, uint32_t heig mEglImageExtensions(NULL), mResourceDestructionCallback() { - DALI_ASSERT_ALWAYS(Adaptor::IsAvailable()); + DALI_ASSERT_ALWAYS(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?"); GraphicsInterface* graphics = &(Adaptor::GetImplementation(Adaptor::Get()).GetGraphicsInterface()); mEglGraphics = static_cast(graphics); diff --git a/dali/internal/imaging/macos/native-image-source-impl-mac.cpp b/dali/internal/imaging/macos/native-image-source-impl-mac.cpp index 21a9931..ffb8dee 100644 --- a/dali/internal/imaging/macos/native-image-source-impl-mac.cpp +++ b/dali/internal/imaging/macos/native-image-source-impl-mac.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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 @@ #include // EXTERNAL INCLUDES +#include #include // INTERNAL INCLUDES @@ -48,7 +49,7 @@ NativeImageSourceCocoa::NativeImageSourceCocoa( : mImage(MakeRef(nullptr)), mResourceDestructionCallback() { - DALI_ASSERT_ALWAYS(Adaptor::IsAvailable()); + DALI_ASSERT_ALWAYS(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?"); DALI_ASSERT_ALWAYS(nativeImageSource.Empty()); CFStringRef colorSpaceName; diff --git a/dali/internal/imaging/tizen/native-image-source-impl-tizen.cpp b/dali/internal/imaging/tizen/native-image-source-impl-tizen.cpp index 93d2861..570ff17 100644 --- a/dali/internal/imaging/tizen/native-image-source-impl-tizen.cpp +++ b/dali/internal/imaging/tizen/native-image-source-impl-tizen.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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 @@ #include // EXTERNAL INCLUDES +#include #include #include #include @@ -91,7 +92,7 @@ NativeImageSourceTizen::NativeImageSourceTizen(uint32_t width, uint32_t height, mIsBufferAcquired(false), mBackBufferEnabled(false) { - DALI_ASSERT_ALWAYS(Adaptor::IsAvailable()); + DALI_ASSERT_ALWAYS(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?"); GraphicsInterface* graphics = &(Adaptor::GetImplementation(Adaptor::Get()).GetGraphicsInterface()); mEglGraphics = static_cast(graphics); diff --git a/dali/internal/imaging/tizen/native-image-source-queue-impl-tizen.cpp b/dali/internal/imaging/tizen/native-image-source-queue-impl-tizen.cpp index 94ad034..602ce31 100644 --- a/dali/internal/imaging/tizen/native-image-source-queue-impl-tizen.cpp +++ b/dali/internal/imaging/tizen/native-image-source-queue-impl-tizen.cpp @@ -19,6 +19,7 @@ #include // EXTERNAL INCLUDES +#include #include #include #include @@ -96,7 +97,7 @@ NativeImageSourceQueueTizen::NativeImageSourceQueueTizen(uint32_t queueCount, ui mIsResized(false), mFreeRequest(false) { - DALI_ASSERT_ALWAYS(Adaptor::IsAvailable()); + DALI_ASSERT_ALWAYS(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?"); GraphicsInterface* graphics = &(Adaptor::GetImplementation(Adaptor::Get()).GetGraphicsInterface()); mEglGraphics = static_cast(graphics); diff --git a/dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.cpp b/dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.cpp index 7c86a3e..ba50e37 100644 --- a/dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.cpp +++ b/dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -21,6 +21,7 @@ // EXTERNAL INCLUDES #include #include +#include #include #include @@ -96,7 +97,7 @@ NativeImageSourceX::NativeImageSourceX(uint32_t width, uint32_t height, Dali::Na mEglImageExtensions(NULL), mResourceDestructionCallback() { - DALI_ASSERT_ALWAYS(Adaptor::IsAvailable()); + DALI_ASSERT_ALWAYS(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?"); GraphicsInterface* graphics = &(Adaptor::GetImplementation(Adaptor::Get()).GetGraphicsInterface()); mEglGraphics = static_cast(graphics); diff --git a/dali/internal/imaging/windows/native-image-source-impl-win.cpp b/dali/internal/imaging/windows/native-image-source-impl-win.cpp index 11a8a87..7b78a5f 100644 --- a/dali/internal/imaging/windows/native-image-source-impl-win.cpp +++ b/dali/internal/imaging/windows/native-image-source-impl-win.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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 @@ #include // EXTERNAL INCLUDES +#include #include // INTERNAL INCLUDES @@ -62,7 +63,7 @@ NativeImageSourceWin::NativeImageSourceWin(uint32_t width, uint32_t height, Dali mEglImageExtensions(NULL), mResourceDestructionCallback() { - DALI_ASSERT_ALWAYS(Adaptor::IsAvailable()); + DALI_ASSERT_ALWAYS(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?"); GraphicsInterface* graphics = &(Adaptor::GetImplementation(Adaptor::Get()).GetGraphicsInterface()); mEglGraphics = static_cast(graphics); diff --git a/dali/internal/imaging/x11/native-image-source-impl-x.cpp b/dali/internal/imaging/x11/native-image-source-impl-x.cpp index 3a71586d..5419470 100644 --- a/dali/internal/imaging/x11/native-image-source-impl-x.cpp +++ b/dali/internal/imaging/x11/native-image-source-impl-x.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -21,6 +21,7 @@ // EXTERNAL INCLUDES #include #include +#include #include // INTERNAL INCLUDES @@ -97,7 +98,7 @@ NativeImageSourceX::NativeImageSourceX(uint32_t width, uint32_t height, Dali::Na mEglImageExtensions(NULL), mResourceDestructionCallback() { - DALI_ASSERT_ALWAYS(Adaptor::IsAvailable()); + DALI_ASSERT_ALWAYS(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?"); GraphicsInterface* graphics = &(Adaptor::GetImplementation(Adaptor::Get()).GetGraphicsInterface()); auto eglGraphics = static_cast(graphics); diff --git a/dali/internal/legacy/common/tizen-platform-abstraction.cpp b/dali/internal/legacy/common/tizen-platform-abstraction.cpp index 220ac82..e783f8f 100644 --- a/dali/internal/legacy/common/tizen-platform-abstraction.cpp +++ b/dali/internal/legacy/common/tizen-platform-abstraction.cpp @@ -234,7 +234,7 @@ void TizenPlatformAbstraction::RunTimerFunction(TimerCallback& timerPtr) mTimerPairsWaiting.erase(timerIter, timerIter + 1); - if(DALI_UNLIKELY(!Dali::Adaptor::Get().AddIdle(MakeCallback(this, &TizenPlatformAbstraction::CleanupTimers), false))) + if(DALI_UNLIKELY(!Dali::Adaptor::IsAvailable() || !Dali::Adaptor::Get().AddIdle(MakeCallback(this, &TizenPlatformAbstraction::CleanupTimers), false))) { DALI_LOG_ERROR("Fail to add idle callback for timer function. Call it synchronously.\n"); CleanupTimers(); diff --git a/dali/internal/system/android/timer-impl-android.cpp b/dali/internal/system/android/timer-impl-android.cpp index 6e9aee4..f5a6403 100644 --- a/dali/internal/system/android/timer-impl-android.cpp +++ b/dali/internal/system/android/timer-impl-android.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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 @@ #include // EXTERNAL INCLUDES +#include #include // INTERNAL INCLUDES @@ -122,7 +123,7 @@ bool TimerCallback(void* data) void TimerAndroid::Start() { // Timer should be used in the event thread - DALI_ASSERT_DEBUG(Adaptor::IsAvailable()); + DALI_ASSERT_DEBUG(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?"); if(mImpl->mRunning) { @@ -137,7 +138,7 @@ void TimerAndroid::Start() void TimerAndroid::Stop() { // Timer should be used in the event thread - DALI_ASSERT_DEBUG(Adaptor::IsAvailable()); + DALI_ASSERT_DEBUG(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?"); if(mImpl->mId != 0) { @@ -152,7 +153,7 @@ void TimerAndroid::Stop() void TimerAndroid::Pause() { // Timer should be used in the event thread - DALI_ASSERT_DEBUG(Adaptor::IsAvailable()); + DALI_ASSERT_DEBUG(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?"); if(mImpl->mRunning) { @@ -165,7 +166,7 @@ void TimerAndroid::Pause() void TimerAndroid::Resume() { // Timer should be used in the event thread - DALI_ASSERT_DEBUG(Adaptor::IsAvailable()); + DALI_ASSERT_DEBUG(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?"); if(mImpl->mRunning && mImpl->mId == 0) { diff --git a/dali/internal/system/linux/timer-impl-ecore.cpp b/dali/internal/system/linux/timer-impl-ecore.cpp index d45425e..b0e110b 100644 --- a/dali/internal/system/linux/timer-impl-ecore.cpp +++ b/dali/internal/system/linux/timer-impl-ecore.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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 @@ #include // EXTERNAL INCLUDES +#include #include // INTERNAL INCLUDES @@ -83,7 +84,7 @@ TimerEcore::~TimerEcore() void TimerEcore::Start() { // Timer should be used in the event thread - DALI_ASSERT_ALWAYS(Adaptor::IsAvailable()); + DALI_ASSERT_ALWAYS(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?"); if(mImpl->mId != NULL) { @@ -103,7 +104,7 @@ void TimerEcore::Start() void TimerEcore::Stop() { // Timer should be used in the event thread - DALI_ASSERT_ALWAYS(Adaptor::IsAvailable()); + DALI_ASSERT_ALWAYS(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?"); ResetTimerData(); } @@ -111,7 +112,7 @@ void TimerEcore::Stop() void TimerEcore::Pause() { // Timer should be used in the event thread - DALI_ASSERT_ALWAYS(Adaptor::IsAvailable()); + DALI_ASSERT_ALWAYS(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?"); if(mImpl->mId != NULL) { @@ -128,7 +129,7 @@ void TimerEcore::Pause() void TimerEcore::Resume() { // Timer should be used in the event thread - DALI_ASSERT_ALWAYS(Adaptor::IsAvailable()); + DALI_ASSERT_ALWAYS(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?"); if(mImpl->mId != NULL) { diff --git a/dali/internal/window-system/android/window-system-android.cpp b/dali/internal/window-system/android/window-system-android.cpp index d28d761..f3fdb2f 100644 --- a/dali/internal/window-system/android/window-system-android.cpp +++ b/dali/internal/window-system/android/window-system-android.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -92,7 +92,7 @@ void SetGeometryHittestEnabled(bool enable) { DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable); gGeometryHittest = enable; - if(gGeometryHittest) + if(gGeometryHittest && Dali::Adaptor::IsAvailable()) { Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders(); for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter) diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl/window-system-ecore-wl.cpp b/dali/internal/window-system/tizen-wayland/ecore-wl/window-system-ecore-wl.cpp index f99132d..105cf0f 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl/window-system-ecore-wl.cpp +++ b/dali/internal/window-system/tizen-wayland/ecore-wl/window-system-ecore-wl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -95,7 +95,7 @@ void SetGeometryHittestEnabled(bool enable) { DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable); gGeometryHittest = enable; - if(gGeometryHittest) + if(gGeometryHittest && Dali::Adaptor::IsAvailable()) { Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders(); for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter) diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-system-ecore-wl2.cpp b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-system-ecore-wl2.cpp index f7fc6c8..5fa1435 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-system-ecore-wl2.cpp +++ b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-system-ecore-wl2.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -212,7 +212,7 @@ void SetGeometryHittestEnabled(bool enable) { DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable); gGeometryHittest = enable; - if(gGeometryHittest) + if(gGeometryHittest && Dali::Adaptor::IsAvailable()) { Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders(); for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter) diff --git a/dali/internal/window-system/ubuntu-x11/window-system-ecore-x.cpp b/dali/internal/window-system/ubuntu-x11/window-system-ecore-x.cpp index f40604d..1812f24 100644 --- a/dali/internal/window-system/ubuntu-x11/window-system-ecore-x.cpp +++ b/dali/internal/window-system/ubuntu-x11/window-system-ecore-x.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -91,7 +91,7 @@ void SetGeometryHittestEnabled(bool enable) { DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable); gGeometryHittest = enable; - if(gGeometryHittest) + if(gGeometryHittest && Dali::Adaptor::IsAvailable()) { Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders(); for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter) diff --git a/dali/internal/window-system/windows/window-system-win.cpp b/dali/internal/window-system/windows/window-system-win.cpp index 2b415de..863d166 100644 --- a/dali/internal/window-system/windows/window-system-win.cpp +++ b/dali/internal/window-system/windows/window-system-win.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -85,7 +85,7 @@ void SetGeometryHittestEnabled(bool enable) { DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable); gGeometryHittest = enable; - if(gGeometryHittest) + if(gGeometryHittest && Dali::Adaptor::IsAvailable()) { Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders(); for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter) diff --git a/dali/internal/window-system/x11/window-system-x.cpp b/dali/internal/window-system/x11/window-system-x.cpp index 3309edb..239c581 100644 --- a/dali/internal/window-system/x11/window-system-x.cpp +++ b/dali/internal/window-system/x11/window-system-x.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -1151,7 +1151,7 @@ void SetGeometryHittestEnabled(bool enable) { DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable); gGeometryHittest = enable; - if(gGeometryHittest) + if(gGeometryHittest && Dali::Adaptor::IsAvailable()) { Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders(); for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter) -- 2.7.4