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
Revert "[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
index
3540e01
..
46bb14c
100644
(file)
--- 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
6
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.
@@
-33,6
+33,8
@@
namespace SceneGraph
SceneGraph::Layer* Layer::New()
{
SceneGraph::Layer* Layer::New()
{
+ // 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();
}
return new Layer();
}
@@
-42,9
+44,12
@@
Layer::Layer()
mLastCamera( NULL ),
mBehavior( Dali::Layer::LAYER_2D ),
mIsClipping( false ),
mLastCamera( NULL ),
mBehavior( Dali::Layer::LAYER_2D ),
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;
@@
-97,18
+102,26
@@
void Layer::SetDepthTestDisabled( bool disable )
bool Layer::IsDepthTestDisabled() const
{
bool Layer::IsDepthTestDisabled() const
{
- return
( mBehavior == Dali::Layer::LAYER_2D ) ||
mDepthTestDisabled;
+ return mDepthTestDisabled;
}
void Layer::ClearRenderables()
{
}
void Layer::ClearRenderables()
{
- stencilRenderables.Clear();
colorRenderables.Clear();
overlayRenderables.Clear();
}
} // namespace SceneGraph
colorRenderables.Clear();
overlayRenderables.Clear();
}
} // namespace SceneGraph
+template <>
+void OwnerPointer<Dali::Internal::SceneGraph::Layer>::Reset()
+{
+ if( mObject != NULL )
+ {
+ Dali::Internal::SceneGraph::Node::Delete( mObject );
+ mObject = NULL;
+ }
+}
} // namespace Internal
} // namespace Dali
} // namespace Internal
} // namespace Dali