From 46e30824394b82a38a1902bcc990c2777dbe1f00 Mon Sep 17 00:00:00 2001 From: "apatrick@chromium.org" Date: Thu, 15 Jul 2010 21:12:35 +0000 Subject: AcceleratedSurface performs one off GL initialization before attempting to create its offscreen GL context. TEST=try, verify that youtube now works, verify that WebGL still works BUG=49158 Review URL: http://codereview.chromium.org/3019003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52532 0039d316-1c4b-4281-b951-d872f2087c98 --- app/surface/accelerated_surface_mac.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/surface') diff --git a/app/surface/accelerated_surface_mac.cc b/app/surface/accelerated_surface_mac.cc index b139cb8..ef24407 100644 --- a/app/surface/accelerated_surface_mac.cc +++ b/app/surface/accelerated_surface_mac.cc @@ -21,6 +21,10 @@ bool AcceleratedSurface::Initialize(gfx::GLContext* share_context, bool allocate_fbo) { allocate_fbo_ = allocate_fbo; + // Ensure GL is initialized before trying to create an offscreen GL context. + if (!gfx::GLContext::InitializeOneOff()) + return false; + gl_context_.reset(gfx::GLContext::CreateOffscreenGLContext(share_context)); if (!gl_context_.get()) return false; -- cgit v1.1