[dali_2.3.21] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / npatch-loader.h
index a55ab6f..fb66fcc 100644 (file)
@@ -21,7 +21,6 @@
 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 #include <dali/integration-api/processor-interface.h>
 #include <dali/public-api/rendering/texture-set.h>
-#include <memory> // for std::shared_ptr
 #include <string>
 #include <utility> // for std::pair
 
@@ -79,7 +78,7 @@ public:
    * @param [out] data const pointer to the NPatchData
    * @return true if data matching to id was really found
    */
-  bool GetNPatchData(const NPatchData::NPatchDataId id, std::shared_ptr<const NPatchData>& data);
+  bool GetNPatchData(const NPatchData::NPatchDataId id, NPatchDataPtr& data);
 
   /**
    * @brief Request remove a texture matching id.
@@ -96,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();
 
@@ -119,7 +126,7 @@ private:
    */
   struct NPatchInfo
   {
-    NPatchInfo(std::shared_ptr<NPatchData> data)
+    NPatchInfo(NPatchDataPtr data)
     : mData(data),
       mReferenceCount(1u)
     {
@@ -145,8 +152,8 @@ private:
     NPatchInfo(const NPatchInfo& info) = delete;            // Do not use copy constructor
     NPatchInfo& operator=(const NPatchInfo& info) = delete; // Do not use copy assign
 
-    std::shared_ptr<NPatchData> mData;
-    std::int16_t                mReferenceCount; ///< The number of N-patch visuals that use this data.
+    NPatchDataPtr mData;
+    std::int16_t  mReferenceCount; ///< The number of N-patch visuals that use this data.
   };
 
   /**
@@ -159,7 +166,7 @@ private:
    *                                   image has no alpha channel
    * @return NPatchData pointer that Load function will used.
    */
-  std::shared_ptr<NPatchData> GetNPatchData(const VisualUrl& url, const Rect<int>& border, bool& preMultiplyOnLoad);
+  NPatchDataPtr GetNPatchData(const VisualUrl& url, const Rect<int>& border, bool& preMultiplyOnLoad);
 
 protected:
   /**