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

Side by Side Diff: remoting/host/capturer_linux.cc

Issue 10096003: Destroy XServerPixelBuffer before closing X Display. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698