[Bf-blender-cvs] [769d189ff1] blender2.8: Depsgraph: Remove legacy code from new depsgraph

Sergey Sharybin noreply at git.blender.org
Tue Jan 24 14:11:12 CET 2017


Commit: 769d189ff16b216c6198603fb68ec041d4b7e7da
Author: Sergey Sharybin
Date:   Tue Jan 24 12:55:08 2017 +0100
Branches: blender2.8
https://developer.blender.org/rB769d189ff16b216c6198603fb68ec041d4b7e7da

Depsgraph: Remove legacy code from new depsgraph

Now we have no remaining WITH_LEGACY_DEPSGRAPH in the code.

===================================================================

M	source/blender/depsgraph/CMakeLists.txt
M	source/blender/depsgraph/intern/depsgraph_eval.cc
M	source/blender/depsgraph/util/deg_util_foreach.h
M	source/blender/depsgraph/util/deg_util_function.h

===================================================================

diff --git a/source/blender/depsgraph/CMakeLists.txt b/source/blender/depsgraph/CMakeLists.txt
index e635256cda..2d32e85bf6 100644
--- a/source/blender/depsgraph/CMakeLists.txt
+++ b/source/blender/depsgraph/CMakeLists.txt
@@ -113,10 +113,6 @@ else()
 	endif()
 endif()
 
-if(WITH_LEGACY_DEPSGRAPH)
-	add_definitions(-DWITH_LEGACY_DEPSGRAPH)
-endif()
-
 if(WITH_BOOST)
 	list(APPEND INC_SYS
 		${BOOST_INCLUDE_DIR}
diff --git a/source/blender/depsgraph/intern/depsgraph_eval.cc b/source/blender/depsgraph/intern/depsgraph_eval.cc
index c41f28b07e..ebaf008983 100644
--- a/source/blender/depsgraph/intern/depsgraph_eval.cc
+++ b/source/blender/depsgraph/intern/depsgraph_eval.cc
@@ -52,43 +52,9 @@ extern "C" {
 
 #include "intern/depsgraph.h"
 
-#ifdef WITH_LEGACY_DEPSGRAPH
-static bool use_legacy_depsgraph = true;
-#endif
-
 /* Unfinished and unused, and takes quite some pre-processing time. */
 #undef USE_EVAL_PRIORITY
 
-bool DEG_depsgraph_use_legacy(void)
-{
-#ifdef DISABLE_NEW_DEPSGRAPH
-	return true;
-#elif defined(WITH_LEGACY_DEPSGRAPH)
-	return use_legacy_depsgraph;
-#else
-	BLI_assert(!"Should not be used with new depsgraph");
-	return false;
-#endif
-}
-
-void DEG_depsgraph_switch_to_legacy(void)
-{
-#ifdef WITH_LEGACY_DEPSGRAPH
-	use_legacy_depsgraph = true;
-#else
-	BLI_assert(!"Should not be used with new depsgraph");
-#endif
-}
-
-void DEG_depsgraph_switch_to_new(void)
-{
-#ifdef WITH_LEGACY_DEPSGRAPH
-	use_legacy_depsgraph = false;
-#else
-	BLI_assert(!"Should not be used with new depsgraph");
-#endif
-}
-
 /* ****************** */
 /* Evaluation Context */
 
diff --git a/source/blender/depsgraph/util/deg_util_foreach.h b/source/blender/depsgraph/util/deg_util_foreach.h
index 87d37168d5..531e67968c 100644
--- a/source/blender/depsgraph/util/deg_util_foreach.h
+++ b/source/blender/depsgraph/util/deg_util_foreach.h
@@ -38,9 +38,7 @@
 #else
 #pragma message("No available foreach() implementation. Using stub instead, disabling new depsgraph")
 
-#ifndef WITH_LEGACY_DEPSGRAPH
-#  error "Unable to build new depsgraph and legacy one is disabled."
-#endif
+#error "Unable to build new depsgraph and legacy one is disabled."
 
 #define DISABLE_NEW_DEPSGRAPH
 
diff --git a/source/blender/depsgraph/util/deg_util_function.h b/source/blender/depsgraph/util/deg_util_function.h
index 1e34ae04d9..13c714bd63 100644
--- a/source/blender/depsgraph/util/deg_util_function.h
+++ b/source/blender/depsgraph/util/deg_util_function.h
@@ -50,9 +50,7 @@ using boost::function;
 
 #pragma message("No available function binding implementation. Using stub instead, disabling new depsgraph")
 
-#ifndef WITH_LEGACY_DEPSGRAPH
-#  error "Unable to build new depsgraph and legacy one is disabled."
-#endif
+#error "Unable to build new depsgraph and legacy one is disabled."
 
 #define DISABLE_NEW_DEPSGRAPH




More information about the Bf-blender-cvs mailing list