Merge "Implemented Upload methods in Texture to upload data from PixelData objects...
[platform/core/uifw/dali-core.git] / dali / internal / render / common / render-list.h
index fef087d..734ad0f 100644 (file)
@@ -41,8 +41,6 @@ namespace SceneGraph
 
 class Layer;
 
-
-class RenderItem;
 typedef OwnerContainer< RenderItem* > RenderItemContainer;
 
 struct RenderList;
@@ -57,22 +55,13 @@ struct RenderList
 public:
 
   /**
-   * The RenderFlags describe how the objects are rendered using the depth and stencil buffer.
-   *
-   * The flags which relate to GL_DEPTH_TEST and GL_STENCIL_TEST are called
-   * DEPTH_BUFFER_ENABLED and STENCIL_BUFFER_ENABLED to avoid any confusion.
-   * E.g. if GL_DEPTH_TEST is not enabled you can't write to the depth buffer, which can cause confusion.
-   *
+   * The RenderFlags describe how the objects are rendered using the stencil buffer.
    */
   enum RenderFlags
   {
-    DEPTH_BUFFER_ENABLED   = 1 << 0, ///< If depth buffer should be used for writing / test operations
-    DEPTH_WRITE            = 1 << 1, ///< If the depth buffer is writable
-    DEPTH_CLEAR            = 1 << 2, ///< If the depth buffer should first be cleared
-    STENCIL_BUFFER_ENABLED = 1 << 3, ///< If stencil buffer should be used for writing / test operation
-    STENCIL_WRITE          = 1 << 4, ///< If the stencil buffer is writable
-    STENCIL_CLEAR          = 1 << 5, ///< If the stencil buffer should first be cleared
-
+    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
   };
 
   /**
@@ -162,11 +151,10 @@ public:
     // check if we have enough items, we can only be one behind at worst
     if( mItems.Count() <= mNextFree )
     {
-      mItems.PushBack( new RenderItem ); // Push a new empty render item
+      mItems.PushBack( RenderItem::New() ); // Push a new empty render item
     }
     // get the item mNextFree points to and increase by one
     RenderItem& item = *mItems[ mNextFree++ ];
-    item.Reset();
     return item;
   }
 
@@ -185,7 +173,7 @@ public:
   const Render::Renderer& GetRenderer( RenderItemContainer::SizeType index ) const
   {
     DALI_ASSERT_DEBUG( index < GetCachedItemCount() );
-    return mItems[ index ]->GetRenderer();
+    return *mItems[ index ]->mRenderer;
   }
 
   /**
@@ -276,13 +264,13 @@ public:
   /**
    * @return the source layer these renderitems originate from
    */
-  Layer* GetSourceLayer()
+  Layer* GetSourceLayer() const
   {
     return mSourceLayer;
   }
 
   /**
-   * @param layer these renderitems originate from
+   * @param layer The layer these RenderItems originate from
    */
   void SetSourceLayer( Layer* layer )
   {