Merge changes I7234d85c,I6a771210 into devel/master
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 18 Jun 2021 13:29:10 +0000 (13:29 +0000)
committerGerrit Code Review <gerrit@review>
Fri, 18 Jun 2021 13:29:10 +0000 (13:29 +0000)
* changes:
  Standalone uniforms cache
  Reduced number of glTexParameteri() calls

dali/internal/imaging/tizen/native-image-source-impl-tizen.cpp
dali/public-api/dali-adaptor-version.cpp
packaging/dali-adaptor.spec

index 75417e4..16a5720 100644 (file)
@@ -403,6 +403,12 @@ bool NativeImageSourceTizen::IsColorDepthSupported(Dali::NativeImageSource::Colo
 
 bool NativeImageSourceTizen::CreateResource()
 {
+  // If an EGL image exists, use it as it is without creating it.
+  if(mEglImageKHR != NULL)
+  {
+    return true;
+  }
+
   // casting from an unsigned int to a void *, which should then be cast back
   // to an unsigned int in the driver.
   EGLClientBuffer eglBuffer = reinterpret_cast<EGLClientBuffer>(mTbmSurface);
@@ -414,9 +420,6 @@ bool NativeImageSourceTizen::CreateResource()
   mEglImageExtensions = mEglGraphics->GetImageExtensions();
   DALI_ASSERT_DEBUG(mEglImageExtensions);
 
-  // if resource of egl was not destroyed, destroy it first
-  DestroyResource();
-
   mEglImageKHR = mEglImageExtensions->CreateImageKHR(eglBuffer);
 
   return mEglImageKHR != NULL;
@@ -445,15 +448,16 @@ void NativeImageSourceTizen::PrepareTexture()
   Dali::Mutex::ScopedLock lock(mMutex);
   if(mSetSource)
   {
-    void* eglImage = mEglImageKHR;
+    // Destroy previous eglImage because use for new one.
+    // if mEglImageKHR is not to be NULL here, it will not be updated with a new eglImage.
+    mEglImageExtensions->DestroyImageKHR(mEglImageKHR);
+    mEglImageKHR = NULL;
 
     if(CreateResource())
     {
       TargetTexture();
     }
 
-    mEglImageExtensions->DestroyImageKHR(eglImage);
-
     mSetSource = false;
   }
 }
index 4aa2e3e..f1d4a2a 100644 (file)
@@ -27,7 +27,7 @@ namespace Dali
 {
 const unsigned int ADAPTOR_MAJOR_VERSION = 2;
 const unsigned int ADAPTOR_MINOR_VERSION = 0;
-const unsigned int ADAPTOR_MICRO_VERSION = 30;
+const unsigned int ADAPTOR_MICRO_VERSION = 31;
 const char* const  ADAPTOR_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index 73db4a5..1e2e3b4 100644 (file)
@@ -17,7 +17,7 @@
 
 Name:       dali2-adaptor
 Summary:    The DALi Tizen Adaptor
-Version:    2.0.30
+Version:    2.0.31
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT