1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

-fixed many memory initialization issues

-fixed deadlock on previews thread
-fixed compilation errors on unix
This commit is contained in:
Juan Linietsky
2015-06-06 22:06:58 -03:00
parent 14c4c1b568
commit b524b40fdc
23 changed files with 80 additions and 41 deletions

View File

@@ -96,16 +96,19 @@ void VisualServerWrapMT::thread_loop() {
/* EVENT QUEUING */
void VisualServerWrapMT::flush() {
void VisualServerWrapMT::sync() {
if (create_thread) {
/* TODO: sync with the thread */
/*
ERR_FAIL_COND(!draw_mutex);
draw_mutex->lock();
draw_pending++; //cambiar por un saferefcount
draw_mutex->unlock();
command_queue.push( this, &VisualServerWrapMT::thread_flush);
*/
//command_queue.push( this, &VisualServerWrapMT::thread_flush);
} else {
command_queue.flush_all(); //flush all pending from other threads
@@ -118,15 +121,16 @@ void VisualServerWrapMT::draw() {
if (create_thread) {
/* TODO: Make it draw
ERR_FAIL_COND(!draw_mutex);
draw_mutex->lock();
draw_pending++; //cambiar por un saferefcount
draw_mutex->unlock();
command_queue.push( this, &VisualServerWrapMT::thread_draw);
*/
} else {
command_queue.flush_all(); //flush all pending from other threads
visual_server->draw();
}
}