}
void set_dead()
{
- Glib::Mutex::Lock lock(mutex, NotLock);
- if (!single_threaded()) lock.acquire();
+ Glib::Mutex::Lock lock(mutex);
alive_flag=false;
}
assert(surface);
if(!alive_flag)
return false;
- Glib::Mutex::Lock lock(mutex, NotLock);
- if (!single_threaded()) lock.acquire();
+ Glib::Mutex::Lock lock(mutex);
tile_queue.push_back(tile_t(surface,gx,gy));
if(tile_queue.size()==1)
{
void tile_ready()
{
- Glib::Mutex::Lock lock(mutex, NotLock);
- if (!single_threaded()) lock.acquire();
+ Glib::Mutex::Lock lock(mutex);
if(!alive_flag)
{
tile_queue.clear();
break;
}
}
- Glib::Mutex::Lock lock(mutex, NotLock);
- if (!single_threaded()) lock.acquire();
+ Glib::Mutex::Lock lock(mutex);
if(!alive_flag)
return;
return warm_target->end_frame();
void set_dead()
{
- Glib::Mutex::Lock lock(mutex, NotLock);
- if (!single_threaded()) lock.acquire();
+ Glib::Mutex::Lock lock(mutex);
alive_flag=false;
}
virtual void end_frame()
{
{
- Glib::Mutex::Lock lock(mutex, NotLock);
- if (!single_threaded()) lock.acquire();
+ Glib::Mutex::Lock lock(mutex);
if(!alive_flag)
return;
virtual Color * start_scanline(int scanline)
{
- Glib::Mutex::Lock lock(mutex, NotLock);
- if (!single_threaded()) lock.acquire();
+ Glib::Mutex::Lock lock(mutex);
return surface[scanline];
}
void frame_ready()
{
- Glib::Mutex::Lock lock(mutex, NotLock);
- if (!single_threaded()) lock.acquire();
+ Glib::Mutex::Lock lock(mutex);
if(alive_flag)
alive_flag=warm_target->add_frame(&surface);
if (!single_threaded()) cond_frame_queue_empty.signal();
{
if(target)
{
- Glib::Mutex::Lock lock(mutex, NotLock);
- if (!single_threaded()) lock.acquire();
+ Glib::Mutex::Lock lock(mutex);
done_connection.disconnect();
if(render_thread)
#endif
}
- if (single_threaded() || mutex.trylock())
+ if(mutex.trylock())
{
#ifdef GLIB_DISPATCHER_BROKEN
done_connection=Glib::signal_timeout().connect(
#else
signal_done_.emit();
#endif
- if (!single_threaded()) mutex.unlock();
+ mutex.unlock();
}
}