Merge "Remove dead code for render needing an update (no such case at the moment...
[platform/core/uifw/dali-core.git] / dali / internal / render / common / render-manager.h
index 40cc7c1..49bc16b 100644 (file)
@@ -21,8 +21,6 @@
 // INTERNAL INCLUDES
 #include <dali/public-api/math/rect.h>
 #include <dali/internal/common/shader-saver.h>
-#include <dali/internal/update/resources/resource-manager-declarations.h>
-#include <dali/internal/render/common/texture-uploaded-dispatcher.h>
 #include <dali/internal/render/gl-resources/gpu-buffer.h>
 #include <dali/internal/render/renderers/render-property-buffer.h>
 #include <dali/internal/event/rendering/texture-impl.h>
@@ -52,24 +50,22 @@ class Renderer;
 struct Sampler;
 class RenderTracker;
 class Geometry;
-class NewTexture;
+class Texture;
 }
 
 namespace SceneGraph
 {
 class RenderQueue;
-class TextureCache;
 class RenderInstruction;
 class RenderInstructionContainer;
 class Shader;
 class PropertyBufferDataProvider;
-class GeometryBatcher;
 
 /**
  * RenderManager is responsible for rendering the result of the previous "update", which
  * is provided in a RenderCommand during UpdateManager::Update().
  */
-class RenderManager : public TextureUploadedDispatcher
+class RenderManager
 {
 public:
 
@@ -77,13 +73,10 @@ public:
    * Construct a new RenderManager.
    * @param[in]  glAbstraction The GL abstraction used for rendering.
    * @param[in]  glSyncAbstraction The GL sync abstraction used fence sync creation/deletion.
-   * @param[in]  geometryBatcher The geometry batcher instance
    * @param[out] resourcePostProcessQueue A queue for sending rendered texture ids to the update-thread.*
    */
   static RenderManager* New( Integration::GlAbstraction& glAbstraction,
-                             Integration::GlSyncAbstraction& glSyncAbstraction,
-                             SceneGraph::GeometryBatcher& geometryBatcher,
-                             LockedResourceQueue& resourcePostProcessQueue );
+                             Integration::GlSyncAbstraction& glSyncAbstraction );
 
   /**
    * Non-virtual destructor; not intended as a base class
@@ -97,13 +90,6 @@ public:
   RenderQueue& GetRenderQueue();
 
   /**
-   * Retrieve the texture cache. Messages should only be sent to this from the update thread,
-   * accessor methods should only be used from the render thread.
-   * @return The texture cache
-   */
-  TextureCache& GetTextureCache();
-
-  /**
    * @copydoc Dali::Integration::Core::ContextCreated()
    */
   void ContextCreated();
@@ -114,12 +100,6 @@ public:
   void ContextDestroyed();
 
   /**
-   * Dispatch requests onto the postProcessResourcesQueue
-   * @param[in] resource The Id of the resource to dispatch
-   */
-  virtual void DispatchTextureUploaded( ResourceId resource );
-
-  /**
    * Set the upstream interface for compiled shader binaries to be sent back to for eventual
    * caching and saving.
    * @param[in] upstream The abstract interface to send any received ShaderDatas onwards to..
@@ -272,13 +252,13 @@ public:
    * Adds a texture to the render manager
    * @param[in] texture The texture to add
    */
-  void AddTexture( Render::NewTexture* texture );
+  void AddTexture( Render::Texture* texture );
 
   /**
    * Removes a texture from the render manager
    * @param[in] texture The texture to remove
    */
-  void RemoveTexture( Render::NewTexture* texture );
+  void RemoveTexture( Render::Texture* texture );
 
   /**
    * Uploads data to an existing texture
@@ -286,13 +266,13 @@ public:
    * @param[in] pixelData The pixel data object
    * @param[in] params The parameters for the upload
    */
-  void UploadTexture( Render::NewTexture* texture, PixelDataPtr pixelData, const NewTexture::UploadParams& params );
+  void UploadTexture( Render::Texture* texture, PixelDataPtr pixelData, const Texture::UploadParams& params );
 
   /**
    * Generates mipmaps for a given texture
    * @param[in] texture The texture
    */
-  void GenerateMipmaps( Render::NewTexture* texture );
+  void GenerateMipmaps( Render::Texture* texture );
 
   /**
    * Adds a framebuffer to the render manager
@@ -313,7 +293,7 @@ public:
    * @param[in] mipmapLevel The mipmap of the texture to be attached
    * @param[in] layer Indicates which layer of a cube map or array texture to attach. Unused for 2D textures
    */
-  void AttachColorTextureToFrameBuffer( Render::FrameBuffer* frameBuffer, Render::NewTexture* texture, unsigned int mipmapLevel, unsigned int layer );
+  void AttachColorTextureToFrameBuffer( Render::FrameBuffer* frameBuffer, Render::Texture* texture, unsigned int mipmapLevel, unsigned int layer );
 
   /**
    * Adds a render tracker to the RenderManager. RenderManager takes ownership of the
@@ -330,12 +310,6 @@ public:
   void RemoveRenderTracker( Render::RenderTracker* renderTracker );
 
   /**
-   * Set the default shader that is to be used in absence of custom shader
-   * @param[in] shader that is the default one
-   */
-  void SetDefaultShader( Shader* shader );
-
-  /**
    * returns the Program controller for sending program messages
    * @return the ProgramController
    */
@@ -346,18 +320,16 @@ public:
   /**
    * Renders the results of the previous "update" traversal.
    * @param[out] status contains the flag that indicates if render instructions exist
-   * @return true if a further update is required
    */
-  bool Render( Integration::RenderStatus& status );
+  void Render( Integration::RenderStatus& status );
 
 private:
 
   /**
    * Helper to process a single RenderInstruction.
    * @param[in] instruction A description of the rendering operation.
-   * @param[in] defaultShader default shader to use.
    */
-  void DoRender( RenderInstruction& instruction, Shader& defaultShader );
+  void DoRender( RenderInstruction& instruction );
 
 private: