summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-15 21:12:35 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-15 21:12:35 +0000
commit46e30824394b82a38a1902bcc990c2777dbe1f00 (patch)
tree94eedd7cd409b97bfd76449432c54154a597e3b4
parent274aa588b02f2d2f01c6875ed7b67918391c15e8 (diff)
downloadchromium_src-46e30824394b82a38a1902bcc990c2777dbe1f00.zip
chromium_src-46e30824394b82a38a1902bcc990c2777dbe1f00.tar.gz
chromium_src-46e30824394b82a38a1902bcc990c2777dbe1f00.tar.bz2
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
-rw-r--r--app/surface/accelerated_surface_mac.cc4
1 files changed, 4 insertions, 0 deletions
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;