[dali_2.3.24] Merge branch 'devel/master' 09/311309/1 master
authorDavid Steele <david.steele@samsung.com>
Fri, 17 May 2024 11:11:40 +0000 (12:11 +0100)
committerDavid Steele <david.steele@samsung.com>
Fri, 17 May 2024 11:11:40 +0000 (12:11 +0100)
Change-Id: Ia6b0346935629a927b4e7868178f676a639d86bd

40 files changed:
automated-tests/src/dali-graphics/CMakeLists.txt
automated-tests/src/dali-graphics/utc-Dali-GraphicsShader.cpp [new file with mode: 0644]
build/tizen/deps-check.cmake
dali/internal/accessibility/bridge/bridge-base.cpp
dali/internal/accessibility/bridge/bridge-base.h
dali/internal/accessibility/bridge/bridge-object.cpp
dali/internal/adaptor/common/adaptor-impl.cpp
dali/internal/adaptor/common/combined-update-render-controller.cpp
dali/internal/graphics/android/egl-sync-implementation-android.cpp
dali/internal/graphics/generic/egl-sync-implementation.cpp
dali/internal/graphics/gles-impl/gles-graphics-shader.cpp
dali/internal/graphics/gles-impl/gles-graphics-shader.h
dali/internal/graphics/gles/egl-implementation.cpp
dali/internal/graphics/gles/gl-implementation.cpp
dali/internal/graphics/macos/egl-sync-implementation-macos.cpp
dali/internal/graphics/tizen/egl-sync-implementation-tizen.cpp
dali/internal/graphics/windows-gl/egl-sync-implementation-windows.cpp
dali/internal/imaging/tizen/native-image-source-queue-impl-tizen.cpp
dali/internal/system/android/logging-android.cpp
dali/internal/system/common/async-task-manager-impl.cpp
dali/internal/system/common/environment-variables.h
dali/internal/system/tizen-wayland/logging-tizen.cpp
dali/internal/system/ubuntu-x11/logging-x.cpp
dali/internal/system/windows/logging-win.cpp
dali/internal/text/text-abstraction/plugin/font-client-plugin-cache-handler.cpp
dali/internal/text/text-abstraction/plugin/font-face-cache-item.cpp
dali/internal/trace/android/trace-manager-impl-android.cpp
dali/internal/trace/generic/trace-manager-impl-generic.cpp
dali/internal/trace/streamline/trace-manager-impl-streamline.cpp
dali/internal/trace/tizen/trace-manager-impl-tizen.cpp
dali/internal/window-system/android/window-system-android.cpp
dali/internal/window-system/macos/window-system-mac.mm
dali/internal/window-system/tizen-wayland/ecore-wl/window-system-ecore-wl.cpp
dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp
dali/internal/window-system/tizen-wayland/ecore-wl2/window-system-ecore-wl2.cpp
dali/internal/window-system/ubuntu-x11/window-system-ecore-x.cpp
dali/internal/window-system/windows/window-system-win.cpp
dali/internal/window-system/x11/window-system-x.cpp
dali/public-api/dali-adaptor-version.cpp
packaging/dali-adaptor.spec

index 1dee934..8ec9991 100644 (file)
@@ -14,6 +14,7 @@ SET(TC_SOURCES
     utc-Dali-GraphicsNativeImage.cpp
     utc-Dali-GraphicsProgram.cpp
     utc-Dali-GraphicsSampler.cpp
+    utc-Dali-GraphicsShader.cpp
     utc-Dali-GraphicsTexture.cpp
 )
 
diff --git a/automated-tests/src/dali-graphics/utc-Dali-GraphicsShader.cpp b/automated-tests/src/dali-graphics/utc-Dali-GraphicsShader.cpp
new file mode 100644 (file)
index 0000000..e2ec99e
--- /dev/null
@@ -0,0 +1,121 @@
+/*
+* 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.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+#include <dali-test-suite-utils.h>
+#include <dali/dali.h>
+#include <dali/integration-api/testing.h>
+#include <dali/internal/graphics/gles-impl/gles-graphics-shader.h>
+#include <test-graphics-application.h>
+
+int UtcDaliGlesStripLegacyCodeIfNeededTest1(void)
+{
+  TestGraphicsApplication application;
+
+  {
+    Dali::Graphics::ShaderCreateInfo info;
+    info.SetPipelineStage(Dali::Graphics::PipelineStage::VERTEX_SHADER);
+    std::string vertexShader =
+      "//@version 100\n"
+      "some code\n";
+
+    info.SetShaderVersion(100);
+    info.SetSourceData(vertexShader.data());
+    info.SetSourceSize(vertexShader.size());
+    info.SetSourceMode(Dali::Graphics::ShaderSourceMode::TEXT);
+
+    size_t dataSize  = 0;
+    size_t dataIndex = 0;
+    Graphics::GLES::ShaderImpl::StripLegacyCodeIfNeeded(info, dataIndex, dataSize);
+
+    DALI_TEST_EQUALS(dataIndex, 0, TEST_LOCATION);
+    DALI_TEST_EQUALS(dataSize, vertexShader.size(), TEST_LOCATION);
+  }
+
+  END_TEST;
+}
+
+int UtcDaliGlesStripLegacyCodeTestDifferentPrefix(void)
+{
+  TestGraphicsApplication application;
+
+  std::string vertexShader =
+    "//@version 100\n"
+    "some code\n";
+
+  std::string somePrefix =
+    "This is some prefix\n";
+
+  auto newVertexPrefix = Dali::Integration::Test::GenerateTaggedShaderPrefix(somePrefix);
+  {
+    Dali::Graphics::ShaderCreateInfo info;
+    info.SetPipelineStage(Dali::Graphics::PipelineStage::VERTEX_SHADER);
+
+    std::string prefixedVertexShader = newVertexPrefix + vertexShader;
+
+    info.SetShaderVersion(100);
+    info.SetSourceData(prefixedVertexShader.data());
+    info.SetSourceSize(prefixedVertexShader.size());
+    info.SetSourceMode(Dali::Graphics::ShaderSourceMode::TEXT);
+
+    size_t dataSize  = 0;
+    size_t dataIndex = 0;
+    Graphics::GLES::ShaderImpl::StripLegacyCodeIfNeeded(info, dataIndex, dataSize);
+
+    auto index = prefixedVertexShader.find("//@version");
+
+    DALI_TEST_EQUALS(dataIndex, index, TEST_LOCATION);
+
+    // should match original shader size
+    DALI_TEST_EQUALS(dataSize, vertexShader.size(), TEST_LOCATION);
+  }
+
+  END_TEST;
+}
+
+int UtcDaliGlesStripLegacyCodeIfNeededTest2(void)
+{
+  TestGraphicsApplication application;
+
+  std::string vertexShader =
+    "//@version 100\n"
+    "some code\n";
+
+  auto vertexPrefix = Dali::Shader::GetVertexShaderPrefix();
+
+  {
+    Dali::Graphics::ShaderCreateInfo info;
+    info.SetPipelineStage(Dali::Graphics::PipelineStage::VERTEX_SHADER);
+
+    std::string prefixedVertexShader = Dali::Shader::GetVertexShaderPrefix() + vertexShader;
+
+    info.SetShaderVersion(100);
+    info.SetSourceData(prefixedVertexShader.data());
+    info.SetSourceSize(prefixedVertexShader.size());
+    info.SetSourceMode(Dali::Graphics::ShaderSourceMode::TEXT);
+
+    size_t dataSize  = 0;
+    size_t dataIndex = 0;
+    Graphics::GLES::ShaderImpl::StripLegacyCodeIfNeeded(info, dataIndex, dataSize);
+
+    DALI_TEST_EQUALS(dataIndex, vertexPrefix.length(), TEST_LOCATION);
+
+    // should match original shader size
+    DALI_TEST_EQUALS(dataSize, vertexShader.size(), TEST_LOCATION);
+  }
+
+  END_TEST;
+}
\ No newline at end of file
index be3798b..59e1cd0 100755 (executable)
@@ -107,6 +107,7 @@ CHECK_MODULE_AND_SET( X11 x11 [] )
 CHECK_MODULE_AND_SET( XDAMAGE xdamage [] )
 CHECK_MODULE_AND_SET( XFIXES xfixes [] )
 CHECK_MODULE_AND_SET( XINPUT xi [] )
+CHECK_MODULE_AND_SET( XRENDER xrender [] )
 
 CHECK_MODULE_AND_SET( CAPI_SYSTEM_INFO capi-system-info [] )
 CHECK_MODULE_AND_SET( CAPI_SYSTEM_SENSOR capi-system-sensor capi_system_sensor_support )
@@ -377,6 +378,7 @@ IF(X11_REQUIRED)
     ${XDAMAGE_CFLAGS}
     ${XFIXES_CFLAGS}
     ${XINPUT_CFLAGS}
+    ${XRENDER_CFLAGS}
     )
 
   SET( DALI_LDFLAGS ${DALI_LDFLAGS}
@@ -384,6 +386,7 @@ IF(X11_REQUIRED)
     ${XDAMAGE_LDFLAGS}
     ${XFIXES_LDFLAGS}
     ${XINPUT_LDFLAGS}
+    ${XRENDER_LDFLAGS}
     )
 
 ELSE()
index a819f25..30e6cf4 100644 (file)
@@ -174,6 +174,8 @@ BridgeBase::ForceUpResult BridgeBase::ForceUp()
 void BridgeBase::ForceDown()
 {
   Bridge::ForceDown();
+  tickTimer.Reset();
+  mCoalescableMessages.clear();
   mRegistry      = {};
   mDbusServer    = {};
   mConnectionPtr = {};
index d259256..6c72399 100644 (file)
@@ -287,8 +287,9 @@ enum class CoalescableMessages
   SET_OFFSET, ///< Set offset
   POST_RENDER, ///< Post render
   STATE_CHANGED_BEGIN = 500, ///< State changed (begin of reserved range)
-  STATE_CHANGED_END   = 599, ///< State changed (end of reserved range)
-  // <- any enum value declared here will have the value 600
+  STATE_CHANGED_END   = STATE_CHANGED_BEGIN + 99, ///< State changed (end of reserved range)
+  PROPERTY_CHANGED_BEGIN, ///< Property changed (begin of reserved range)
+  PROPERTY_CHANGED_END = PROPERTY_CHANGED_BEGIN + 99, ///< Property changed (end of reserved range)
 };
 
 // Custom specialization of std::hash
index 512bf93..d1f553e 100644 (file)
@@ -85,15 +85,17 @@ void BridgeObject::Emit(Accessible* obj, ObjectPropertyChangeEvent event)
 
   if(eventName != eventMap.end())
   {
-    mDbusServer.emit2<std::string, int, int, DBus::EldbusVariant<int>, Address>(
-      GetAccessiblePath(obj),
-      Accessible::GetInterfaceName(AtspiInterface::EVENT_OBJECT),
-      "PropertyChange",
-      std::string{eventName->second},
-      0,
-      0,
-      {0},
-      {"", "root"});
+    AddCoalescableMessage(static_cast<CoalescableMessages>(static_cast<int>(CoalescableMessages::PROPERTY_CHANGED_BEGIN) + static_cast<int>(event)), obj, 1.0f, [=]() {
+      mDbusServer.emit2<std::string, int, int, DBus::EldbusVariant<int>, Address>(
+        GetAccessiblePath(obj),
+        Accessible::GetInterfaceName(AtspiInterface::EVENT_OBJECT),
+        "PropertyChange",
+        std::string{eventName->second},
+        0,
+        0,
+        {0},
+        {"", "root"});
+    });
   }
 }
 
@@ -242,6 +244,11 @@ void BridgeObject::EmitBoundsChanged(Accessible* obj, Dali::Rect<> rect)
 
 void BridgeObject::EmitPostRender(Accessible *obj)
 {
+  if(!IsUp() || obj->IsHidden())
+  {
+    return;
+  }
+
   AddCoalescableMessage(CoalescableMessages::POST_RENDER, obj, 0.5f, [=]() {
     Emit(obj, WindowEvent::POST_RENDER);
   });
index 7b5c5b3..a411c12 100644 (file)
@@ -95,8 +95,6 @@ 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)
@@ -416,7 +414,7 @@ void Adaptor::Start()
   ProcessCoreEvents(); // Ensure any startup messages are processed.
 
   // Initialize the image loader plugin
-  auto enablePluginString = Dali::EnvironmentVariable::GetEnvironmentVariable(ENABLE_IMAGE_LOADER_PLUGIN_ENV);
+  auto enablePluginString = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_ENABLE_IMAGE_LOADER_PLUGIN);
   bool enablePlugin       = enablePluginString ? std::atoi(enablePluginString) : false;
   if(enablePlugin)
   {
@@ -540,7 +538,7 @@ void Adaptor::Stop()
     }
 
     // Destroy the image loader plugin
-    auto enablePluginString = Dali::EnvironmentVariable::GetEnvironmentVariable(ENABLE_IMAGE_LOADER_PLUGIN_ENV);
+    auto enablePluginString = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_ENABLE_IMAGE_LOADER_PLUGIN);
     bool enablePlugin       = enablePluginString ? std::atoi(enablePluginString) : false;
     if(enablePlugin)
     {
index 3858d4a..93c7a0e 100644 (file)
@@ -830,6 +830,10 @@ void CombinedUpdateRenderController::UpdateRenderThread()
         }
       }
     }
+    else
+    {
+      DALI_LOG_RELEASE_INFO("DALI Rendering skip (upload only)\n");
+    }
 
     TRACE_UPDATE_RENDER_BEGIN("DALI_POST_RENDER");
     if(!uploadOnly)
index df12970..a035e8a 100644 (file)
@@ -37,7 +37,8 @@ namespace Internal
 namespace Adaptor
 {
 EglSyncObject::EglSyncObject(EglImplementation& eglImpl)
-: mPollCounter(3),
+: mEglSync(NULL),
+  mPollCounter(3),
   mEglImplementation(eglImpl)
 {
 }
index 842407f..1615078 100644 (file)
@@ -37,7 +37,8 @@ namespace Internal
 namespace Adaptor
 {
 EglSyncObject::EglSyncObject(EglImplementation& eglImpl)
-: mPollCounter(3),
+: mEglSync(NULL),
+  mPollCounter(3),
   mEglImplementation(eglImpl)
 {
   EGLDisplay display = mEglImplementation.GetDisplay();
index ab265a7..897a50d 100644 (file)
@@ -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.
@@ -32,16 +32,23 @@ struct ShaderImpl::Impl
     createInfo.pipelineStage  = _createInfo.pipelineStage;
     createInfo.shaderlanguage = _createInfo.shaderlanguage;
     createInfo.sourceMode     = _createInfo.sourceMode;
-    createInfo.sourceSize     = _createInfo.sourceSize;
+    createInfo.shaderVersion  = _createInfo.shaderVersion;
 
-    // Make a copy of source code
-    source.resize(_createInfo.sourceSize);
-    std::copy(reinterpret_cast<const uint8_t*>(_createInfo.sourceData),
-              reinterpret_cast<const uint8_t*>(_createInfo.sourceData) + _createInfo.sourceSize,
+    // Make a copy of source code. if code is meant to be used
+    // by modern parser, skip the prefix part
+    size_t dataStartIndex = 0;
+    size_t dataSize;
+
+    ShaderImpl::StripLegacyCodeIfNeeded( _createInfo, dataStartIndex, dataSize );
+
+    source.resize(dataSize);
+    std::copy(reinterpret_cast<const uint8_t*>(_createInfo.sourceData) + dataStartIndex,
+              reinterpret_cast<const uint8_t*>(_createInfo.sourceData) + dataSize,
               source.data());
 
     // Substitute pointer
     createInfo.sourceData = source.data();
+    createInfo.sourceSize = dataSize;
   }
 
   ~Impl(){};
@@ -209,6 +216,28 @@ const ShaderCreateInfo& ShaderImpl::GetCreateInfo() const
   return mImpl->controller;
 }
 
+void ShaderImpl::StripLegacyCodeIfNeeded(const ShaderCreateInfo& info, size_t& startIndex, size_t& finalDataSize)
+{
+  // Make a copy of source code. if code is meant to be used
+  // by modern parser, skip the prefix part
+  if(info.shaderVersion != 0)
+  {
+    auto text = reinterpret_cast<const char*>(info.sourceData);
+    auto result = std::string_view(text).find("//@legacy-prefix-end");
+    if(result != 0 && result != std::string::npos)
+    {
+      DALI_LOG_ERROR("Shader processing: @legacy-prefix-end must be a very first statement!\n");
+    }
+    else if(result == 0)
+    {
+      char* end;
+      startIndex = std::strtoul(reinterpret_cast<const char*>(info.sourceData) + 21, &end, 10);
+    }
+  }
+
+  finalDataSize = info.sourceSize - startIndex;
+}
+
 Shader::~Shader()
 {
   if(!mShader->Release())
index 28c7370..45fce49 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_GRAPHICS_GLES_SHADER_H
 
 /*
- * 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.
@@ -76,6 +76,14 @@ public:
 
   [[nodiscard]] EglGraphicsController& GetController() const;
 
+  /**
+   * Strips legacy prefix fromt he GLSL source code if necessary
+   * @param info valid ShaderCreateInfo strucutre
+   * @param[out] startIndex Start index of the source code
+   * @param[out] finalDataSize Size of trimmed data
+   */
+  static void StripLegacyCodeIfNeeded(const ShaderCreateInfo& info, size_t& startIndex, size_t& finalDataSize);
+
 private:
   friend class Shader;
   struct Impl;
index b47898c..ab424cf 100644 (file)
@@ -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.
@@ -29,6 +29,7 @@
 #include <dali/devel-api/adaptor-framework/environment-variable.h>
 #include <dali/internal/graphics/gles/egl-debug.h>
 #include <dali/internal/graphics/gles/gl-implementation.h>
+#include <dali/internal/system/common/environment-variables.h>
 #include <dali/internal/system/common/time-service.h>
 #include <dali/public-api/dali-adaptor-common.h>
 
@@ -50,14 +51,11 @@ const char*    EGL_KHR_CREATE_CONTEXT                  = "EGL_KHR_create_context
 const char*    EGL_KHR_PARTIAL_UPDATE                  = "EGL_KHR_partial_update";
 const char*    EGL_KHR_SWAP_BUFFERS_WITH_DAMAGE        = "EGL_KHR_swap_buffers_with_damage";
 
-// Threshold time in miliseconds
-constexpr auto PERFORMANCE_LOG_THRESHOLD_TIME_ENV = "DALI_EGL_PERFORMANCE_LOG_THRESHOLD_TIME";
-
 DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_EGL, true);
 
 static uint32_t GetPerformanceLogThresholdTime()
 {
-  auto     timeString = Dali::EnvironmentVariable::GetEnvironmentVariable(PERFORMANCE_LOG_THRESHOLD_TIME_ENV);
+  auto     timeString = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_EGL_PERFORMANCE_LOG_THRESHOLD_TIME);
   uint32_t time       = timeString ? static_cast<uint32_t>(std::atoi(timeString)) : std::numeric_limits<uint32_t>::max();
   return time;
 }
index ac45214..4a0bc42 100644 (file)
@@ -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,9 @@
 // EXTERNAL INCLUDES
 #include <limits>
 
+// INTERNAL INCLUDES
+#include <dali/internal/system/common/environment-variables.h>
+
 namespace Dali
 {
 namespace Internal
@@ -54,12 +57,9 @@ static constexpr const char* OES_EGL_IMAGE_EXTERNAL_STRING = "#extension GL_OES_
 
 static constexpr const char* OES_EGL_IMAGE_EXTERNAL_STRING_ESSL3 = "#extension GL_OES_EGL_image_external_essl3:require\n";
 
-// Threshold time in miliseconds
-constexpr auto PERFORMANCE_LOG_THRESHOLD_TIME_ENV = "DALI_EGL_PERFORMANCE_LOG_THRESHOLD_TIME";
-
 static uint32_t GetPerformanceLogThresholdTime()
 {
-  auto     timeString = Dali::EnvironmentVariable::GetEnvironmentVariable(PERFORMANCE_LOG_THRESHOLD_TIME_ENV);
+  auto     timeString = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_EGL_PERFORMANCE_LOG_THRESHOLD_TIME);
   uint32_t time       = timeString ? static_cast<uint32_t>(std::atoi(timeString)) : std::numeric_limits<uint32_t>::max();
   return time;
 }
index df12970..a035e8a 100644 (file)
@@ -37,7 +37,8 @@ namespace Internal
 namespace Adaptor
 {
 EglSyncObject::EglSyncObject(EglImplementation& eglImpl)
-: mPollCounter(3),
+: mEglSync(NULL),
+  mPollCounter(3),
   mEglImplementation(eglImpl)
 {
 }
index d840015..41c771a 100644 (file)
@@ -221,7 +221,8 @@ void EglSyncImplementation::InitializeEglSync()
 #else
 
 EglSyncObject::EglSyncObject(EglImplementation& eglImpl)
-: mPollCounter(3),
+: mEglSync(NULL),
+  mPollCounter(3),
   mEglImplementation(eglImpl)
 {
 }
index df12970..a035e8a 100644 (file)
@@ -37,7 +37,8 @@ namespace Internal
 namespace Adaptor
 {
 EglSyncObject::EglSyncObject(EglImplementation& eglImpl)
-: mPollCounter(3),
+: mEglSync(NULL),
+  mPollCounter(3),
   mEglImplementation(eglImpl)
 {
 }
index 602ce31..5307d34 100644 (file)
@@ -29,6 +29,7 @@
 #include <dali/internal/adaptor/common/adaptor-impl.h>
 #include <dali/internal/graphics/common/egl-image-extensions.h>
 #include <dali/internal/graphics/gles/egl-graphics.h>
+#include <dali/internal/system/common/environment-variables.h>
 
 namespace Dali
 {
@@ -57,11 +58,10 @@ const char* SAMPLER_TYPE = "samplerExternalOES";
 constexpr int32_t NUM_FORMATS_BLENDING_REQUIRED = 18;
 
 constexpr int32_t DEFAULT_TBM_SURFACE_QUEUE_SIZE = 3u;
-constexpr auto    TBM_SURFACE_QUEUE_SIZE         = "DALI_TBM_SURFACE_QUEUE_SIZE";
 
 int32_t GetTbmSurfaceQueueSize()
 {
-  static auto    queueSizeString = EnvironmentVariable::GetEnvironmentVariable(TBM_SURFACE_QUEUE_SIZE);
+  static auto    queueSizeString = EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_TBM_SURFACE_QUEUE_SIZE);
   static int32_t queueSize       = queueSizeString ? std::atoi(queueSizeString) : DEFAULT_TBM_SURFACE_QUEUE_SIZE;
   return queueSize;
 }
index 2ceb29f..9fa63cf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 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.
 #include <dali/internal/system/common/logging.h>
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/environment-variable.h>
 #include <log.h>
 
+// INTERNAL INCLUDES
+#include <dali/internal/system/common/environment-variables.h>
+
 namespace Dali
 {
 namespace TizenPlatform
 {
+namespace
+{
+static Dali::Integration::Log::DebugPriority gPrintLogLevel = Dali::Integration::Log::DebugPriority::INFO;
+
+Dali::Integration::Log::DebugPriority GetAllowedPrintLogLevel()
+{
+  static bool gEnvironmentApplied = false;
+
+  if(DALI_UNLIKELY(!gEnvironmentApplied))
+  {
+    gEnvironmentApplied = true;
+
+    const char* printLogLevel = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_PRINT_LOG_LEVEL);
+    if(printLogLevel)
+    {
+      auto logLevelInteger = std::strtoul(printLogLevel, nullptr, 10);
+      if(logLevelInteger >= static_cast<unsigned long>(Dali::Integration::Log::DebugPriority::DEBUG) && logLevelInteger <= static_cast<unsigned long>(Dali::Integration::Log::DebugPriority::ERROR))
+      {
+        gPrintLogLevel = static_cast<Dali::Integration::Log::DebugPriority>(logLevelInteger);
+      }
+    }
+  }
+
+  return gPrintLogLevel;
+}
+} // namespace
+
 void LogMessage(Dali::Integration::Log::DebugPriority level, std::string& message)
 {
   const char* DALI_TAG = "DALI";
+  if(level < GetAllowedPrintLogLevel())
+  {
+    return;
+  }
 
   switch(level)
   {
index ab0c646..21d86b6 100644 (file)
@@ -25,6 +25,9 @@
 #include <dali/integration-api/adaptor-framework/adaptor.h>
 #include <dali/integration-api/debug.h>
 
+// INTERNAL INCLUDES
+#include <dali/internal/system/common/environment-variables.h>
+
 #include <unordered_map>
 
 namespace Dali
@@ -38,24 +41,22 @@ namespace
 constexpr auto FORCE_TRIGGER_THRESHOLD = 128u; ///< Trigger TasksCompleted() forcely if the number of completed task contain too much.
 
 constexpr auto DEFAULT_NUMBER_OF_ASYNC_THREADS = size_t{8u};
-constexpr auto NUMBER_OF_ASYNC_THREADS_ENV     = "DALI_ASYNC_MANAGER_THREAD_POOL_SIZE";
 
 // The number of threads for low priority task.
 constexpr auto DEFAULT_NUMBER_OF_LOW_PRIORITY_THREADS = size_t{6u};
-constexpr auto NUMBER_OF_LOW_PRIORITY_THREADS_ENV     = "DALI_ASYNC_MANAGER_LOW_PRIORITY_THREAD_POOL_SIZE";
 
-size_t GetNumberOfThreads(const char* environmentVariable, size_t defaultValue)
+size_t GetNumberOfThreads(size_t defaultValue)
 {
-  auto           numberString          = EnvironmentVariable::GetEnvironmentVariable(environmentVariable);
+  auto           numberString          = EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_ASYNC_MANAGER_THREAD_POOL_SIZE);
   auto           numberOfThreads       = numberString ? std::strtoul(numberString, nullptr, 10) : 0;
   constexpr auto MAX_NUMBER_OF_THREADS = 16u;
   DALI_ASSERT_DEBUG(numberOfThreads <= MAX_NUMBER_OF_THREADS);
   return (numberOfThreads > 0 && numberOfThreads <= MAX_NUMBER_OF_THREADS) ? numberOfThreads : defaultValue;
 }
 
-size_t GetNumberOfLowPriorityThreads(const char* environmentVariable, size_t defaultValue, size_t maxValue)
+size_t GetNumberOfLowPriorityThreads(size_t defaultValue, size_t maxValue)
 {
-  auto numberString    = EnvironmentVariable::GetEnvironmentVariable(environmentVariable);
+  auto numberString    = EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_ASYNC_MANAGER_LOW_PRIORITY_THREAD_POOL_SIZE);
   auto numberOfThreads = numberString ? std::strtoul(numberString, nullptr, 10) : 0;
   DALI_ASSERT_DEBUG(numberOfThreads <= maxValue);
   return (numberOfThreads > 0 && numberOfThreads <= maxValue) ? numberOfThreads : std::min(defaultValue, maxValue);
@@ -608,8 +609,8 @@ Dali::AsyncTaskManager AsyncTaskManager::Get()
 }
 
 AsyncTaskManager::AsyncTaskManager()
-: mTasks(GetNumberOfThreads(NUMBER_OF_ASYNC_THREADS_ENV, DEFAULT_NUMBER_OF_ASYNC_THREADS), [&]() { return TaskHelper(*this); }),
-  mAvaliableLowPriorityTaskCounts(GetNumberOfLowPriorityThreads(NUMBER_OF_LOW_PRIORITY_THREADS_ENV, DEFAULT_NUMBER_OF_LOW_PRIORITY_THREADS, mTasks.GetElementCount())),
+: mTasks(GetNumberOfThreads(DEFAULT_NUMBER_OF_ASYNC_THREADS), [&]() { return TaskHelper(*this); }),
+  mAvaliableLowPriorityTaskCounts(GetNumberOfLowPriorityThreads(DEFAULT_NUMBER_OF_LOW_PRIORITY_THREADS, mTasks.GetElementCount())),
   mWaitingHighProirityTaskCounts(0u),
   mTrigger(new EventThreadCallback(MakeCallback(this, &AsyncTaskManager::TasksCompleted))),
   mTasksCompletedImpl(new TasksCompletedImpl(*this, mTrigger.get())),
@@ -672,8 +673,8 @@ void AsyncTaskManager::AddTask(AsyncTaskPtr task)
 
   {
     Mutex::ScopedLock lock(mTasksMutex);
-    size_t count = mTasks.GetElementCount();
-    size_t index = 0;
+    size_t            count = mTasks.GetElementCount();
+    size_t            index = 0;
     while(index++ < count)
     {
       auto processHelperIt = mTasks.GetNext();
index 63ea73f..30c0102 100644 (file)
@@ -151,9 +151,31 @@ namespace Adaptor
 
 #define DALI_ENV_DISABLE_VSYNC_RENDER "DALI_DISABLE_VSYNC_RENDER"
 
+#define DALI_ENV_ENABLE_IMAGE_LOADER_PLUGIN "DALI_ENABLE_IMAGE_LOADER_PLUGIN"
+
+// Threshold time in miliseconds when we want to print the egl performance as a warning.
+#define DALI_ENV_EGL_PERFORMANCE_LOG_THRESHOLD_TIME "DALI_EGL_PERFORMANCE_LOG_THRESHOLD_TIME"
+
+#define DALI_ENV_TBM_SURFACE_QUEUE_SIZE "DALI_TBM_SURFACE_QUEUE_SIZE"
+
+#define DALI_ENV_ASYNC_MANAGER_THREAD_POOL_SIZE "DALI_ASYNC_MANAGER_THREAD_POOL_SIZE"
+
+#define DALI_ENV_ASYNC_MANAGER_LOW_PRIORITY_THREAD_POOL_SIZE "DALI_ASYNC_MANAGER_LOW_PRIORITY_THREAD_POOL_SIZE"
+
+// Glyph Cache
+#define DALI_ENV_MAX_NUMBER_OF_GLYPH_CACHE "DALI_GLYPH_CACHE_MAX"
+
+#define DALI_ENV_ENABLE_CACHE_RENDERED_GLYPH "DALI_ENABLE_CACHE_RENDERED_GLYPH"
+
+#define DALI_ENV_RENDERED_GLYPH_COMPRESS_POLICY "DALI_RENDERED_GLYPH_COMPRESS_POLICY"
+
 // Debug relative environments
 #define DALI_ENV_CURLOPT_VERBOSE_MODE "DALI_CURLOPT_VERBOSE_MODE"
 
+#define DALI_ENV_PRINT_LOG_LEVEL "DALI_PRINT_LOG_LEVEL"
+
+#define DALI_ENV_TRACE_ENABLE_PRINT_LOG "DALI_TRACE_ENABLE_PRINT_LOG"
+
 } // namespace Adaptor
 
 } // namespace Internal
index 5428f1a..b535cbc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 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.
 // Dlog uses C style casts internally
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wold-style-cast"
+#include <dali/devel-api/adaptor-framework/environment-variable.h>
 #include <dlog.h>
 
+// INTERNAL INCLUDES
+#include <dali/internal/system/common/environment-variables.h>
+
 namespace Dali
 {
 namespace TizenPlatform
 {
+namespace
+{
+static Dali::Integration::Log::DebugPriority gPrintLogLevel = Dali::Integration::Log::DebugPriority::DEBUG;
+
+Dali::Integration::Log::DebugPriority GetAllowedPrintLogLevel()
+{
+  static bool gEnvironmentApplied = false;
+
+  if(DALI_UNLIKELY(!gEnvironmentApplied))
+  {
+    gEnvironmentApplied = true;
+
+    const char* printLogLevel = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_PRINT_LOG_LEVEL);
+    if(printLogLevel)
+    {
+      auto logLevelInteger = std::strtoul(printLogLevel, nullptr, 10);
+      if(logLevelInteger >= static_cast<unsigned long>(Dali::Integration::Log::DebugPriority::DEBUG) && logLevelInteger <= static_cast<unsigned long>(Dali::Integration::Log::DebugPriority::ERROR))
+      {
+        gPrintLogLevel = static_cast<Dali::Integration::Log::DebugPriority>(logLevelInteger);
+      }
+    }
+  }
+
+  return gPrintLogLevel;
+}
+} // namespace
 void LogMessage(Dali::Integration::Log::DebugPriority level, std::string& message)
 {
   const char* DALI_TAG = "DALI";
+  if(level < GetAllowedPrintLogLevel())
+  {
+    return;
+  }
 
   switch(level)
   {
index 5ba89b6..4063aef 100644 (file)
@@ -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.
 #include <dali/internal/system/common/logging.h>
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/environment-variable.h>
 #include <cstdio>
 
+// INTERNAL INCLUDES
+#include <dali/internal/system/common/environment-variables.h>
+
 namespace Dali
 {
 namespace TizenPlatform
 {
+namespace
+{
+static Dali::Integration::Log::DebugPriority gPrintLogLevel = Dali::Integration::Log::DebugPriority::INFO;
+
+Dali::Integration::Log::DebugPriority GetAllowedPrintLogLevel()
+{
+  static bool gEnvironmentApplied = false;
+
+  if(DALI_UNLIKELY(!gEnvironmentApplied))
+  {
+    gEnvironmentApplied = true;
+
+    const char* printLogLevel = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_PRINT_LOG_LEVEL);
+    if(printLogLevel)
+    {
+      auto logLevelInteger = std::strtoul(printLogLevel, nullptr, 10);
+      if(logLevelInteger >= static_cast<unsigned long>(Dali::Integration::Log::DebugPriority::DEBUG) && logLevelInteger <= static_cast<unsigned long>(Dali::Integration::Log::DebugPriority::ERROR))
+      {
+        gPrintLogLevel = static_cast<Dali::Integration::Log::DebugPriority>(logLevelInteger);
+      }
+    }
+  }
+
+  return gPrintLogLevel;
+}
+} // namespace
 void LogMessage(Dali::Integration::Log::DebugPriority level, std::string& message)
 {
   const char* DALI_TAG = "DALI";
 
   const char* format = NULL;
+  if(level < GetAllowedPrintLogLevel())
+  {
+    return;
+  }
+
   switch(level)
   {
     case Dali::Integration::Log::DEBUG: ///< Gray color
index b3131bf..552330c 100644 (file)
@@ -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.
 #include <dali/internal/system/common/logging.h>
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/environment-variable.h>
 #include <cstdio>
 
+// INTERNAL INCLUDES
+#include <dali/internal/system/common/environment-variables.h>
+
 namespace Dali
 {
 namespace TizenPlatform
 {
+namespace
+{
+static Dali::Integration::Log::DebugPriority gPrintLogLevel = Dali::Integration::Log::DebugPriority::INFO;
+
+Dali::Integration::Log::DebugPriority GetAllowedPrintLogLevel()
+{
+  static bool gEnvironmentApplied = false;
+
+  if(DALI_UNLIKELY(!gEnvironmentApplied))
+  {
+    gEnvironmentApplied = true;
+
+    const char* printLogLevel = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_PRINT_LOG_LEVEL);
+    if(printLogLevel)
+    {
+      auto logLevelInteger = std::strtoul(printLogLevel, nullptr, 10);
+      if(logLevelInteger >= static_cast<unsigned long>(Dali::Integration::Log::DebugPriority::DEBUG) && logLevelInteger <= static_cast<unsigned long>(Dali::Integration::Log::DebugPriority::ERROR))
+      {
+        gPrintLogLevel = static_cast<Dali::Integration::Log::DebugPriority>(logLevelInteger);
+      }
+    }
+  }
+
+  return gPrintLogLevel;
+}
+} // namespace
+
 void LogMessage(Dali::Integration::Log::DebugPriority level, std::string& message)
 {
   const char* DALI_TAG = "DALI";
 
   const char* format = NULL;
+  if(level < GetAllowedPrintLogLevel())
+  {
+    return;
+  }
+
   switch(level)
   {
     case Dali::Integration::Log::DEBUG: ///< Gray color
index d1d24a1..501bc5c 100644 (file)
@@ -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.
@@ -27,6 +27,7 @@
 #include <dali/devel-api/adaptor-framework/environment-variable.h>
 #include <dali/devel-api/adaptor-framework/file-loader.h>
 #include <dali/devel-api/adaptor-framework/image-loading.h>
+#include <dali/internal/system/common/environment-variables.h>
 #include <dali/internal/system/common/logging.h>
 #include <dali/internal/text/text-abstraction/font-client-impl.h>
 #include <dali/internal/text/text-abstraction/plugin/font-client-plugin-impl.h>
@@ -81,7 +82,6 @@ extern Dali::Integration::Log::Filter* gFontClientLogFilter;
 
 namespace
 {
-
 DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_FONT_PERFORMANCE_MARKER, false);
 
 /**
@@ -100,8 +100,7 @@ constexpr auto MAX_NUMBER_OF_GLYPH_CACHE_ENV = "DALI_GLYPH_CACHE_MAX";
  */
 inline size_t GetMaxNumberOfGlyphCache()
 {
-  using Dali::EnvironmentVariable::GetEnvironmentVariable;
-  static auto numberString = GetEnvironmentVariable(MAX_NUMBER_OF_GLYPH_CACHE_ENV);
+  static auto numberString = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_MAX_NUMBER_OF_GLYPH_CACHE);
   static auto number       = numberString ? std::strtoul(numberString, nullptr, 10) : DEFAULT_GLYPH_CACHE_MAX;
   return (number < MINIMUM_SIZE_OF_GLYPH_CACHE_MAX) ? MINIMUM_SIZE_OF_GLYPH_CACHE_MAX : number;
 }
@@ -742,12 +741,12 @@ void FontClient::Plugin::CacheHandler::ValidateFont(const FontDescription& fontD
 
   if(matched && (nullptr != characterSet))
   {
-    #if defined(TRACE_ENABLED)
+#if defined(TRACE_ENABLED)
     if(gTraceFilter && gTraceFilter->IsTraceEnabled())
     {
       DALI_LOG_DEBUG_INFO("DALI_TEXT_VALIDATE_FONT : FcFontMatch : %s, style : %s, %s, %s\n", fontDescription.family.c_str(), FontWidth::Name[fontDescription.width], FontWeight::Name[fontDescription.weight], FontSlant::Name[fontDescription.slant]);
     }
-    #endif
+#endif
 
     // Add the path to the cache.
     description.type = FontDescription::FACE_FONT;
@@ -825,12 +824,12 @@ void FontClient::Plugin::CacheHandler::CacheFallbackFontList(FontDescription&&
 
   DALI_TRACE_SCOPE(gTraceFilter, "DALI_TEXT_FALLBACK_FONTLIST");
 
-  #if defined(TRACE_ENABLED)
+#if defined(TRACE_ENABLED)
   if(gTraceFilter && gTraceFilter->IsTraceEnabled())
   {
     DALI_LOG_DEBUG_INFO("DALI_TEXT_FALLBACK_FONTLIST : FcFontSort : %s\n", fontDescription.family.c_str());
   }
-  #endif
+#endif
 
   fontList         = new FontList;
   characterSetList = new CharacterSetList;
index c1d4bc8..18c5b97 100644 (file)
@@ -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 @@
 
 // INTERNAL HEADERS
 #include <dali/devel-api/adaptor-framework/environment-variable.h>
+#include <dali/internal/system/common/environment-variables.h>
 #include <dali/internal/text/text-abstraction/plugin/font-client-utils.h>
 #include <dali/internal/text/text-abstraction/plugin/font-face-cache-item.h>
 
@@ -44,7 +45,6 @@ constexpr float MAXIMUM_RATE_OF_BITMAP_GLYPH_CACHE_RESIZE = 1.5f;
  * @brief Behavior about cache the rendered glyph cache.
  */
 constexpr bool DEFAULT_ENABLE_CACHE_RENDERED_GLYPH = true;
-constexpr auto ENABLE_CACHE_RENDERED_GLYPH_ENV     = "DALI_ENABLE_CACHE_RENDERED_GLYPH";
 
 /**
  * @brief Get whether we allow to cache rendered glyph from environment.
@@ -54,8 +54,7 @@ constexpr auto ENABLE_CACHE_RENDERED_GLYPH_ENV     = "DALI_ENABLE_CACHE_RENDERED
  */
 inline bool EnableCacheRenderedGlyph()
 {
-  using Dali::EnvironmentVariable::GetEnvironmentVariable;
-  static auto numberString = GetEnvironmentVariable(ENABLE_CACHE_RENDERED_GLYPH_ENV);
+  static auto numberString = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_ENABLE_CACHE_RENDERED_GLYPH);
   static auto number       = numberString ? (std::strtoul(numberString, nullptr, 10) ? true : false) : DEFAULT_ENABLE_CACHE_RENDERED_GLYPH;
   return number;
 }
@@ -70,7 +69,6 @@ constexpr auto DEFAULT_RENDERED_GLYPH_COMPRESS_POLICY =
 #else
   GlyphCacheManager::CompressionPolicyType::SPEED; // If not tizen target
 #endif
-constexpr auto RENDERED_GLYPH_COMPRESS_POLICY_ENV = "DALI_RENDERED_GLYPH_COMPRESS_POLICY";
 
 /**
  * @brief Get whether we allow to cache rendered glyph from environment.
@@ -80,8 +78,7 @@ constexpr auto RENDERED_GLYPH_COMPRESS_POLICY_ENV = "DALI_RENDERED_GLYPH_COMPRES
  */
 inline GlyphCacheManager::CompressionPolicyType GetRenderedGlyphCompressPolicy()
 {
-  using Dali::EnvironmentVariable::GetEnvironmentVariable;
-  static auto policyString = GetEnvironmentVariable(RENDERED_GLYPH_COMPRESS_POLICY_ENV);
+  static auto policyString = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_RENDERED_GLYPH_COMPRESS_POLICY);
 
   static auto policy = policyString ? policyString[0] == 's' || policyString[0] == 'S'   ? GlyphCacheManager::CompressionPolicyType::SPEED
                                       : policyString[0] == 'm' || policyString[0] == 'M' ? GlyphCacheManager::CompressionPolicyType::MEMORY
index c6dcc38..40dc8a4 100644 (file)
@@ -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.
@@ -24,6 +24,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/environment-variable.h>
+#include <dali/internal/system/common/environment-variables.h>
 
 namespace Dali
 {
@@ -33,9 +34,8 @@ namespace Adaptor
 {
 namespace
 {
-const char* DALI_TRACE_ENABLE_PRINT_LOG_ENV = "DALI_TRACE_ENABLE_PRINT_LOG";
-const char* EMPTY_TAG                       = "(null)";
-static bool gTraceManagerEnablePrintLog     = false;
+const char* EMPTY_TAG                   = "(null)";
+static bool gTraceManagerEnablePrintLog = false;
 } // namespace
 
 TraceManagerAndroid* TraceManagerAndroid::traceManagerAndroid = nullptr;
@@ -43,7 +43,7 @@ TraceManagerAndroid* TraceManagerAndroid::traceManagerAndroid = nullptr;
 TraceManagerAndroid::TraceManagerAndroid(PerformanceInterface* performanceInterface)
 : TraceManager(performanceInterface)
 {
-  const char* enablePrintLog = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_TRACE_ENABLE_PRINT_LOG_ENV);
+  const char* enablePrintLog = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_TRACE_ENABLE_PRINT_LOG);
   if(enablePrintLog && std::atoi(enablePrintLog) != 0)
   {
     gTraceManagerEnablePrintLog = true;
index 8fc85b9..912e0c7 100644 (file)
@@ -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.
@@ -24,6 +24,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/environment-variable.h>
+#include <dali/internal/system/common/environment-variables.h>
 
 namespace Dali
 {
@@ -33,9 +34,8 @@ namespace Adaptor
 {
 namespace
 {
-const char* DALI_TRACE_ENABLE_PRINT_LOG_ENV = "DALI_TRACE_ENABLE_PRINT_LOG";
-const char* EMPTY_TAG                       = "(null)";
-static bool gTraceManagerEnablePrintLog     = false;
+const char* EMPTY_TAG                   = "(null)";
+static bool gTraceManagerEnablePrintLog = false;
 } // namespace
 
 TraceManagerGeneric* TraceManagerGeneric::traceManagerGeneric = nullptr;
@@ -43,7 +43,7 @@ TraceManagerGeneric* TraceManagerGeneric::traceManagerGeneric = nullptr;
 TraceManagerGeneric::TraceManagerGeneric(PerformanceInterface* performanceInterface)
 : TraceManager(performanceInterface)
 {
-  const char* enablePrintLog = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_TRACE_ENABLE_PRINT_LOG_ENV);
+  const char* enablePrintLog = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_TRACE_ENABLE_PRINT_LOG);
   if(enablePrintLog && std::atoi(enablePrintLog) != 0)
   {
     gTraceManagerEnablePrintLog = true;
index 63536d5..a635153 100644 (file)
@@ -24,6 +24,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/environment-variable.h>
+#include <dali/internal/system/common/environment-variables.h>
 #include <dali/internal/trace/streamline/streamline_annotate.h>
 
 ANNOTATE_DEFINE;
@@ -32,9 +33,8 @@ namespace Dali::Internal::Adaptor
 {
 namespace
 {
-const char* DALI_TRACE_ENABLE_PRINT_LOG_ENV = "DALI_TRACE_ENABLE_PRINT_LOG";
-const char* EMPTY_TAG                       = "(null)";
-bool        gTraceManagerEnablePrintLog     = false;
+const char* EMPTY_TAG                   = "(null)";
+bool        gTraceManagerEnablePrintLog = false;
 } // namespace
 
 TraceManagerStreamline* TraceManagerStreamline::traceManagerStreamline = nullptr;
@@ -43,7 +43,7 @@ TraceManagerStreamline::TraceManagerStreamline(PerformanceInterface* performance
 : TraceManager(performanceInterface)
 {
   ANNOTATE_SETUP;
-  const char* enablePrintLog = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_TRACE_ENABLE_PRINT_LOG_ENV);
+  const char* enablePrintLog = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_TRACE_ENABLE_PRINT_LOG);
   if(enablePrintLog && std::atoi(enablePrintLog) != 0)
   {
     gTraceManagerEnablePrintLog = true;
index 8061215..23988ec 100644 (file)
@@ -24,6 +24,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/environment-variable.h>
+#include <dali/internal/system/common/environment-variables.h>
 
 namespace Dali
 {
@@ -33,16 +34,15 @@ namespace Adaptor
 {
 namespace
 {
-const char* DALI_TRACE_ENABLE_PRINT_LOG_ENV = "DALI_TRACE_ENABLE_PRINT_LOG";
-const char* EMPTY_TAG                       = "(null)";
-static bool gTraceManagerEnablePrintLog     = false;
+const char* EMPTY_TAG                   = "(null)";
+static bool gTraceManagerEnablePrintLog = false;
 
 } // namespace
 
 TraceManagerTizen::TraceManagerTizen(PerformanceInterface* performanceInterface)
 : TraceManager(performanceInterface)
 {
-  const char* enablePrintLog = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_TRACE_ENABLE_PRINT_LOG_ENV);
+  const char* enablePrintLog = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_TRACE_ENABLE_PRINT_LOG);
   if(enablePrintLog && std::atoi(enablePrintLog) != 0)
   {
     gTraceManagerEnablePrintLog = true;
index f3fdb2f..2b1e5c5 100644 (file)
@@ -91,8 +91,7 @@ bool GetKeyboardVerticalRepeatInfo(float& rate, float& delay)
 void SetGeometryHittestEnabled(bool enable)
 {
   DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable);
-  gGeometryHittest = enable;
-  if(gGeometryHittest && Dali::Adaptor::IsAvailable())
+  if(gGeometryHittest != enable && Dali::Adaptor::IsAvailable())
   {
     Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders();
     for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter)
@@ -103,6 +102,7 @@ void SetGeometryHittestEnabled(bool enable)
       }
     }
   }
+  gGeometryHittest = enable;
 }
 
 bool IsGeometryHittestEnabled()
index f5e4acf..aae3152 100644 (file)
@@ -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.
@@ -84,8 +84,7 @@ bool GetKeyboardVerticalRepeatInfo(float& rate, float& delay)
 void SetGeometryHittestEnabled(bool enable)
 {
   DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable);
-  gGeometryHittest = enable;
-  if(gGeometryHittest)
+  if(gGeometryHittest != enable)
   {
     Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders();
     for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter)
@@ -96,6 +95,7 @@ void SetGeometryHittestEnabled(bool enable)
       }
     }
   }
+  gGeometryHittest = enable;
 }
 
 bool IsGeometryHittestEnabled()
index 105cf0f..d767e5b 100644 (file)
@@ -94,8 +94,7 @@ bool GetKeyboardVerticalRepeatInfo(float& rate, float& delay)
 void SetGeometryHittestEnabled(bool enable)
 {
   DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable);
-  gGeometryHittest = enable;
-  if(gGeometryHittest && Dali::Adaptor::IsAvailable())
+  if(gGeometryHittest != enable && Dali::Adaptor::IsAvailable())
   {
     Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders();
     for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter)
@@ -106,6 +105,7 @@ void SetGeometryHittestEnabled(bool enable)
       }
     }
   }
+  gGeometryHittest = enable;
 }
 
 bool IsGeometryHittestEnabled()
index 9b63464..e263c32 100644 (file)
@@ -229,16 +229,6 @@ void GetDeviceSubclass(Ecore_Device_Subclass ecoreDeviceSubclass, Device::Subcla
       deviceSubclass = Device::Subclass::VIRTUAL_KEYBOARD;
       break;
     }
-    case ECORE_DEVICE_SUBCLASS_VIRTUAL_REMOCON:
-    {
-      deviceSubclass = Device::Subclass::VIRTUAL_REMOCON;
-      break;
-    }
-    case ECORE_DEVICE_SUBCLASS_VIRTUAL_MOUSE:
-    {
-      deviceSubclass = Device::Subclass::VIRTUAL_MOUSE;
-      break;
-    }
     default:
     {
       deviceSubclass = Device::Subclass::NONE;
index 2b07113..24a5afa 100644 (file)
@@ -231,8 +231,7 @@ bool GetKeyboardVerticalRepeatInfo(float& rate, float& delay)
 void SetGeometryHittestEnabled(bool enable)
 {
   DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable);
-  gGeometryHittest = enable;
-  if(gGeometryHittest && Dali::Adaptor::IsAvailable())
+  if(gGeometryHittest != enable && Dali::Adaptor::IsAvailable())
   {
     Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders();
     for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter)
@@ -243,6 +242,7 @@ void SetGeometryHittestEnabled(bool enable)
       }
     }
   }
+  gGeometryHittest = enable;
 }
 
 bool IsGeometryHittestEnabled()
index 1812f24..daf0dc5 100644 (file)
@@ -90,8 +90,7 @@ bool GetKeyboardVerticalRepeatInfo(float& rate, float& delay)
 void SetGeometryHittestEnabled(bool enable)
 {
   DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable);
-  gGeometryHittest = enable;
-  if(gGeometryHittest && Dali::Adaptor::IsAvailable())
+  if(gGeometryHittest != enable && Dali::Adaptor::IsAvailable())
   {
     Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders();
     for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter)
@@ -102,6 +101,7 @@ void SetGeometryHittestEnabled(bool enable)
       }
     }
   }
+  gGeometryHittest = enable;
 }
 
 bool IsGeometryHittestEnabled()
index 863d166..c11109e 100644 (file)
@@ -84,8 +84,7 @@ bool GetKeyboardVerticalRepeatInfo(float& rate, float& delay)
 void SetGeometryHittestEnabled(bool enable)
 {
   DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable);
-  gGeometryHittest = enable;
-  if(gGeometryHittest && Dali::Adaptor::IsAvailable())
+  if(gGeometryHittest != enable && Dali::Adaptor::IsAvailable())
   {
     Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders();
     for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter)
@@ -96,6 +95,7 @@ void SetGeometryHittestEnabled(bool enable)
       }
     }
   }
+  gGeometryHittest = enable;
 }
 
 bool IsGeometryHittestEnabled()
index 239c581..e626c5f 100644 (file)
@@ -1150,8 +1150,7 @@ bool GetKeyboardVerticalRepeatInfo(float& rate, float& delay)
 void SetGeometryHittestEnabled(bool enable)
 {
   DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable);
-  gGeometryHittest = enable;
-  if(gGeometryHittest && Dali::Adaptor::IsAvailable())
+  if(gGeometryHittest != enable && Dali::Adaptor::IsAvailable())
   {
     Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders();
     for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter)
@@ -1162,6 +1161,7 @@ void SetGeometryHittestEnabled(bool enable)
       }
     }
   }
+  gGeometryHittest = enable;
 }
 
 bool IsGeometryHittestEnabled()
index e934a2c..9feb344 100644 (file)
@@ -27,7 +27,7 @@ namespace Dali
 {
 const unsigned int ADAPTOR_MAJOR_VERSION = 2;
 const unsigned int ADAPTOR_MINOR_VERSION = 3;
-const unsigned int ADAPTOR_MICRO_VERSION = 21;
+const unsigned int ADAPTOR_MICRO_VERSION = 24;
 const char* const  ADAPTOR_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index 279c520..de89f20 100644 (file)
@@ -17,7 +17,7 @@
 
 Name:       dali2-adaptor
 Summary:    The DALi Tizen Adaptor
-Version:    2.3.21
+Version:    2.3.24
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT