OLD | NEW |
1 // Copyright (c) 2012 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/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/bind.h" | 12 #include "base/bind.h" |
13 #include "base/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
14 #include "media/base/video_frame.h" | 14 #include "media/base/video_frame.h" |
15 #include "media/base/yuv_convert.h" | 15 #include "media/base/yuv_convert.h" |
16 | 16 |
17 // Creates a 32-bit XImage. | 17 // Creates a 32-bit XImage. |
18 static XImage* CreateImage(Display* display, int width, int height) { | 18 static XImage* CreateImage(Display* display, int width, int height) { |
19 LOG(INFO) << "Allocating XImage " << width << "x" << height; | 19 LOG(INFO) << "Allocating XImage " << width << "x" << height; |
20 return XCreateImage(display, | 20 return XCreateImage(display, |
21 DefaultVisual(display, DefaultScreen(display)), | 21 DefaultVisual(display, DefaultScreen(display)), |
22 DefaultDepth(display, DefaultScreen(display)), | 22 DefaultDepth(display, DefaultScreen(display)), |
23 ZPixmap, | 23 ZPixmap, |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 | 203 |
204 XRenderPictFormat* pictformat = XRenderFindVisualFormat( | 204 XRenderPictFormat* pictformat = XRenderFindVisualFormat( |
205 display_, | 205 display_, |
206 attr.visual); | 206 attr.visual); |
207 CHECK(pictformat) << "XRender does not support default visual"; | 207 CHECK(pictformat) << "XRender does not support default visual"; |
208 | 208 |
209 picture_ = XRenderCreatePicture(display_, window_, pictformat, 0, NULL); | 209 picture_ = XRenderCreatePicture(display_, window_, pictformat, 0, NULL); |
210 CHECK(picture_) << "Backing picture not created"; | 210 CHECK(picture_) << "Backing picture not created"; |
211 } | 211 } |
212 } | 212 } |
OLD | NEW |