[Tizen] Implement partial update
[platform/core/uifw/dali-core.git] / dali / internal / update / nodes / node-declarations.h
old mode 100644 (file)
new mode 100755 (executable)
index 131ba19..a0a382f
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_SCENE_GRAPH_NODE_DECLARATIONS_H__
-#define __DALI_INTERNAL_SCENE_GRAPH_NODE_DECLARATIONS_H__
+#ifndef DALI_INTERNAL_SCENE_GRAPH_NODE_DECLARATIONS_H
+#define DALI_INTERNAL_SCENE_GRAPH_NODE_DECLARATIONS_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -20,6 +20,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-vector.h>
+#include <dali/devel-api/common/bitwise-enum.h>
 #include <dali/devel-api/common/owner-container.h>
 #include <dali/internal/common/owner-pointer.h>
 
@@ -38,10 +39,27 @@ typedef Dali::Vector< Node* > NodeContainer;
 typedef NodeContainer::Iterator NodeIter;
 typedef NodeContainer::ConstIterator NodeConstIter;
 
+/**
+ * Flag whether property has changed, during the Update phase.
+ */
+enum class NodePropertyFlags : uint8_t
+// 8 bits is enough for 4 flags (compiler will check it)
+{
+  NOTHING          = 0x000,
+  TRANSFORM        = 0x001,
+  VISIBLE          = 0x002,
+  COLOR            = 0x004,
+  CHILD_DELETED    = 0x008,
+  ALL = ( CHILD_DELETED << 1 ) - 1 // all the flags
+};
+
 } // namespace SceneGraph
 
 } // namespace Internal
 
+// specialization has to be done in the same namespace
+template<> struct EnableBitMaskOperators< Internal::SceneGraph::NodePropertyFlags > { static const bool ENABLE = true; };
+
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_SCENE_GRAPH_NODE_DECLARATIONS_H__
+#endif // DALI_INTERNAL_SCENE_GRAPH_NODE_DECLARATIONS_H