if (IsCurrent(surface))
return true;
+ ScopedReleaseCurrent release_current;
TRACE_EVENT0("gpu", "GLContextGLX::MakeCurrent");
if (!glXMakeContextCurrent(
display_,
SetCurrent(surface);
if (!InitializeDynamicBindings()) {
- ReleaseCurrent(surface);
Destroy();
return false;
}
if (!surface->OnMakeCurrent(this)) {
LOG(ERROR) << "Could not make current.";
- ReleaseCurrent(surface);
Destroy();
return false;
}
+ release_current.Cancel();
return true;
}