Switching vsync to custom thread.

This commit is contained in:
Ben Vanik
2015-05-25 21:12:27 -07:00
parent e3ddcd44e7
commit 41cee3d337
9 changed files with 57 additions and 41 deletions

View File

@@ -164,7 +164,7 @@ void CommandProcessor::EndTracing() {
void CommandProcessor::CallInThread(std::function<void()> fn) {
if (pending_fns_.empty() &&
worker_thread_.get() == kernel::XThread::GetCurrentThread()) {
kernel::XThread::IsInThread(worker_thread_.get())) {
fn();
} else {
pending_fns_.push(std::move(fn));