#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
* @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.
*/
void Process(bool postProcessor) override;
+ /**
+ * @copydoc Dali::Integration::Processor::GetProcessorName()
+ */
+ std::string_view GetProcessorName() const override
+ {
+ return "NPatchLoader";
+ }
+
private:
NPatchData::NPatchDataId GenerateUniqueNPatchDataId();
*/
struct NPatchInfo
{
- NPatchInfo(std::shared_ptr<NPatchData> data)
+ NPatchInfo(NPatchDataPtr data)
: mData(data),
mReferenceCount(1u)
{
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.
};
/**
* 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:
/**