X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fadaptor%2Fcommon%2Fadaptor-impl.cpp;h=d023730a7f48308df18b7f185785fc42b2f11914;hb=refs%2Fchanges%2F85%2F291185%2F1;hp=8522cf93dafd2d5ab009b45edd7bb2aa09b23a8e;hpb=bbe5a96ed862b43ad01299f2c298fe2e90e3e70b;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/adaptor/common/adaptor-impl.cpp b/dali/internal/adaptor/common/adaptor-impl.cpp index 8522cf9..d023730 100644 --- a/dali/internal/adaptor/common/adaptor-impl.cpp +++ b/dali/internal/adaptor/common/adaptor-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 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. @@ -76,6 +76,7 @@ #include #include +#include #include #include @@ -94,6 +95,8 @@ namespace thread_local Adaptor* gThreadLocalAdaptor = NULL; // raw thread specific pointer to allow Adaptor::Get DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_PERFORMANCE_MARKER, false); + +const char* ENABLE_IMAGE_LOADER_PLUGIN_ENV = "DALI_ENABLE_IMAGE_LOADER_PLUGIN"; } // unnamed namespace Dali::Adaptor* Adaptor::New(Dali::Integration::SceneHolder window, Dali::RenderSurfaceInterface* surface, EnvironmentOptions* environmentOptions, ThreadMode threadMode) @@ -427,7 +430,12 @@ void Adaptor::Start() ProcessCoreEvents(); // Ensure any startup messages are processed. // Initialize the image loader plugin - Internal::Adaptor::ImageLoaderPluginProxy::Initialize(); + auto enablePluginString = Dali::EnvironmentVariable::GetEnvironmentVariable(ENABLE_IMAGE_LOADER_PLUGIN_ENV); + bool enablePlugin = enablePluginString ? std::atoi(enablePluginString) : false; + if(enablePlugin) + { + Internal::Adaptor::ImageLoaderPluginProxy::Initialize(); + } for(ObserverContainer::iterator iter = mObservers.begin(), endIter = mObservers.end(); iter != endIter; ++iter) { @@ -546,7 +554,12 @@ void Adaptor::Stop() } // Destroy the image loader plugin - Internal::Adaptor::ImageLoaderPluginProxy::Destroy(); + auto enablePluginString = Dali::EnvironmentVariable::GetEnvironmentVariable(ENABLE_IMAGE_LOADER_PLUGIN_ENV); + bool enablePlugin = enablePluginString ? std::atoi(enablePluginString) : false; + if(enablePlugin) + { + Internal::Adaptor::ImageLoaderPluginProxy::Destroy(); + } delete mNotificationTrigger; mNotificationTrigger = NULL;