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

Side by Side Diff: webrtc/modules/desktop_capture/mouse_cursor_monitor_mac.mm

Issue 2834273002: Reland of GN: Enable ARC for Mac and iOS in rtc_* templates (Closed)
Patch Set: Make sure PeerConnection is released before factory Created 3 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 | « webrtc/modules/audio_device/BUILD.gn ('k') | webrtc/sdk/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 18 matching lines...) Expand all
29 29
30 namespace webrtc { 30 namespace webrtc {
31 31
32 namespace { 32 namespace {
33 // Paint the image, so that we can get a bitmap representation compatible with 33 // Paint the image, so that we can get a bitmap representation compatible with
34 // current context. For example, in the retina display, we are going to get an 34 // current context. For example, in the retina display, we are going to get an
35 // image with same visual size but underlying pixel size conforms to the retina 35 // image with same visual size but underlying pixel size conforms to the retina
36 // setting. 36 // setting.
37 NSImage* PaintInCurrentContext(NSImage* source) { 37 NSImage* PaintInCurrentContext(NSImage* source) {
38 NSSize size = [source size]; 38 NSSize size = [source size];
39 NSImage* new_image = [[[NSImage alloc] initWithSize:size] autorelease]; 39 NSImage* new_image = [[NSImage alloc] initWithSize:size];
40 [new_image lockFocus]; 40 [new_image lockFocus];
41 NSRect frame = NSMakeRect(0, 0, size.width, size.height); 41 NSRect frame = NSMakeRect(0, 0, size.width, size.height);
42 [source drawInRect:frame 42 [source drawInRect:frame
43 fromRect:frame 43 fromRect:frame
44 operation:NSCompositeCopy 44 operation:NSCompositeCopy
45 fraction:1.0]; 45 fraction:1.0];
46 [new_image unlockFocus]; 46 [new_image unlockFocus];
47 return new_image; 47 return new_image;
48 } 48 }
49 } // namespace 49 } // namespace
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 return new MouseCursorMonitorMac(options, window, kInvalidScreenId); 317 return new MouseCursorMonitorMac(options, window, kInvalidScreenId);
318 } 318 }
319 319
320 MouseCursorMonitor* MouseCursorMonitor::CreateForScreen( 320 MouseCursorMonitor* MouseCursorMonitor::CreateForScreen(
321 const DesktopCaptureOptions& options, 321 const DesktopCaptureOptions& options,
322 ScreenId screen) { 322 ScreenId screen) {
323 return new MouseCursorMonitorMac(options, kCGNullWindowID, screen); 323 return new MouseCursorMonitorMac(options, kCGNullWindowID, screen);
324 } 324 }
325 325
326 } // namespace webrtc 326 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_device/BUILD.gn ('k') | webrtc/sdk/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698