[Tizen] Print Processor and AsyncTask name 19/303119/1
authorEunki, Hong <eunkiki.hong@samsung.com>
Tue, 19 Dec 2023 03:20:57 +0000 (12:20 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Wed, 20 Dec 2023 06:17:41 +0000 (15:17 +0900)
Change-Id: Id857319423092faea102b9f8e5acb37a92bec7c6
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
16 files changed:
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-async-task-manager.cpp
dali-scene3d/internal/common/environment-map-load-task.h
dali-scene3d/internal/common/model-load-task.h
dali-scene3d/internal/event/collider-mesh-processor-impl.h
dali-scene3d/internal/model-motion/motion-data-load-task.h
dali-toolkit/internal/controls/canvas-view/canvas-view-impl.h
dali-toolkit/internal/controls/canvas-view/canvas-view-rasterize-task.h
dali-toolkit/internal/image-loader/fast-track-loading-task.h
dali-toolkit/internal/image-loader/loading-task.h
dali-toolkit/internal/texture-manager/texture-manager-impl.h
dali-toolkit/internal/transition/transition-set-impl.h
dali-toolkit/internal/visuals/animated-vector-image/vector-animation-manager.h
dali-toolkit/internal/visuals/animated-vector-image/vector-animation-task.h
dali-toolkit/internal/visuals/npatch-loader.h
dali-toolkit/internal/visuals/svg/svg-task.h

index f6b8f8b0eb13f3d688b9a2a4aacdf2eaa66c7b08..b81c6931030a29ac684b32ffbde69fe6c6a8275d 100644 (file)
@@ -31,6 +31,7 @@
 #include <toolkit-async-task-manager.h>
 #include <toolkit-scene-holder-impl.h>
 #include <toolkit-test-application.h>
+#include "dali-test-suite-utils.h"
 
 namespace Dali
 {
@@ -196,12 +197,14 @@ void Adaptor::RemoveWindow(Internal::Adaptor::SceneHolder* window)
 void Adaptor::RegisterProcessor(Integration::Processor& processor, bool postProcessor)
 {
   Integration::Core& core = mTestApplication->GetCore();
+  tet_printf("Adaptor::RegisterProcessor : %s\n", processor.GetProcessorName().data());
   core.RegisterProcessor(processor, postProcessor);
 }
 
 void Adaptor::UnregisterProcessor(Integration::Processor& processor, bool postProcessor)
 {
   Integration::Core& core = mTestApplication->GetCore();
+  tet_printf("Adaptor::UnregisterProcessor : %s\n", processor.GetProcessorName().data());
   core.UnregisterProcessor(processor, postProcessor);
 }
 
index 204ca22096ab215c7514cbd8839e46ab2ddd7cc8..c6922a59f26dc85b94f9cd4eec033192d42df810 100644 (file)
@@ -34,6 +34,7 @@
 #include <toolkit-application.h>
 #include <toolkit-environment-variable.h>
 #include <toolkit-event-thread-callback.h>
+#include "dali-test-suite-utils.h"
 
 namespace Dali
 {
@@ -290,7 +291,9 @@ protected:
       }
       else
       {
+        tet_printf("BEGIN: AsyncTask[%s] Process\n", task->GetTaskName().data());
         task->Process();
+        tet_printf("END: AsyncTask[%s] Process\n", task->GetTaskName().data());
         if(!mDestroyThread)
         {
           mAsyncTaskManager.CompleteTask(std::move(task));
index 0517cbd5895ea1ad2be9206d948e94407018d2ee..6ca315a3d273a037c7e3c04dc63a6a50c461d2b0 100644 (file)
@@ -53,17 +53,6 @@ public:
    */
   ~EnvironmentMapLoadTask();
 
-  /**
-   * Process the task
-   */
-  void Process() override;
-
-  /**
-   * Whether the task is ready to process.
-   * @return True if the task is ready to process.
-   */
-  bool IsReady() override;
-
   /**
    * Whether the task has succeeded.
    * @return True if the task has succeeded.
@@ -89,6 +78,25 @@ public:
    */
   Dali::Scene3D::EnvironmentMapType GetEnvironmentMapType();
 
+public: // Implementation of AsyncTask
+  /**
+   * @copydoc Dali::AsyncTask::Process()
+   */
+  void Process();
+
+  /**
+   * @copydoc Dali::AsyncTask::IsReady()
+   */
+  bool IsReady();
+
+  /**
+   * @copydoc Dali::AsyncTask::GetTaskName()
+   */
+  std::string_view GetTaskName() const override
+  {
+    return "EnvironmentMapLoadTask";
+  }
+
 private:
   // Undefined
   EnvironmentMapLoadTask(const EnvironmentMapLoadTask& task) = delete;
index a880748202293535d84b6bbc93d307e43eded522..c2baead5b95db7a8e61538162736c54bf27ed80e 100644 (file)
@@ -56,17 +56,6 @@ public:
    */
   ~ModelLoadTask();
 
-  /**
-   * Process the task
-   */
-  void Process() override;
-
-  /**
-   * Whether the task is ready to process.
-   * @return True if the task is ready to process.
-   */
-  bool IsReady() override;
-
   /**
    * Whether the task has succeeded.
    * @return True if the task has succeeded.
@@ -103,6 +92,25 @@ public:
    */
   Dali::Scene3D::Loader::Customization::Choices& GetResourceChoices();
 
+public: // Implementation of AsyncTask
+  /**
+   * @copydoc Dali::AsyncTask::Process()
+   */
+  void Process();
+
+  /**
+   * @copydoc Dali::AsyncTask::IsReady()
+   */
+  bool IsReady();
+
+  /**
+   * @copydoc Dali::AsyncTask::GetTaskName()
+   */
+  std::string_view GetTaskName() const override
+  {
+    return "ModelLoadTask";
+  }
+
 private:
   // Undefined
   ModelLoadTask(const ModelLoadTask& task) = delete;
index 45c7b1822d7d3a3864ed465944f8e471ae53757d..fb34eb51241746550b971ba7c10a7bf5f86fc2ca 100644 (file)
@@ -45,10 +45,22 @@ public:
 private:
   void ModelOnScene(Actor actor);
 
-  void Process(bool /*postProcessor*/);
-
   void AddSceneViewParentToProcessingQueue(Scene3D::Model model);
 
+protected: // Implementation of Processor
+  /**
+   * @copydoc Dali::Integration::Processor::Process()
+   */
+  void Process(bool /*postProcessor*/) override;
+
+  /**
+   * @copydoc Dali::Integration::Processor::GetProcessorName()
+   */
+  std::string_view GetProcessorName() const override
+  {
+    return "ColliderMeshProcessor";
+  }
+
 private:
   std::vector<Scene3D::SceneView> mSceneViewsToProcess;
   std::vector<Scene3D::SceneView> mConnectedSceneViews;
index 2c1d320d06d7b96c3ee896250a71704d05d7f77a..df601c4db50a09bb74b57ddbd35472cddad3a00f 100644 (file)
@@ -75,16 +75,24 @@ public:
    */
   ~MotionDataLoadTask();
 
+public: // Implementation of AsyncTask
   /**
-   * Process the task
+   * @copydoc Dali::AsyncTask::Process()
    */
-  void Process() override;
+  void Process();
 
   /**
-   * Whether the task is ready to process.
-   * @return True if the task is ready to process.
+   * @copydoc Dali::AsyncTask::IsReady()
    */
-  bool IsReady() override;
+  bool IsReady();
+
+  /**
+   * @copydoc Dali::AsyncTask::GetTaskName()
+   */
+  std::string_view GetTaskName() const override
+  {
+    return "MotionDataLoadTask";
+  }
 
 public:
   const Scene3D::Loader::AnimationDefinition& GetAnimationDefinition() const;
index d7c8c4b07b9ebb58ab9f2be039758e8d967a7d8d..52ea231037b07de7d8a47147446035001ab4064b 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_CANVAS_VIEW_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.
@@ -27,8 +27,8 @@
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/controls/canvas-view/canvas-view.h>
-#include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/internal/controls/canvas-view/canvas-view-rasterize-task.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
 
 namespace Dali
 {
@@ -132,6 +132,14 @@ protected:
    */
   void Process(bool postProcessor) override;
 
+  /**
+   * @copydoc Dali::Integration::Processor::GetProcessorName()
+   */
+  std::string_view GetProcessorName() const override
+  {
+    return "CanvasView";
+  }
+
 public:
   /**
    * @bried Apply the rasterized image to the canvas view
index ac375c06607232a4bfb54934a21b4493ba321e3f..6187ccfbd17fb9013aac8010655185bc44e48763 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_CANVAS_VIEW_RASTERIZE_TASK_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.
@@ -64,17 +64,6 @@ public:
    */
   ~CanvasRendererRasterizingTask() = default;
 
-  /**
-   * Process the task
-   */
-  void Process() override;
-
-  /**
-   * Whether the task is ready to process.
-   * @return True if the task is ready to process.
-   */
-  bool IsReady() override;
-
   /**
    * Do the rasterization with the mRasterizer.
    * @return Returns True when it's successful. False otherwise.
@@ -93,6 +82,25 @@ public:
    */
   Texture GetRasterizedTexture();
 
+public: // Implementation of AsyncTask
+  /**
+   * @copydoc Dali::AsyncTask::Process()
+   */
+  void Process() override;
+
+  /**
+   * @copydoc Dali::AsyncTask::IsReady()
+   */
+  bool IsReady() override;
+
+  /**
+   * @copydoc Dali::AsyncTask::GetTaskName()
+   */
+  std::string_view GetTaskName() const override
+  {
+    return "CanvasRendererRasterizingTask";
+  }
+
 private:
   // Undefined
   CanvasRendererRasterizingTask(const CanvasRendererRasterizingTask& task);
index 2140794163ff9c272a0924e5cc14d8485df1a4f8..9bde308beb722e2570a6912430bbe080bf829d2d 100644 (file)
@@ -63,17 +63,25 @@ public:
    */
   ~FastTrackLoadingTask() override;
 
+public: // Implementation of AsyncTask
   /**
-   * @brief Process the task accodring to the type
+   * @copydoc Dali::AsyncTask::Process()
    */
   void Process() override;
 
   /**
-   * @brief Whether the task is ready to process.
-   * @return True if the task is ready to process.
+   * @copydoc Dali::AsyncTask::IsReady()
    */
   bool IsReady() override;
 
+  /**
+   * @copydoc Dali::AsyncTask::GetTaskName()
+   */
+  std::string_view GetTaskName() const override
+  {
+    return "FastTrackLoadingTask";
+  }
+
 private:
   // Undefined
   FastTrackLoadingTask(const FastTrackLoadingTask& queue) = delete;
index 60728569670bdaddcfe7ec624d9357a97ac4498b..8554e6c4ac3537d3fd73345f4cf178b7837a4897 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_IMAGE_LOADING_TASK_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.
@@ -148,21 +148,28 @@ public:
   ~LoadingTask() override;
 
   /**
-   * Process the task accodring to the type
+   * @brief Set the Texture Id
+   */
+  void SetTextureId(TextureManagerType::TextureId id);
+
+public: // Implementation of AsyncTask
+  /**
+   * @copydoc Dali::AsyncTask::Process()
    */
   void Process() override;
 
   /**
-   * Whether the task is ready to process.
-   * @return True if the task is ready to process.
+   * @copydoc Dali::AsyncTask::IsReady()
    */
   bool IsReady() override;
 
   /**
-   * @brief Set the Texture Id
-   *
+   * @copydoc Dali::AsyncTask::GetTaskName()
    */
-  void SetTextureId(TextureManagerType::TextureId id);
+  std::string_view GetTaskName() const override
+  {
+    return "LoadingTask";
+  }
 
 private:
   // Undefined
index 9ac6f25a5824899a88d2404ad769fe7b32be22df..fdae67aee57501798ee8bba88e49a51a33cd25e2 100644 (file)
@@ -646,6 +646,14 @@ protected: // Implementation of Processor
    */
   void Process(bool postProcessor) override;
 
+  /**
+   * @copydoc Dali::Integration::Processor::GetProcessorName()
+   */
+  std::string_view GetProcessorName() const override
+  {
+    return "TextureManager";
+  }
+
 private:
   /**
    * Deleted copy constructor.
index b980a46b98e9770e14a59857f8cc534a6e5c7841..ff7d60eb6b5467e8a21dbeb014f8ce46f69e755d 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_TRANSITION_SET_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.
@@ -111,6 +111,14 @@ protected: // Implementation of Processor
    */
   void Process(bool postProcessor) override;
 
+  /**
+   * @copydoc Dali::Integration::Processor::GetProcessorName()
+   */
+  std::string_view GetProcessorName() const override
+  {
+    return "TransitionSet";
+  }
+
 protected:
   /**
    * Construct a new TransitionSet.
index 593517cef956e6b5321e3fd1d09dbfd0c0139aa4..c3cba215d64b5e08bcd6a58ffd3ad2f90ecdff31 100644 (file)
@@ -94,6 +94,14 @@ protected: // Implementation of Processor
    */
   void Process(bool postProcessor) override;
 
+  /**
+   * @copydoc Dali::Integration::Processor::GetProcessorName()
+   */
+  std::string_view GetProcessorName() const override
+  {
+    return "VectorAnimationManager";
+  }
+
 private:
   // Undefined
   VectorAnimationManager(const VectorAnimationManager& manager) = delete;
index dcd66fcd551dcdb7cd7a1eb7a41f390e2eae826a..a6c24b9d706dd9ab3666077adbb2f39e591ae61d 100644 (file)
@@ -136,17 +136,6 @@ public:
    */
   ~VectorAnimationTask() override;
 
-  /**
-   * Process the task accodring to the type
-   */
-  void Process() override;
-
-  /**
-   * Whether the task is ready to process.
-   * @return True if the task is ready to process.
-   */
-  bool IsReady() override;
-
   /**
    * @brief Finalizes the task.
    */
@@ -265,6 +254,25 @@ public:
    */
   bool IsAnimating();
 
+public: // Implementation of AsyncTask
+  /**
+   * @copydoc Dali::AsyncTask::Process()
+   */
+  void Process() override;
+
+  /**
+   * @copydoc Dali::AsyncTask::IsReady()
+   */
+  bool IsReady() override;
+
+  /**
+   * @copydoc Dali::AsyncTask::GetTaskName()
+   */
+  std::string_view GetTaskName() const override
+  {
+    return "VectorAnimationTask";
+  }
+
 private:
   /**
    * @brief Loads the animation file.
index 5890326e505eba9466553a8f0f9186332dfc3ee5..fb66fcc9f2a3aa1c100e2226f3b1b6283b416d0a 100644 (file)
@@ -95,6 +95,14 @@ protected: // Implementation of Processor
    */
   void Process(bool postProcessor) override;
 
+  /**
+   * @copydoc Dali::Integration::Processor::GetProcessorName()
+   */
+  std::string_view GetProcessorName() const override
+  {
+    return "NPatchLoader";
+  }
+
 private:
   NPatchData::NPatchDataId GenerateUniqueNPatchDataId();
 
index 8b421d44cda25c03245d05e4e4e14bf561bf0911..e23a8ae376231539637bf08f128e083a2973f673 100644 (file)
 
 // EXTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/vector-image-renderer.h>
+#include <dali/public-api/adaptor-framework/encoded-image-buffer.h>
 #include <dali/public-api/common/intrusive-ptr.h>
 #include <dali/public-api/common/vector-wrapper.h>
 #include <dali/public-api/images/pixel-data.h>
-#include <dali/public-api/adaptor-framework/encoded-image-buffer.h>
 #include <memory>
 
 // INTERNAL INCLUDES
@@ -65,17 +65,6 @@ public:
    */
   virtual ~SvgTask() = default;
 
-  /**
-   * Process the task
-   */
-  virtual void Process() = 0;
-
-  /**
-   * Whether the task is ready to process.
-   * @return True if the task is ready to process.
-   */
-  virtual bool IsReady() = 0;
-
   /**
    * Whether the task has succeeded.
    * @return True if the task has succeeded.
@@ -124,16 +113,24 @@ public:
    */
   ~SvgLoadingTask() override;
 
+public: // Implementation of AsyncTask
   /**
-   * Process the task
+   * @copydoc Dali::AsyncTask::Process()
    */
-  void Process() override;
+  void Process();
 
   /**
-   * Whether the task is ready to process.
-   * @return True if the task is ready to process.
+   * @copydoc Dali::AsyncTask::IsReady()
    */
-  bool IsReady() override;
+  bool IsReady();
+
+  /**
+   * @copydoc Dali::AsyncTask::GetTaskName()
+   */
+  std::string_view GetTaskName() const override
+  {
+    return "SvgLoadingTask";
+  }
 
 private:
   // Undefined
@@ -165,17 +162,6 @@ public:
    */
   ~SvgRasterizingTask() override;
 
-  /**
-   * Process the task accodring to the type
-   */
-  void Process() override;
-
-  /**
-   * Whether the task is ready to process.
-   * @return True if the task is ready to process.
-   */
-  bool IsReady() override;
-
   /**
    * Get the rasterization result.
    * @return The pixel data with the rasterized pixels.
@@ -193,6 +179,25 @@ public:
   }
 #endif
 
+public: // Implementation of AsyncTask
+  /**
+   * @copydoc Dali::AsyncTask::Process()
+   */
+  void Process();
+
+  /**
+   * @copydoc Dali::AsyncTask::IsReady()
+   */
+  bool IsReady();
+
+  /**
+   * @copydoc Dali::AsyncTask::GetTaskName()
+   */
+  std::string_view GetTaskName() const override
+  {
+    return "SvgRasterizingTask";
+  }
+
 private:
   // Undefined
   SvgRasterizingTask(const SvgRasterizingTask& task) = delete;