From 64437e622c11f77938e41b473bd77421ec2482e1 Mon Sep 17 00:00:00 2001 From: "yoz@chromium.org" Date: Thu, 30 Jan 2014 02:06:08 +0000 Subject: Revert 247793 "Ensure GL initialization only happens once, and p..." due to new static initializers in gl_bindings_autogen_gl.cc > Ensure GL initialization only happens once, and provide common init path > > Currently tests initialize GL by calling into methods that should be > internal to the gl bindings code. Instead, everyone should go through > GLSurface::InitializeOneOff. > > Also GLSurface::InitializeOneOff early outs if it was already called, > leading to a pattern of initializing GL all over the place just in case > and not having a clear idea of where it should be set up. Instead, DCHECK > that it is not called more than once, and move calls to this method to > be during process startup for unit test suites instead of mid-test. > > This adds two test variants of InitializeOneOff for tests to call, that > set up OSMesa or Mock GL bindings, via GLSurface::InitializeOneOff. > > R=piman, sievers > BUG=270918 > > Review URL: https://codereview.chromium.org/135213003 TBR=danakj@chromium.org Review URL: https://codereview.chromium.org/149953003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247811 0039d316-1c4b-4281-b951-d872f2087c98 --- media/tools/player_x11/gl_video_renderer.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'media/tools') diff --git a/media/tools/player_x11/gl_video_renderer.cc b/media/tools/player_x11/gl_video_renderer.cc index e32a63c..58d122a 100644 --- a/media/tools/player_x11/gl_video_renderer.cc +++ b/media/tools/player_x11/gl_video_renderer.cc @@ -11,7 +11,7 @@ #include "media/base/buffers.h" #include "media/base/video_frame.h" #include "media/base/yuv_convert.h" -#include "ui/gl/gl_surface.h" +#include "ui/gl/gl_implementation.h" enum { kNumYUVPlanes = 3 }; @@ -20,8 +20,8 @@ static GLXContext InitGLContext(Display* display, Window window) { // dlopen/dlsym, and so linking it into chrome breaks it. So we dynamically // load it, and use glew to dynamically resolve symbols. // See http://code.google.com/p/chromium/issues/detail?id=16800 - if (!gfx::GLSurface::InitializeOneOff()) { - LOG(ERROR) << "GLSurface::InitializeOneOff failed"; + if (!InitializeStaticGLBindings(gfx::kGLImplementationDesktopGL)) { + LOG(ERROR) << "InitializeStaticGLBindings failed"; return NULL; } -- cgit v1.1