OLD | NEW |
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 "remoting/host/capturer_linux.h" | 5 #include "remoting/host/capturer_linux.h" |
6 | 6 |
7 #include <X11/Xlib.h> | 7 #include <X11/Xlib.h> |
8 #include <X11/Xutil.h> | 8 #include <X11/Xutil.h> |
9 #include <X11/extensions/Xdamage.h> | 9 #include <X11/extensions/Xdamage.h> |
10 | 10 |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 uint32_t b = | 332 uint32_t b = |
333 (((pixel & image->blue_mask) >> blue_shift) * max_green) / 255; | 333 (((pixel & image->blue_mask) >> blue_shift) * max_green) / 255; |
334 | 334 |
335 // Write as 32-bit RGB. | 335 // Write as 32-bit RGB. |
336 *dst_pos = r << 16 | g << 8 | b; | 336 *dst_pos = r << 16 | g << 8 | b; |
337 dst_pos++; | 337 dst_pos++; |
338 } | 338 } |
339 } | 339 } |
340 } | 340 } |
341 | 341 |
| 342 // static |
| 343 Capturer* Capturer::Create(MessageLoop* message_loop) { |
| 344 return new CapturerLinux(message_loop); |
| 345 } |
| 346 |
342 } // namespace remoting | 347 } // namespace remoting |
OLD | NEW |