diff options
author | wjia@google.com <wjia@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-23 00:37:13 +0000 |
---|---|---|
committer | wjia@google.com <wjia@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-23 00:37:13 +0000 |
commit | 44a34186a63080c37c70bddc0ecd2c5efc9d7fab (patch) | |
tree | a08036a97313f6ba17822eb122dc87c055adc87d /media | |
parent | 60824baf21016942c959f02f56dd6a0a01d919c5 (diff) | |
download | chromium_src-44a34186a63080c37c70bddc0ecd2c5efc9d7fab.zip chromium_src-44a34186a63080c37c70bddc0ecd2c5efc9d7fab.tar.gz chromium_src-44a34186a63080c37c70bddc0ecd2c5efc9d7fab.tar.bz2 |
fix broken gl renderer
BUG=none
TEST=player_x11
Review URL: http://codereview.chromium.org/2803019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50555 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/tools/player_x11/gl_video_renderer.cc | 27 | ||||
-rw-r--r-- | media/tools/player_x11/gl_video_renderer.h | 4 |
2 files changed, 4 insertions, 27 deletions
diff --git a/media/tools/player_x11/gl_video_renderer.cc b/media/tools/player_x11/gl_video_renderer.cc index 630fe9e..10d28d1 100644 --- a/media/tools/player_x11/gl_video_renderer.cc +++ b/media/tools/player_x11/gl_video_renderer.cc @@ -4,11 +4,9 @@ #include "media/tools/player_x11/gl_video_renderer.h" -#include <dlfcn.h> #include <X11/Xutil.h> -#include <X11/extensions/Xrender.h> -#include <X11/extensions/Xcomposite.h> +#include "app/gfx/gl/gl_implementation.h" #include "media/base/buffers.h" #include "media/base/video_frame.h" #include "media/base/yuv_convert.h" @@ -44,13 +42,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 - void* handle = dlopen("libGL.so.1", RTLD_LAZY | RTLD_GLOBAL); - if (!handle) { - LOG(ERROR) << "Could not find libGL.so.1"; - return NULL; - } - if (glxewInit() != GLEW_OK) { - LOG(ERROR) << "GLXEW failed initialization"; + if (!InitializeGLBindings(gfx::kGLImplementationDesktopGL)) { + LOG(ERROR) << "InitializeGLBindings failed"; return NULL; } @@ -78,18 +71,6 @@ static GLXContext InitGLContext(Display* display, Window window) { return NULL; } - if (glewInit() != GLEW_OK) { - LOG(ERROR) << "GLEW failed initialization"; - glXDestroyContext(display, context); - return NULL; - } - - if (!glewIsSupported("GL_VERSION_2_0")) { - LOG(ERROR) << "GL implementation doesn't support GL version 2.0"; - glXDestroyContext(display, context); - return NULL; - } - return context; } @@ -163,8 +144,6 @@ bool GlVideoRenderer::OnInitialize(media::VideoDecoder* decoder) { if (!gl_context_) return false; - glMatrixMode(GL_MODELVIEW); - // Create 3 textures, one for each plane, and bind them to different // texture units. glGenTextures(media::VideoFrame::kNumYUVPlanes, textures_); diff --git a/media/tools/player_x11/gl_video_renderer.h b/media/tools/player_x11/gl_video_renderer.h index f88129b..e645950 100644 --- a/media/tools/player_x11/gl_video_renderer.h +++ b/media/tools/player_x11/gl_video_renderer.h @@ -5,9 +5,7 @@ #ifndef MEDIA_TOOLS_PLAYER_X11_GL_VIDEO_RENDERER_H_ #define MEDIA_TOOLS_PLAYER_X11_GL_VIDEO_RENDERER_H_ -#include <GL/glew.h> -#include <GL/glxew.h> - +#include "app/gfx/gl/gl_bindings.h" #include "base/lock.h" #include "base/scoped_ptr.h" #include "media/base/factory.h" |