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

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

Issue 8384011: Fix up Curtain mode on MacOS 10.7 (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix up Jamie's complaints Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/host/curtain_mac.cc » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <ApplicationServices/ApplicationServices.h> 7 #include <ApplicationServices/ApplicationServices.h>
8 #include <dlfcn.h> 8 #include <dlfcn.h>
9 #include <OpenGL/CGLMacro.h> 9 #include <OpenGL/CGLMacro.h>
10 #include <OpenGL/OpenGL.h> 10 #include <OpenGL/OpenGL.h>
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 last_buffer_(NULL), 221 last_buffer_(NULL),
222 pixel_format_(media::VideoFrame::RGB32), 222 pixel_format_(media::VideoFrame::RGB32),
223 display_configuration_capture_event_(false, true), 223 display_configuration_capture_event_(false, true),
224 display_create_image_func_(NULL) { 224 display_create_image_func_(NULL) {
225 } 225 }
226 226
227 CapturerMac::~CapturerMac() { 227 CapturerMac::~CapturerMac() {
228 ReleaseBuffers(); 228 ReleaseBuffers();
229 CGUnregisterScreenRefreshCallback(CapturerMac::ScreenRefreshCallback, this); 229 CGUnregisterScreenRefreshCallback(CapturerMac::ScreenRefreshCallback, this);
230 CGScreenUnregisterMoveCallback(CapturerMac::ScreenUpdateMoveCallback, this); 230 CGScreenUnregisterMoveCallback(CapturerMac::ScreenUpdateMoveCallback, this);
231 CGDisplayRemoveReconfigurationCallback( 231 CGError err = CGDisplayRemoveReconfigurationCallback(
232 CapturerMac::DisplaysReconfiguredCallback, this); 232 CapturerMac::DisplaysReconfiguredCallback, this);
233 if (err != kCGErrorSuccess) {
234 LOG(ERROR) << "CGDisplayRemoveReconfigurationCallback " << err;
235 }
233 } 236 }
234 237
235 bool CapturerMac::Init() { 238 bool CapturerMac::Init() {
236 CGError err = 239 CGError err =
237 CGRegisterScreenRefreshCallback(CapturerMac::ScreenRefreshCallback, 240 CGRegisterScreenRefreshCallback(CapturerMac::ScreenRefreshCallback,
238 this); 241 this);
239 if (err != kCGErrorSuccess) { 242 if (err != kCGErrorSuccess) {
240 LOG(ERROR) << "CGRegisterScreenRefreshCallback " << err; 243 LOG(ERROR) << "CGRegisterScreenRefreshCallback " << err;
241 return false; 244 return false;
242 } 245 }
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 Capturer* Capturer::Create() { 623 Capturer* Capturer::Create() {
621 CapturerMac* capturer = new CapturerMac(); 624 CapturerMac* capturer = new CapturerMac();
622 if (!capturer->Init()) { 625 if (!capturer->Init()) {
623 delete capturer; 626 delete capturer;
624 capturer = NULL; 627 capturer = NULL;
625 } 628 }
626 return capturer; 629 return capturer;
627 } 630 }
628 631
629 } // namespace remoting 632 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/host/curtain_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698