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 "remoting/host/capturer.h" | 5 #include "remoting/host/capturer.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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 } | 419 } |
420 } | 420 } |
421 } | 421 } |
422 | 422 |
423 void CapturerLinux::DeinitXlib() { | 423 void CapturerLinux::DeinitXlib() { |
424 if (gc_) { | 424 if (gc_) { |
425 XFreeGC(display_, gc_); | 425 XFreeGC(display_, gc_); |
426 gc_ = NULL; | 426 gc_ = NULL; |
427 } | 427 } |
428 | 428 |
| 429 x_server_pixel_buffer_.Release(); |
| 430 |
429 if (display_) { | 431 if (display_) { |
430 if (damage_handle_) | 432 if (damage_handle_) |
431 XDamageDestroy(display_, damage_handle_); | 433 XDamageDestroy(display_, damage_handle_); |
432 if (damage_region_) | 434 if (damage_region_) |
433 XFixesDestroyRegion(display_, damage_region_); | 435 XFixesDestroyRegion(display_, damage_region_); |
434 XCloseDisplay(display_); | 436 XCloseDisplay(display_); |
435 display_ = NULL; | 437 display_ = NULL; |
436 damage_handle_ = 0; | 438 damage_handle_ = 0; |
437 damage_region_ = 0; | 439 damage_region_ = 0; |
438 } | 440 } |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 } | 543 } |
542 return capturer; | 544 return capturer; |
543 } | 545 } |
544 | 546 |
545 // static | 547 // static |
546 void Capturer::EnableXDamage(bool enable) { | 548 void Capturer::EnableXDamage(bool enable) { |
547 g_should_use_x_damage = enable; | 549 g_should_use_x_damage = enable; |
548 } | 550 } |
549 | 551 |
550 } // namespace remoting | 552 } // namespace remoting |
OLD | NEW |