[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57936] branches/soc-2013-depsgraph_mt/ source/blender/blenkernel/intern/scene.c: Put debug prints in threaded debug into G.debug & G_DEBUG check.
Sergey Sharybin
sergey.vfx at gmail.com
Tue Jul 2 21:22:46 CEST 2013
Revision: 57936
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57936
Author: nazgul
Date: 2013-07-02 19:22:46 +0000 (Tue, 02 Jul 2013)
Log Message:
-----------
Put debug prints in threaded debug into G.debug & G_DEBUG check.
Modified Paths:
--------------
branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/scene.c
Modified: branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/scene.c
===================================================================
--- branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/scene.c 2013-07-02 19:18:10 UTC (rev 57935)
+++ branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/scene.c 2013-07-02 19:22:46 UTC (rev 57936)
@@ -1204,27 +1204,29 @@
static void scene_update_object_func(TaskPool *pool, void *taskdata, int threadid)
{
+#define PRINT if (G.debug & G_DEBUG) printf
+
ThreadedObjectUpdateState *state = (ThreadedObjectUpdateState *) BLI_task_pool_userdata(pool);
void *node = taskdata;
Object *object;
- (void) threadid; /* Ignored when logging is disabled. */
-
object = DAG_threaded_update_get_node_object(node);
if (object) {
- // printf("Thread %d: update object %s\n", threadid, object->id.name);
+ PRINT("Thread %d: update object %s\n", threadid, object->id.name);
scene_update_single_object(state->scene, state->scene_parent, object);
}
else {
- // printf("Threda %d: update node %s\n", threadid,
- // DAG_threaded_update_get_node_name(node));
+ PRINT("Threda %d: update node %s\n", threadid,
+ DAG_threaded_update_get_node_name(node));
}
BLI_lock_thread(LOCK_CUSTOM1);
/* Update will decrease child's valency and schedule child with zero valency. */
DAG_threaded_update_handle_node_updated(node,scene_update_object_add_task, pool);
BLI_unlock_thread(LOCK_CUSTOM1);
+
+#undef PRINT
}
static void scene_update_object_add_task(void *node, void *user_data)
More information about the Bf-blender-cvs
mailing list