Merge "Remove unused custom shader prefix method" into devel/master
[platform/core/uifw/dali-core.git] / dali / public-api / images / native-image-interface.h
index 606864d..ef60e4d 100644 (file)
 // 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
 {
@@ -42,7 +43,6 @@ namespace Dali
 class NativeImageInterface : public Dali::RefObject
 {
 public:
-
   class Extension; ///< Forward declare future extension interface
 
   /**
@@ -98,7 +98,7 @@ public:
    */
   virtual uint32_t GetHeight() const = 0;
 
- /**
 /**
   * @brief Queries whether blending is required.
   * @SINCE_1_0.0
   * @return True if blending is required
@@ -114,12 +114,12 @@ public:
   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.
@@ -154,21 +154,17 @@ public:
    */
   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;
 };
 
 /**