Merge branch 'devel/master' into tizen accepted/tizen/unified/20230414.125203
authorjykeon <jykeon@samsung.com>
Wed, 12 Apr 2023 04:01:18 +0000 (13:01 +0900)
committerjykeon <jykeon@samsung.com>
Wed, 12 Apr 2023 04:01:18 +0000 (13:01 +0900)
Change-Id: I3c4c600e7e677f113c1ef3544dc7c91d48ec2f58

dali/devel-api/adaptor-framework/web-engine/web-engine-plugin.h
dali/devel-api/adaptor-framework/web-engine/web-engine.cpp
dali/devel-api/adaptor-framework/web-engine/web-engine.h
dali/internal/adaptor/common/adaptor-impl.cpp
dali/internal/text/text-abstraction/plugin/font-client-plugin-impl.cpp
dali/internal/web-engine/common/web-engine-impl.cpp
dali/internal/web-engine/common/web-engine-impl.h
dali/public-api/dali-adaptor-version.cpp
packaging/dali-adaptor.spec

index 39c6371..4c631bf 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_WEB_ENGINE_PLUGIN_H
 
 /*
- * 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.
@@ -314,7 +314,7 @@ public:
    *
    * @return true if successfully request, false otherwise
    */
-  virtual bool LoadContents(const std::string& contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri) = 0;
+  virtual bool LoadContents(const int8_t* contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri) = 0;
 
   /**
    * @brief Reload the Web.
index 6367f71..97b70c1 100755 (executable)
@@ -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.
@@ -145,7 +145,7 @@ bool WebEngine::LoadHtmlStringOverrideCurrentEntry(const std::string& html, cons
   return GetImplementation(*this).LoadHtmlStringOverrideCurrentEntry(html, basicUri, unreachableUrl);
 }
 
-bool WebEngine::LoadContents(const std::string& contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri)
+bool WebEngine::LoadContents(const int8_t* contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri)
 {
   return GetImplementation(*this).LoadContents(contents, contentSize, mimeType, encoding, baseUri);
 }
index 2d33aba..1515c76 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_WEB_ENGINE_H
 
 /*
- * 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.
@@ -215,7 +215,7 @@ public:
    *
    * @return true if successfully request, false otherwise
    */
-  bool LoadContents(const std::string& contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri);
+  bool LoadContents(const int8_t* contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri);
 
   /**
    * @brief Reload the Web.
index 8522cf9..d023730 100644 (file)
@@ -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 <dali/internal/imaging/common/image-loader.h>
 #include <dali/internal/system/common/locale-utils.h>
 
+#include <dali/devel-api/adaptor-framework/environment-variable.h>
 #include <dali/internal/system/common/configuration-manager.h>
 #include <dali/internal/system/common/environment-variables.h>
 
@@ -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;
index f58304c..1dbf322 100644 (file)
@@ -284,7 +284,8 @@ void FontClient::Plugin::FontPreCache(const FontFamilyList& fallbackFamilyList,
 
     if(!mCacheHandler->FindFallbackFontList(fontDescription, fontList, characterSetList))
     {
-      mCacheHandler->CacheFallbackFontList(std::move(fontDescription), fontList, characterSetList);
+      FontDescription copiedFontDescription = fontDescription;
+      mCacheHandler->CacheFallbackFontList(std::move(copiedFontDescription), fontList, characterSetList);
     }
     if(!mCacheHandler->FindValidatedFont(fontDescription, fontDescriptionId))
     {
index a54cb82..87e1f6e 100644 (file)
@@ -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.
@@ -365,7 +365,7 @@ bool WebEngine::LoadHtmlStringOverrideCurrentEntry(const std::string& html, cons
   return mPlugin->LoadHtmlStringOverrideCurrentEntry(html, basicUri, unreachableUrl);
 }
 
-bool WebEngine::LoadContents(const std::string& contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri)
+bool WebEngine::LoadContents(const int8_t* contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri)
 {
   return mPlugin->LoadContents(contents, contentSize, mimeType, encoding, baseUri);
 }
index 7cc0ac0..1a35dc9 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_WEB_ENGINE_IMPL_H
 
 /*
- * 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.
@@ -145,7 +145,7 @@ public:
   /**
    * @copydoc Dali::WebEngine::LoadContents()
    */
-  bool LoadContents(const std::string& contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri);
+  bool LoadContents(const int8_t* contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri);
 
   /**
    * @copydoc Dali::WebEngine::Reload()
index 5116fac..af27e66 100644 (file)
@@ -27,7 +27,7 @@ namespace Dali
 {
 const unsigned int ADAPTOR_MAJOR_VERSION = 2;
 const unsigned int ADAPTOR_MINOR_VERSION = 2;
-const unsigned int ADAPTOR_MICRO_VERSION = 20;
+const unsigned int ADAPTOR_MICRO_VERSION = 21;
 const char* const  ADAPTOR_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index 41cbfbc..a6249c1 100644 (file)
@@ -17,7 +17,7 @@
 
 Name:       dali2-adaptor
 Summary:    The DALi Tizen Adaptor
-Version:    2.2.20
+Version:    2.2.21
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT