Commit 119c4902 authored by backer@chromium.org's avatar backer@chromium.org

Need to release the GL context.

When the threaded compositor is enabled (via CompositorCC::Initialize(true) in desktop.cc), the GL context is created on one thread and ownership transferred to another. It's important to release the context before the transfer of ownership occurs, so that the context is not current on multiple threads.

BUG=none
TEST=build GYP_DEFINES="use_aura=1 use_webkit_compositor=1" with the change described above

Review URL: http://codereview.chromium.org/8725041

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112467 0039d316-1c4b-4281-b951-d872f2087c98
parent 1d6d671a
......@@ -254,7 +254,9 @@ WebKit::WebGraphicsContext3D* CompositorCC::createContext3D() {
CommandLine* command_line = CommandLine::ForCurrentProcess();
if (!command_line->HasSwitch(switches::kDisableUIVsync)) {
context->makeContextCurrent();
gfx::GLContext::GetCurrent()->SetSwapInterval(1);
gfx::GLContext* gl_context = gfx::GLContext::GetCurrent();
gl_context->SetSwapInterval(1);
gl_context->ReleaseCurrent(NULL);
}
return context;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment