Merge "Fix PropertyNotification issue" into devel/master
[platform/core/uifw/dali-core.git] / dali / internal / render / renderers / render-renderer.h
index a544883..5f4bbfb 100755 (executable)
@@ -155,6 +155,17 @@ public:
    */
   void SetGeometry( Render::Geometry* geometry );
 
+  void SetDrawCommands( Dali::DevelRenderer::DrawCommand* pDrawCommands, uint32_t size );
+
+  /**
+   * @brief Returns a reference to an array of draw commands
+   * @return Valid array of draw commands (may be empty)
+   */
+  const std::vector<Dali::DevelRenderer::DrawCommand>& GetDrawCommands() const
+  {
+    return mDrawCommands;
+  }
+
   /**
    * Second-phase construction.
    * This is called when the renderer is inside render thread
@@ -366,8 +377,8 @@ public:
                const Vector3& size,
                bool blend,
                Vector<GLuint>& boundTextures,
-               const Dali::Internal::SceneGraph::RenderInstruction& instruction //for reflection effect
-               );
+               const Dali::Internal::SceneGraph::RenderInstruction& instruction,
+               uint32_t queueIndex );
 
   /**
    * Write the renderer's sort attributes to the passed in reference
@@ -384,6 +395,14 @@ public:
    */
   void SetShaderChanged( bool value );
 
+  /**
+   * Check if the renderer attributes/uniforms are updated and returns the flag
+   *
+   * @param[in] bufferIndex The current update buffer index.
+   * @param[in] node The node using this renderer
+   */
+  bool Updated(BufferIndex bufferIndex, const SceneGraph::NodeDataProvider* node);
+
 private:
 
   struct UniformIndexMap;
@@ -445,6 +464,8 @@ private:
   UniformIndexMappings         mUniformIndexMap;
   Vector<GLint>                mAttributesLocation;
 
+  uint64_t                     mUniformsHash;
+
   StencilParameters            mStencilParameters;          ///< Struct containing all stencil related options
   BlendingOptions              mBlendingOptions;            ///< Blending options including blend color, blend func and blend equation
 
@@ -458,8 +479,10 @@ private:
   bool                         mUpdateAttributesLocation:1; ///< Indicates attribute locations have changed
   bool                         mPremultipledAlphaEnabled:1; ///< Flag indicating whether the Pre-multiplied Alpha Blending is required
   bool                         mShaderChanged:1;            ///< Flag indicating the shader changed and uniform maps have to be updated
+  bool                         mUpdated:1;
 
 
+  std::vector<Dali::DevelRenderer::DrawCommand> mDrawCommands; // Devel stuff
 };
 
 } // namespace SceneGraph