[Tizen] Do not call gl functions during shutdown
[platform/core/uifw/dali-adaptor.git] / dali / internal / graphics / gles-impl / gles-graphics-shader.h
index d96223f..180a14b 100644 (file)
@@ -42,15 +42,12 @@ public:
   /**
    * @brief Destructor
    */
-  ~Shader() override = default;
+  ~Shader() override;
 
   /**
    * @brief Called when GL resources are destroyed
    */
-  void DestroyResource() override
-  {
-    // TODO: Implement destroying the resource
-  }
+  void DestroyResource() override;
 
   /**
    * @brief Called when initializing the resource
@@ -59,29 +56,28 @@ public:
    */
   bool InitializeResource() override
   {
-    // TODO: Implement initializing resource
-    return {};
+    // The Shader has instant initialization, hence no need to initialize GL resource
+    // here
+    return true;
   }
 
   /**
    * @brief Compiles shader
-   * @return
+   *
+   * @return True on success
    */
-  bool Compile() const;
+  [[nodiscard]] bool Compile() const;
 
   /**
    * @brief Called when UniquePtr<> on client-side dies
    */
-  void DiscardResource() override
-  {
-    // TODO: Implement moving to the discard queue
-  }
+  void DiscardResource() override;
 
   uint32_t GetGLShader() const;
 
 private:
   struct Impl;
-  std::unique_ptr<Impl> mImpl;
+  std::unique_ptr<Impl> mImpl{nullptr};
 };
 
 } // namespace Dali::Graphics::GLES