[Tizen] Change PixelBufferLoadedSignalType accepted/tizen/unified/20220531.143743 submit/tizen/20220527.062641
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Fri, 27 May 2022 02:15:02 +0000 (11:15 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Fri, 27 May 2022 02:15:07 +0000 (11:15 +0900)
This reverts commit 1a99679f061c7b9f2cde4a49579d3ad8c4bb09d7.

dali-toolkit/devel-api/image-loader/async-image-loader-devel.h
dali-toolkit/internal/image-loader/async-image-loader-impl.cpp
dali-toolkit/internal/texture-manager/texture-async-loading-helper.cpp
dali-toolkit/internal/texture-manager/texture-async-loading-helper.h

index 0e059a5..9073da7 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_DEVEL_API_IMAGE_LOADER_ASYNC_IMAGE_LOADER_DEVEL_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -31,7 +31,7 @@ namespace Toolkit
 {
 namespace DevelAsyncImageLoader
 {
-typedef Signal<void(uint32_t, Devel::PixelBuffer)> PixelBufferLoadedSignalType;
+typedef Signal<void(uint32_t, std::vector<Devel::PixelBuffer>&)> PixelBufferLoadedSignalType;
 
 /**
  * @brief Whether to multiply alpha into color channels on load
index cd3ac9f..fc48c18 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -136,7 +136,8 @@ void AsyncImageLoader::ProcessLoadedImage()
   {
     if(mPixelBufferLoadedSignal.GetConnectionCount() > 0)
     {
-      mPixelBufferLoadedSignal.Emit(next->id, next->pixelBuffer);
+      std::vector<Devel::PixelBuffer> pixelBuffers{next->pixelBuffer};
+      mPixelBufferLoadedSignal.Emit(next->id, pixelBuffers);
     }
     else if(mLoadedSignal.GetConnectionCount() > 0)
     {
index f17c62a..0d88f47 100644 (file)
@@ -100,8 +100,8 @@ TextureAsyncLoadingHelper::TextureAsyncLoadingHelper(
     this, &TextureAsyncLoadingHelper::AsyncLoadComplete);
 }
 
-void TextureAsyncLoadingHelper::AsyncLoadComplete(uint32_t           id,
-                                                  Devel::PixelBuffer pixelBuffer)
+void TextureAsyncLoadingHelper::AsyncLoadComplete(uint32_t                         id,
+                                                  std::vector<Devel::PixelBuffer>& pixelBuffers)
 {
   DALI_LOG_INFO(gTextureManagerLogFilter, Debug::Concise, "TextureAsyncLoadingHelper::AsyncLoadComplete( loadId :%d )\n", id);
   if(mLoadingInfoContainer.size() >= 1u)
@@ -112,7 +112,7 @@ void TextureAsyncLoadingHelper::AsyncLoadComplete(uint32_t           id,
     if(loadingInfo.loadId == id)
     {
       // Call TextureManager::AsyncLoadComplete
-      mTextureManager.AsyncLoadComplete(loadingInfo.textureId, pixelBuffer);
+      mTextureManager.AsyncLoadComplete(loadingInfo.textureId, pixelBuffers[0]);
     }
 
     mLoadingInfoContainer.pop_front();
index 482bfd3..688aefb 100644 (file)
@@ -126,11 +126,11 @@ private:
                             AsyncLoadingInfoContainerType&& loadingInfoContainer);
 
   /**
-   * @brief Callback to be called when texture loading is complete, it passes the pixel buffer on to texture manager.
-   * @param[in] id          Loader id
-   * @param[in] pixelBuffer Image data
+   * @brief Callback to be called when texture loading is complete, it passes the pixel buffer list on to texture manager.
+   * @param[in] id           Loader id
+   * @param[in] pixelBuffers Image data
    */
-  void AsyncLoadComplete(std::uint32_t id, Devel::PixelBuffer pixelBuffer);
+  void AsyncLoadComplete(std::uint32_t id, std::vector<Devel::PixelBuffer>& pixelBuffers);
 
 private: // Member Variables:
   Toolkit::AsyncImageLoader     mLoader;