if (IsCurrent(surface))
return true;
+ ScopedReleaseCurrent release_current;
TRACE_EVENT2("gpu", "GLContextEGL::MakeCurrent",
"context", context_,
"surface", surface);
SetCurrent(surface);
if (!InitializeDynamicBindings()) {
- ReleaseCurrent(surface);
return false;
}
return false;
}
+ release_current.Cancel();
return true;
}