X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Frender%2Fcommon%2Frender-manager.h;h=3d064b234167e2a375ae23ba01a5e6aa4cc2164a;hb=b43741a90b40ca9dfbd33d6a9d390d3c09230e89;hp=9d970cb67d33543e12baea0839dc9428fea0f399;hpb=b7a2625f66a16845af4fc44256126f32b9a0ac7e;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/render/common/render-manager.h b/dali/internal/render/common/render-manager.h old mode 100644 new mode 100755 index 9d970cb..3d064b2 --- a/dali/internal/render/common/render-manager.h +++ b/dali/internal/render/common/render-manager.h @@ -1,8 +1,8 @@ -#ifndef __DALI_INTERNAL_SCENE_GRAPH_RENDER_MANAGER_H__ -#define __DALI_INTERNAL_SCENE_GRAPH_RENDER_MANAGER_H__ +#ifndef DALI_INTERNAL_SCENE_GRAPH_RENDER_MANAGER_H +#define DALI_INTERNAL_SCENE_GRAPH_RENDER_MANAGER_H /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ // INTERNAL INCLUDES #include +#include #include #include #include @@ -32,6 +33,7 @@ namespace Integration { class GlAbstraction; class GlSyncAbstraction; +class GlContextHelperAbstraction; class RenderStatus; } @@ -71,12 +73,18 @@ 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[out] resourcePostProcessQueue A queue for sending rendered texture ids to the update-thread.* + * @param[in] glAbstraction The GL abstraction used for rendering. + * @param[in] glSyncAbstraction The GL sync abstraction used fence sync creation/deletion. + * @param[in] glContextHelperAbstraction The GL context helper abstraction for accessing GL context. + * @param[in] depthBufferAvailable Whether the depth buffer is available + * @param[in] stencilBufferAvailable Whether the stencil buffer is available */ static RenderManager* New( Integration::GlAbstraction& glAbstraction, - Integration::GlSyncAbstraction& glSyncAbstraction ); + Integration::GlSyncAbstraction& glSyncAbstraction, + Integration::GlContextHelperAbstraction& glContextHelperAbstraction, + Integration::DepthBufferAvailable depthBufferAvailable, + Integration::StencilBufferAvailable stencilBufferAvailable, + Integration::PartialUpdateAvailable partialUpdateAvailable ); /** * Non-virtual destructor; not intended as a base class @@ -134,11 +142,17 @@ public: void SetDefaultSurfaceRect( const Rect& rect ); /** + * Returns the orintation for the default surface (probably the application window). + * @return Orientation for the surface. + */ + void SetDefaultSurfaceOrientation( int orientation ); + + /** * Add a Renderer to the render manager. * @param[in] renderer The renderer to add. * @post renderer is owned by RenderManager */ - void AddRenderer( Render::Renderer* renderer ); + void AddRenderer( OwnerPointer< Render::Renderer >& renderer ); /** * Remove a Renderer from the render manager. @@ -152,7 +166,7 @@ public: * @param[in] sampler The sampler to add. * @post sampler is owned by RenderManager */ - void AddSampler( Render::Sampler* sampler ); + void AddSampler( OwnerPointer< Render::Sampler >& sampler ); /** * Remove a sampler from the render manager. @@ -166,7 +180,7 @@ public: * @param[in] minFilterMode Filter mode to use when the texture is minificated * @param[in] magFilterMode Filter mode to use when the texture is magnified */ - void SetFilterMode( Render::Sampler* sampler, unsigned int minFilterMode, unsigned int magFilterMode ); + void SetFilterMode( Render::Sampler* sampler, uint32_t minFilterMode, uint32_t magFilterMode ); /** * Set wrapping mode for a sampler @@ -174,14 +188,14 @@ public: * @param[in] uWrapMode Wrap mode in the x direction * @param[in] vWrapMode Wrap mode in the y direction */ - void SetWrapMode( Render::Sampler* sampler, unsigned int rWrapMode, unsigned int sWrapMode, unsigned int tWrapMode ); + void SetWrapMode( Render::Sampler* sampler, uint32_t rWrapMode, uint32_t sWrapMode, uint32_t tWrapMode ); /** * Add a property buffer to the render manager. * @param[in] propertyBuffer The property buffer to add. * @post propertBuffer is owned by RenderManager */ - void AddPropertyBuffer( Render::PropertyBuffer* propertyBuffer ); + void AddPropertyBuffer( OwnerPointer< Render::PropertyBuffer >& propertyBuffer ); /** * Remove a property buffer from the render manager. @@ -195,7 +209,7 @@ public: * @param[in] geometry The geometry to add. * @post geometry is owned by RenderManager */ - void AddGeometry( Render::Geometry* geometry ); + void AddGeometry( OwnerPointer< Render::Geometry >& geometry ); /** * Remove a geometry from the render manager. @@ -209,7 +223,7 @@ public: * @param[in] geometry The geometry * @param[in] propertyBuffer The property buffer to remove. */ - void AddVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer ); + void AttachVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer ); /** * Remove a property buffer from a Render::Geometry from the render manager. @@ -224,7 +238,7 @@ public: * @param[in] propertyBuffer The property buffer. * @param[in] format The new format of the buffer */ - void SetPropertyBufferFormat( Render::PropertyBuffer* propertyBuffer, Render::PropertyBuffer::Format* format ); + void SetPropertyBufferFormat( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Render::PropertyBuffer::Format>& format ); /** * Sets the data of an existing property buffer @@ -232,27 +246,27 @@ public: * @param[in] data The new data of the buffer * @param[in] size The new size of the buffer */ - void SetPropertyBufferData( Render::PropertyBuffer* propertyBuffer, Dali::Vector* data, size_t size ); + void SetPropertyBufferData( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Vector >& data, uint32_t size ); /** * Sets the data for the index buffer of an existing geometry * @param[in] geometry The geometry * @param[in] data A vector containing the indices */ - void SetIndexBuffer( Render::Geometry* geometry, Dali::Vector& data ); + void SetIndexBuffer( Render::Geometry* geometry, Dali::Vector& data ); /** * Set the geometry type of an existing render geometry * @param[in] geometry The render geometry * @param[in] geometryType The new geometry type */ - void SetGeometryType( Render::Geometry* geometry, unsigned int geometryType ); + void SetGeometryType( Render::Geometry* geometry, uint32_t geometryType ); /** * Adds a texture to the render manager * @param[in] texture The texture to add */ - void AddTexture( Render::Texture* texture ); + void AddTexture( OwnerPointer< Render::Texture >& texture ); /** * Removes a texture from the render manager @@ -278,7 +292,7 @@ public: * Adds a framebuffer to the render manager * @param[in] frameBuffer The framebuffer to add */ - void AddFrameBuffer( Render::FrameBuffer* frameBuffer ); + void AddFrameBuffer( OwnerPointer< Render::FrameBuffer >& frameBuffer ); /** * Removes a framebuffer from the render manager @@ -293,7 +307,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::Texture* texture, unsigned int mipmapLevel, unsigned int layer ); + void AttachColorTextureToFrameBuffer( Render::FrameBuffer* frameBuffer, Render::Texture* texture, uint32_t mipmapLevel, uint32_t layer ); /** * Adds a render tracker to the RenderManager. RenderManager takes ownership of the @@ -319,10 +333,10 @@ 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 + * @param[out] status contains the rendering flags. + * @param[in] forceClear force the Clear on the framebuffer even if nothing is rendered. */ - bool Render( Integration::RenderStatus& status ); + void Render( Integration::RenderStatus& status, bool forceClear ); private: @@ -358,4 +372,4 @@ private: } // namespace Dali -#endif // __DALI_INTERNAL_SCENE_GRAPH_RENDER_MANAGER_H__ +#endif // DALI_INTERNAL_SCENE_GRAPH_RENDER_MANAGER_H