Print Processor and AsyncTask name 25/303025/3
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 02:23:55 +0000 (11:23 +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 f6b8f8b..b81c693 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 204ca22..c6922a5 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 0517cbd..6ca315a 100644 (file)
@@ -54,17 +54,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 a880748..c2baead 100644 (file)
@@ -57,17 +57,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 45c7b18..fb34eb5 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 2c1d320..df601c4 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 d7c8c4b..52ea231 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 ac375c0..6187ccf 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.
@@ -65,17 +65,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 2140794..9bde308 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 6072856..8554e6c 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 9ac6f25..fdae67a 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 b980a46..ff7d60e 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 593517c..c3cba21 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 dcd66fc..a6c24b9 100644 (file)
@@ -137,17 +137,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.
    */
   void Finalize();
@@ -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 5890326..fb66fcc 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 8b421d4..e23a8ae 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
@@ -66,17 +66,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
@@ -166,17 +163,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;