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

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

Issue 3461019: FBTF: Move virtual methods to implementation files. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Win+chromeos+mac fixes Created 10 years, 2 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/x11_video_renderer.h" 5 #include "media/tools/player_x11/x11_video_renderer.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <X11/Xutil.h> 8 #include <X11/Xutil.h>
9 #include <X11/extensions/Xrender.h> 9 #include <X11/extensions/Xrender.h>
10 #include <X11/extensions/Xcomposite.h> 10 #include <X11/extensions/Xcomposite.h>
11 11
12 #include "base/message_loop.h"
12 #include "media/base/video_frame.h" 13 #include "media/base/video_frame.h"
13 #include "media/base/yuv_convert.h" 14 #include "media/base/yuv_convert.h"
14 15
15 X11VideoRenderer* X11VideoRenderer::instance_ = NULL; 16 X11VideoRenderer* X11VideoRenderer::instance_ = NULL;
16 17
17 // Returns the picture format for ARGB. 18 // Returns the picture format for ARGB.
18 // This method is originally from chrome/common/x11_util.cc. 19 // This method is originally from chrome/common/x11_util.cc.
19 static XRenderPictFormat* GetRenderARGB32Format(Display* dpy) { 20 static XRenderPictFormat* GetRenderARGB32Format(Display* dpy) {
20 static XRenderPictFormat* pictformat = NULL; 21 static XRenderPictFormat* pictformat = NULL;
21 if (pictformat) 22 if (pictformat)
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // If XRender is not used, simply put the image to the server. 220 // If XRender is not used, simply put the image to the server.
220 // This will have a tearing effect but this is OK. 221 // This will have a tearing effect but this is OK.
221 // TODO(hclam): Upload the image to a pixmap and do XCopyArea() 222 // TODO(hclam): Upload the image to a pixmap and do XCopyArea()
222 // to the window. 223 // to the window.
223 GC gc = XCreateGC(display_, window_, 0, NULL); 224 GC gc = XCreateGC(display_, window_, 0, NULL);
224 XPutImage(display_, window_, gc, image_, 225 XPutImage(display_, window_, gc, image_,
225 0, 0, 0, 0, width(), height()); 226 0, 0, 0, 0, width(), height());
226 XFlush(display_); 227 XFlush(display_);
227 XFreeGC(display_, gc); 228 XFreeGC(display_, gc);
228 } 229 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698