summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorbacker@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-01 15:21:51 +0000
committerbacker@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-01 15:21:51 +0000
commit119c4902142baaaf19829b0b2fee216aa9fd6bc7 (patch)
treee8382fa312c1b4ecf42d8686e2aaaf0465dc7d24 /ui
parent1d6d671ae376d7d824eeaf90ddf4eb63eb219d46 (diff)
downloadchromium_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
Diffstat (limited to 'ui')
-rw-r--r--ui/gfx/compositor/compositor_cc.cc4
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;