diff options
author | backer@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-01 15:21:51 +0000 |
---|---|---|
committer | backer@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-01 15:21:51 +0000 |
commit | 119c4902142baaaf19829b0b2fee216aa9fd6bc7 (patch) | |
tree | e8382fa312c1b4ecf42d8686e2aaaf0465dc7d24 | |
parent | 1d6d671ae376d7d824eeaf90ddf4eb63eb219d46 (diff) | |
download | chromium_src-119c4902142baaaf19829b0b2fee216aa9fd6bc7.zip chromium_src-119c4902142baaaf19829b0b2fee216aa9fd6bc7.tar.gz chromium_src-119c4902142baaaf19829b0b2fee216aa9fd6bc7.tar.bz2 |
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
-rw-r--r-- | ui/gfx/compositor/compositor_cc.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/gfx/compositor/compositor_cc.cc b/ui/gfx/compositor/compositor_cc.cc index b72c588..ad2c750 100644 --- a/ui/gfx/compositor/compositor_cc.cc +++ b/ui/gfx/compositor/compositor_cc.cc @@ -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; |