// EXTERNAL INCLUDES
#include <cstddef>
#include <cstdint> // uint32_t
+#include <string>
// INTERNAL INCLUDES
-#include <dali/public-api/object/ref-object.h>
#include <dali/public-api/object/any.h>
+#include <dali/public-api/object/ref-object.h>
namespace Dali
{
class NativeImageInterface : public Dali::RefObject
{
public:
-
class Extension; ///< Forward declare future extension interface
/**
*/
virtual uint32_t GetHeight() const = 0;
- /**
+ /**
* @brief Queries whether blending is required.
* @SINCE_1_0.0
* @return True if blending is required
virtual int GetTextureTarget() const = 0;
/**
- * @brief Get custom fragment prefix for rendering native image.
+ * @brief Apply custom fragment prefix for rendering native image.
*
- * @SINCE_1_9.23
- * @return Custom fragment prefix code as string.
+ * @param[in,out] shader shader code that will be applied fragment prefix.
+ * @return True if the shader is changed.
*/
- virtual const char* GetCustomFragmentPrefix() const = 0;
+ virtual bool ApplyNativeFragmentShader(std::string& shader) = 0;
/**
* @brief Get custom sampler type name for rendering native image.
*/
virtual Extension* GetExtension()
{
- return NULL;
+ return nullptr;
}
protected:
-
/**
* @brief A reference counted object may only be deleted by calling Unreference().
*
* The implementation should destroy the NativeImage resources.
* @SINCE_1_0.0
*/
- virtual ~NativeImageInterface()
- {
- }
-
+ ~NativeImageInterface() override = default;
};
/**