[3.0] Clipping API feature in Actor
[platform/core/uifw/dali-core.git] / dali / internal / update / nodes / scene-graph-layer.cpp
index 08da342..573ccee 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
@@ -39,9 +39,10 @@ SceneGraph::Layer* Layer::New()
 Layer::Layer()
 : mSortFunction( Internal::Layer::ZValue ),
   mClippingBox( 0,0,0,0 ),
-  mLastCamera(0),
+  mLastCamera( NULL ),
+  mBehavior( Dali::Layer::LAYER_2D ),
   mIsClipping( false ),
-  mDepthTestDisabled( false ),
+  mDepthTestDisabled( true ),
   mIsDefaultSortFunction( true )
 {
   // layer starts off dirty
@@ -84,6 +85,11 @@ void Layer::SetClippingBox(const Dali::ClippingBox& box)
   mClippingBox.Set(box.x, box.y, box.width, box.height);
 }
 
+void Layer::SetBehavior( Dali::Layer::Behavior behavior )
+{
+  mBehavior = behavior;
+}
+
 void Layer::SetDepthTestDisabled( bool disable )
 {
   mDepthTestDisabled = disable;
@@ -94,6 +100,12 @@ bool Layer::IsDepthTestDisabled() const
   return mDepthTestDisabled;
 }
 
+void Layer::ClearRenderables()
+{
+  colorRenderables.Clear();
+  overlayRenderables.Clear();
+}
+
 } // namespace SceneGraph
 
 } // namespace Internal