X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Frender%2Frenderers%2Frender-renderer.h;h=55bac5730ee442ca9d94f7819e2d500b7f67adc4;hb=4d75040ab200bd306ec5a48f2a617480062eef4c;hp=fa04275d6f297d548fc76ea8c43334dfc11e6b0b;hpb=9ac94c145f620fc90c39a0f3dadbd88cc4b01940;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/render/renderers/render-renderer.h b/dali/internal/render/renderers/render-renderer.h old mode 100644 new mode 100755 index fa04275..55bac57 --- a/dali/internal/render/renderers/render-renderer.h +++ b/dali/internal/render/renderers/render-renderer.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_RENDER_RENDERER_H /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 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. @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -46,7 +45,6 @@ namespace SceneGraph { class SceneController; class Shader; -class TextureCache; class NodeDataProvider; } @@ -84,11 +82,11 @@ public: int stencilFunctionMask; ///< The stencil function mask int stencilFunctionReference; ///< The stencil function reference int stencilMask; ///< The stencil mask - RenderMode::Type renderMode:3; ///< The render mode - StencilFunction::Type stencilFunction:3; ///< The stencil function - StencilOperation::Type stencilOperationOnFail:3; ///< The stencil operation for stencil test fail - StencilOperation::Type stencilOperationOnZFail:3; ///< The stencil operation for depth test fail - StencilOperation::Type stencilOperationOnZPass:3; ///< The stencil operation for depth test pass + RenderMode::Type renderMode:4; ///< The render mode + StencilFunction::Type stencilFunction:4; ///< The stencil function + StencilOperation::Type stencilOperationOnFail:4; ///< The stencil operation for stencil test fail + StencilOperation::Type stencilOperationOnZFail:4; ///< The stencil operation for depth test fail + StencilOperation::Type stencilOperationOnZPass:4; ///< The stencil operation for depth test pass }; /** @@ -117,7 +115,7 @@ public: static Renderer* New( SceneGraph::RenderDataProvider* dataProviders, Render::Geometry* geometry, unsigned int blendingBitmask, - const Vector4* blendColor, + const Vector4& blendColor, FaceCullingMode::Type faceCullingMode, bool preMultipliedAlphaEnabled, DepthWriteMode::Type depthWriteMode, @@ -141,7 +139,7 @@ public: Renderer( SceneGraph::RenderDataProvider* dataProviders, Render::Geometry* geometry, unsigned int blendingBitmask, - const Vector4* blendColor, + const Vector4& blendColor, FaceCullingMode::Type faceCullingMode, bool preMultipliedAlphaEnabled, DepthWriteMode::Type depthWriteMode, @@ -150,23 +148,17 @@ public: StencilParameters& stencilParameters ); /** - * Change the data providers of the renderer - * @param[in] dataProviders The data providers - */ - void SetRenderDataProvider( SceneGraph::RenderDataProvider* dataProviders ); - - /** * Change the geometry used by the renderer * @param[in] geometry The new geometry */ void SetGeometry( Render::Geometry* geometry ); + /** * Second-phase construction. * This is called when the renderer is inside render thread * @param[in] context Context used by the renderer - * @param[in] textureCache The texture cache to use */ - void Initialize( Context& context, SceneGraph::TextureCache& textureCache ); + void Initialize( Context& context ); /** * Destructor @@ -189,7 +181,7 @@ public: * Set the blend color for blending options * @param[in] blendColor The blend color to pass to GL */ - void SetBlendColor( const Vector4* color ); + void SetBlendColor( const Vector4& color ); /** * Set the first element index to draw by the indexed draw @@ -345,25 +337,23 @@ public: /** * Called to render during RenderManager::Render(). * @param[in] context The context used for rendering - * @param[in] textureCache The texture cache used to get textures * @param[in] bufferIndex The index of the previous update buffer. * @param[in] node The node using this renderer - * @param[in] defaultShader in case there is no custom shader * @param[in] modelViewMatrix The model-view matrix. * @param[in] viewMatrix The view matrix. * @param[in] projectionMatrix The projection matrix. + * @param[in] size Size of the render item + * @param[in] blend If true, blending is enabled */ void Render( Context& context, - SceneGraph::TextureCache& textureCache, BufferIndex bufferIndex, const SceneGraph::NodeDataProvider& node, - SceneGraph::Shader& defaultShader, const Matrix& modelMatrix, const Matrix& modelViewMatrix, const Matrix& viewMatrix, const Matrix& projectionMatrix, const Vector3& size, - bool blend); + bool blend ); /** * Write the renderer's sort attributes to the passed in reference @@ -410,18 +400,16 @@ private: /** * Bind the textures and setup the samplers * @param[in] context The GL context - * @param[in] textureCache The texture cache * @param[in] program The shader program * @return False if create or bind failed, true if success. */ - bool BindTextures( Context& context, SceneGraph::TextureCache& textureCache, Program& program ); + bool BindTextures( Context& context, Program& program ); private: OwnerPointer< SceneGraph::RenderDataProvider > mRenderDataProvider; Context* mContext; - SceneGraph::TextureCache* mTextureCache; Render::Geometry* mGeometry; struct UniformIndexMap @@ -441,11 +429,10 @@ private: size_t mIndexedDrawFirstElement; ///< Offset of first element to draw size_t mIndexedDrawElementsCount; ///< Number of elements to draw - DepthFunction::Type mDepthFunction:3; ///< The depth function - FaceCullingMode::Type mFaceCullingMode:2; ///< The mode of face culling - BlendMode::Type mBlendMode:2; ///< The mode of blending - DepthWriteMode::Type mDepthWriteMode:2; ///< The depth write mode - DepthTestMode::Type mDepthTestMode:2; ///< The depth test mode + DepthFunction::Type mDepthFunction:4; ///< The depth function + FaceCullingMode::Type mFaceCullingMode:3; ///< The mode of face culling + DepthWriteMode::Type mDepthWriteMode:3; ///< The depth write mode + DepthTestMode::Type mDepthTestMode:3; ///< The depth test mode bool mUpdateAttributesLocation:1; ///< Indicates attribute locations have changed bool mPremultipledAlphaEnabled:1; ///< Flag indicating whether the Pre-multiplied Alpha Blending is required