mess.sync.Reset();
{
CSingleLock lock(m_texqueue_lock);
- CLog::Log(LOGDEBUG, "%s: texture job: %p:%p", __func__, &mess, mess.callback);
m_texqueue.push(&mess);
m_texqueue_cond.notifyAll();
}
// wait for function to have finished (in texture thread)
mess.sync.Wait();
- CLog::Log(LOGDEBUG, "%s: texture job done: %p:%p = %d", __func__, &mess, mess.callback, mess.result);
// need to ensure texture thread has returned from mess.sync.Set() before we exit and free tex
CSingleLock lock(m_texqueue_lock);
return mess.result;
struct callbackinfo *mess = m_texqueue.front();
m_texqueue.pop();
lock.Leave();
- CLog::Log(LOGDEBUG, "%s: texture job: %p:%p:%p", __func__, mess, mess->callback, mess->cookie);
mess->result = mess->callback(g_Windowing.GetEGLDisplay(), GetEGLContext(), mess->cookie);
- CLog::Log(LOGDEBUG, "%s: texture job about to Set: %p:%p:%p", __func__, mess, mess->callback, mess->cookie);
{
CSingleLock lock(m_texqueue_lock);
mess->sync.Set();
}
- CLog::Log(LOGDEBUG, "%s: texture job: %p done", __func__, mess);
}
}
}