projects
/
platform
/
core
/
uifw
/
dali-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[Tizen] Add codes for Dali Windows Backend
[platform/core/uifw/dali-core.git]
/
dali
/
internal
/
update
/
nodes
/
scene-graph-layer.cpp
diff --git
a/dali/internal/update/nodes/scene-graph-layer.cpp
b/dali/internal/update/nodes/scene-graph-layer.cpp
old mode 100644
(file)
new mode 100755
(executable)
index
08da342
..
db6e6f0
--- a/
dali/internal/update/nodes/scene-graph-layer.cpp
+++ b/
dali/internal/update/nodes/scene-graph-layer.cpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 201
4
Samsung Electronics Co., Ltd.
+ * Copyright (c) 201
8
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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-31,19
+31,26
@@
namespace Internal
namespace SceneGraph
{
namespace SceneGraph
{
-SceneGraph::Layer* Layer::New()
+SceneGraph::Layer* Layer::New(
unsigned int id
)
{
{
- return new Layer();
+ // Layers are currently heap allocated, unlike Nodes which are in a memory pool
+ // However Node::Delete( layer ) will correctly delete a layer / node depending on type
+ return new Layer( id );
}
}
-Layer::Layer()
-: mSortFunction( Internal::Layer::ZValue ),
+Layer::Layer( unsigned int id )
+: Node( id ),
+ mSortFunction( Internal::Layer::ZValue ),
mClippingBox( 0,0,0,0 ),
mClippingBox( 0,0,0,0 ),
- mLastCamera(0),
+ mLastCamera( NULL ),
+ mBehavior( Dali::Layer::LAYER_2D ),
mIsClipping( false ),
mIsClipping( false ),
- mDepthTestDisabled(
fals
e ),
+ mDepthTestDisabled(
tru
e ),
mIsDefaultSortFunction( true )
{
mIsDefaultSortFunction( true )
{
+ // set a flag the node to say this is a layer
+ mIsLayer = true;
+
// layer starts off dirty
mAllChildTransformsClean[ 0 ] = false;
mAllChildTransformsClean[ 1 ] = false;
// layer starts off dirty
mAllChildTransformsClean[ 0 ] = false;
mAllChildTransformsClean[ 1 ] = false;
@@
-84,6
+91,11
@@
void Layer::SetClippingBox(const Dali::ClippingBox& box)
mClippingBox.Set(box.x, box.y, box.width, box.height);
}
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;
void Layer::SetDepthTestDisabled( bool disable )
{
mDepthTestDisabled = disable;
@@
-94,6
+106,12
@@
bool Layer::IsDepthTestDisabled() const
return mDepthTestDisabled;
}
return mDepthTestDisabled;
}
+void Layer::ClearRenderables()
+{
+ colorRenderables.Clear();
+ overlayRenderables.Clear();
+}
+
} // namespace SceneGraph
} // namespace Internal
} // namespace SceneGraph
} // namespace Internal