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.h
diff --git
a/dali/internal/update/nodes/scene-graph-layer.h
b/dali/internal/update/nodes/scene-graph-layer.h
old mode 100644
(file)
new mode 100755
(executable)
index
e414cc3
..
26b217e
--- a/
dali/internal/update/nodes/scene-graph-layer.h
+++ b/
dali/internal/update/nodes/scene-graph-layer.h
@@
-1,8
+1,8
@@
-#ifndef
__DALI_INTERNAL_SCENE_GRAPH_LAYER_H__
-#define
__DALI_INTERNAL_SCENE_GRAPH_LAYER_H__
+#ifndef
DALI_INTERNAL_SCENE_GRAPH_LAYER_H
+#define
DALI_INTERNAL_SCENE_GRAPH_LAYER_H
/*
/*
- * 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.
@@
-22,7
+22,6
@@
#include <dali/public-api/actors/layer.h>
#include <dali/internal/event/common/event-thread-services.h>
#include <dali/internal/update/nodes/node.h>
#include <dali/public-api/actors/layer.h>
#include <dali/internal/event/common/event-thread-services.h>
#include <dali/internal/update/nodes/node.h>
-#include <dali/internal/update/node-attachments/scene-graph-renderable-attachment-declarations.h>
namespace Dali
{
namespace Dali
{
@@
-30,8
+29,6
@@
namespace Dali
namespace Internal
{
namespace Internal
{
-class RenderableAttachment;
-
// value types used by messages
template <> struct ParameterType< Dali::Layer::SortFunctionType >
: public BasicType< Dali::Layer::SortFunctionType > {};
// value types used by messages
template <> struct ParameterType< Dali::Layer::SortFunctionType >
: public BasicType< Dali::Layer::SortFunctionType > {};
@@
-40,12
+37,34
@@
template <> struct ParameterType< Dali::Layer::Behavior >
namespace SceneGraph
{
namespace SceneGraph
{
+class Camera;
+
+/**
+ * Pair of node-renderer
+ */
+struct Renderable
+{
+ Renderable()
+ : mNode( 0 ),
+ mRenderer( 0 )
+ {}
+
+ Renderable( Node* node, Renderer* renderer )
+ : mNode( node ),
+ mRenderer( renderer )
+ {}
+
+ Node* mNode;
+ Renderer* mRenderer;
+};
+
+typedef Dali::Vector< Renderable > RenderableContainer;
/**
* Layers have a "depth" relative to all other layers in the scene-graph.
/**
* Layers have a "depth" relative to all other layers in the scene-graph.
- * Non-layer child nodes
(and their attachments)
are considered part of the layer.
+ * Non-layer child nodes are considered part of the layer.
*
*
- * Layers are rendered separately, and the depth buffer is cleared before each layer is rendered.
+ * Layers are rendered separately, and
by default
the depth buffer is cleared before each layer is rendered.
* Objects in higher layers, are rendered after (in front of) objects in lower layers.
*/
class Layer : public Node
* Objects in higher layers, are rendered after (in front of) objects in lower layers.
*/
class Layer : public Node
@@
-63,11
+82,6
@@
public:
static SceneGraph::Layer* New();
/**
static SceneGraph::Layer* New();
/**
- * Virtual destructor
- */
- virtual ~Layer();
-
- /**
* From Node, to convert a node to a layer.
* @return The layer.
*/
* From Node, to convert a node to a layer.
* @return The layer.
*/
@@
-166,7
+180,7
@@
public:
* to use is the same than the one used before ( Otherwise View transform will be different )
*
*/
* to use is the same than the one used before ( Otherwise View transform will be different )
*
*/
- bool CanReuseRenderers(
Node* camera
)
+ bool CanReuseRenderers(
Camera* camera
)
{
bool bReturn( mAllChildTransformsClean[ 0 ] && mAllChildTransformsClean[ 1 ] && camera == mLastCamera );
mLastCamera = camera;
{
bool bReturn( mAllChildTransformsClean[ 0 ] && mAllChildTransformsClean[ 1 ] && camera == mLastCamera );
mLastCamera = camera;
@@
-182,6
+196,11
@@
public:
return mIsDefaultSortFunction;
}
return mIsDefaultSortFunction;
}
+ /**
+ * Clears all the renderable lists
+ */
+ void ClearRenderables();
+
private:
/**
private:
/**
@@
-193,28
+212,31
@@
private:
// Undefined
Layer(const Layer&);
// Undefined
Layer(const Layer&);
+ /**
+ * Virtual destructor
+ */
+ virtual ~Layer();
+
// Undefined
Layer& operator=(const Layer& rhs);
public: // For update-algorithms
// Undefined
Layer& operator=(const Layer& rhs);
public: // For update-algorithms
- RenderableAttachmentContainer stencilRenderables;
- RenderableAttachmentContainer transparentRenderables;
- RenderableAttachmentContainer opaqueRenderables;
- RenderableAttachmentContainer overlayRenderables;
+ RenderableContainer colorRenderables;
+ RenderableContainer overlayRenderables;
private:
private:
- SortFunctionType mSortFunction; ///< Used to sort semi-transparent geometry
+ SortFunctionType mSortFunction;
///< Used to sort semi-transparent geometry
ClippingBox mClippingBox; ///< The clipping box, in window coordinates
ClippingBox mClippingBox; ///< The clipping box, in window coordinates
-
Node* mLastCamera;
///< Pointer to the last camera that has rendered the layer
+
Camera* mLastCamera;
///< Pointer to the last camera that has rendered the layer
Dali::Layer::Behavior mBehavior; ///< The behavior of the layer
bool mAllChildTransformsClean[ 2 ]; ///< True if all child nodes transforms are clean,
Dali::Layer::Behavior mBehavior; ///< The behavior of the layer
bool mAllChildTransformsClean[ 2 ]; ///< True if all child nodes transforms are clean,
- /// double buffered as we need two clean frames before we can reuse N-1 for N+1
- /// this allows us to cache render items when layer is "static"
+ ///
double buffered as we need two clean frames before we can reuse N-1 for N+1
+ ///
this allows us to cache render items when layer is "static"
bool mIsClipping:1; ///< True when clipping is enabled
bool mDepthTestDisabled:1; ///< Whether depth test is disabled.
bool mIsDefaultSortFunction:1; ///< whether the default depth sort function is used
bool mIsClipping:1; ///< True when clipping is enabled
bool mDepthTestDisabled:1; ///< Whether depth test is disabled.
bool mIsDefaultSortFunction:1; ///< whether the default depth sort function is used
@@
-310,8
+332,18
@@
inline void SetDepthTestDisabledMessage( EventThreadServices& eventThreadService
} // namespace SceneGraph
} // namespace SceneGraph
+// Template specialisation for OwnerPointer<Layer>, because delete is protected
+template <>
+inline 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
-#endif //
__DALI_INTERNAL_SCENE_GRAPH_LAYER_H__
+#endif //
DALI_INTERNAL_SCENE_GRAPH_LAYER_H