X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Frender%2Fcommon%2Frender-list.h;h=90925eb892a042483689d85725d2415ed57132fc;hb=b43741a90b40ca9dfbd33d6a9d390d3c09230e89;hp=734ad0f06a0947d603fab575a01b354620952f28;hpb=13c3e0a4cb02ff7de53f4555cd0da8945677bc23;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/render/common/render-list.h b/dali/internal/render/common/render-list.h old mode 100644 new mode 100755 index 734ad0f..90925eb --- a/dali/internal/render/common/render-list.h +++ b/dali/internal/render/common/render-list.h @@ -1,8 +1,8 @@ -#ifndef __DALI_INTERNAL_SCENE_GRAPH_RENDER_LIST_H__ -#define __DALI_INTERNAL_SCENE_GRAPH_RENDER_LIST_H__ +#ifndef DALI_INTERNAL_SCENE_GRAPH_RENDER_LIST_H +#define DALI_INTERNAL_SCENE_GRAPH_RENDER_LIST_H /* - * Copyright (c) 2014 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. @@ -18,6 +18,9 @@ * */ +// EXTERNAL INCLUDES +#include + // INTERNAL INCLUDES #include #include @@ -47,32 +50,21 @@ struct RenderList; typedef OwnerContainer< RenderList* > RenderListContainer; /** - * The RenderList structure provides the renderer with a list of renderers and - * a set of flags to tell it what depth buffering is required. + * The RenderList structure provides the renderer with a list of renderers. */ struct RenderList { public: /** - * The RenderFlags describe how the objects are rendered using the stencil buffer. - */ - enum RenderFlags - { - STENCIL_BUFFER_ENABLED = 1 << 0, ///< If stencil buffer should be used for writing / test operation - STENCIL_WRITE = 1 << 1, ///< If the stencil buffer is writable - STENCIL_CLEAR = 1 << 2, ///< If the stencil buffer should first be cleared - }; - - /** * Constructor */ RenderList() : mNextFree( 0 ), - mRenderFlags( 0u ), mClippingBox( NULL ), mSourceLayer( NULL ), - mHasColorRenderItems( false ) + mHasColorRenderItems( false ), + mPartialUpdateEnabled( false ) { } @@ -81,44 +73,17 @@ public: */ ~RenderList() { - // pointer container deletes the render items + // Pointer container deletes the render items delete mClippingBox; } /** - * Clear the render flags - */ - void ClearFlags() - { - mRenderFlags = 0u; - } - - /** - * Set particular render flags - * @param[in] flags The set of flags to bitwise or with existing flags - */ - void SetFlags( unsigned int flags ) - { - mRenderFlags |= flags; - } - - /** - * Retrieve the render flags. - * @return the render flags. - */ - unsigned int GetFlags() const - { - return mRenderFlags; - } - - /** * Reset the render list for next frame */ void Reset() { - // we dont want to delete and re-create the render items every frame + // We don't want to delete and re-create the render items every frame mNextFree = 0; - mRenderFlags = 0u; delete mClippingBox; mClippingBox = NULL; @@ -161,7 +126,7 @@ public: /** * Get item at a given position in the list */ - RenderItem& GetItem( RenderItemContainer::SizeType index ) const + RenderItem& GetItem( uint32_t index ) const { DALI_ASSERT_DEBUG( index < GetCachedItemCount() ); return *mItems[ index ]; @@ -170,7 +135,7 @@ public: /** * Get renderer from an item in the list */ - const Render::Renderer& GetRenderer( RenderItemContainer::SizeType index ) const + const Render::Renderer& GetRenderer( uint32_t index ) const { DALI_ASSERT_DEBUG( index < GetCachedItemCount() ); return *mItems[ index ]->mRenderer; @@ -181,7 +146,7 @@ public: * Because of caching, the actual size may be bit more * @return The number of items */ - RenderItemContainer::SizeType Count() const + uint32_t Count() const { return mNextFree; } @@ -189,9 +154,9 @@ public: /** * @return the number of items cached by the list */ - RenderItemContainer::SizeType GetCachedItemCount() const + uint32_t GetCachedItemCount() const { - return mItems.Count(); + return static_cast( mItems.Count() ); } /** @@ -199,7 +164,7 @@ public: */ void ReuseCachedItems() { - mNextFree = mItems.Count(); + mNextFree = static_cast( mItems.Count() ); } /** @@ -207,7 +172,7 @@ public: */ bool IsEmpty() const { - return (mNextFree == 0); + return ( mNextFree == 0 ); } /** @@ -219,9 +184,8 @@ public: { if( clipping ) { - ClippingBox* newBox = new ClippingBox( box ); delete mClippingBox; - mClippingBox = newBox; + mClippingBox = new ClippingBox( box );; } } @@ -230,7 +194,7 @@ public: */ bool IsClipping() const { - return (NULL != mClippingBox); + return ( NULL != mClippingBox ); } /** @@ -295,6 +259,24 @@ public: return mHasColorRenderItems; } + /** + * Enable/Disable Partial update dirty flag + * @param[in] true to mark dirty else false + */ + void SetPartialUpdateEnabled( bool value ) + { + mPartialUpdateEnabled = value; + } + + /** + * Get Partial update dirty flag + * @return true if dirty else false + */ + bool IsPartialUpdateEnabled() const + { + return mPartialUpdateEnabled; + } + private: /* @@ -304,19 +286,20 @@ private: const RenderList& operator=( const RenderList& rhs ); RenderItemContainer mItems; ///< Each item is a renderer and matrix pair - RenderItemContainer::SizeType mNextFree; ///< index for the next free item to use - - unsigned int mRenderFlags; ///< The render flags + uint32_t mNextFree; ///< index for the next free item to use ClippingBox* mClippingBox; ///< The clipping box, in window coordinates, when clipping is enabled Layer* mSourceLayer; ///< The originating layer where the renderers are from bool mHasColorRenderItems : 1; ///< True if list contains color render items + bool mPartialUpdateEnabled : 1; //< True if partial update is needed. + }; + } // namespace SceneGraph } // namespace Internal } // namespace Dali -#endif // __DALI_INTERNAL_SCENE_GRAPH_RENDER_LIST_H__ +#endif // DALI_INTERNAL_SCENE_GRAPH_RENDER_LIST_H