Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: media/tools/player_x11/gl_video_renderer.cc

Issue 10392068: ui: Move gl/ directory out of gfx/, up to ui/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac_rel Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/tools/player_x11/gl_video_renderer.h" 5 #include "media/tools/player_x11/gl_video_renderer.h"
6 6
7 #include <X11/Xutil.h> 7 #include <X11/Xutil.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "media/base/buffers.h" 11 #include "media/base/buffers.h"
12 #include "media/base/video_frame.h" 12 #include "media/base/video_frame.h"
13 #include "media/base/yuv_convert.h" 13 #include "media/base/yuv_convert.h"
14 #include "ui/gfx/gl/gl_implementation.h" 14 #include "ui/gl/gl_implementation.h"
15 15
16 enum { kNumYUVPlanes = 3 }; 16 enum { kNumYUVPlanes = 3 };
17 17
18 static GLXContext InitGLContext(Display* display, Window window) { 18 static GLXContext InitGLContext(Display* display, Window window) {
19 // Some versions of NVIDIA's GL libGL.so include a broken version of 19 // Some versions of NVIDIA's GL libGL.so include a broken version of
20 // dlopen/dlsym, and so linking it into chrome breaks it. So we dynamically 20 // dlopen/dlsym, and so linking it into chrome breaks it. So we dynamically
21 // load it, and use glew to dynamically resolve symbols. 21 // load it, and use glew to dynamically resolve symbols.
22 // See http://code.google.com/p/chromium/issues/detail?id=16800 22 // See http://code.google.com/p/chromium/issues/detail?id=16800
23 if (!InitializeGLBindings(gfx::kGLImplementationDesktopGL)) { 23 if (!InitializeGLBindings(gfx::kGLImplementationDesktopGL)) {
24 LOG(ERROR) << "InitializeGLBindings failed"; 24 LOG(ERROR) << "InitializeGLBindings failed";
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 240
241 int tc_location = glGetAttribLocation(program, "in_tc"); 241 int tc_location = glGetAttribLocation(program, "in_tc");
242 glEnableVertexAttribArray(tc_location); 242 glEnableVertexAttribArray(tc_location);
243 glVertexAttribPointer(tc_location, 2, GL_FLOAT, GL_FALSE, 0, 243 glVertexAttribPointer(tc_location, 2, GL_FLOAT, GL_FALSE, 0,
244 kTextureCoords); 244 kTextureCoords);
245 245
246 // We are getting called on a thread. Release the context so that it can be 246 // We are getting called on a thread. Release the context so that it can be
247 // made current on the main thread. 247 // made current on the main thread.
248 glXMakeCurrent(display_, 0, NULL); 248 glXMakeCurrent(display_, 0, NULL);
249 } 249 }
OLDNEW
« no previous file with comments | « media/tools/player_x11/gl_video_renderer.h ('k') | media/tools/shader_bench/gpu_color_painter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698