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

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

Issue 2827223003: Revert of GN: Enable ARC for Mac and iOS in rtc_* templates (Closed)
Patch Set: 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 19 matching lines...) Expand all
30 30
31 namespace webrtc { 31 namespace webrtc {
32 32
33 namespace { 33 namespace {
34 // Paint the image, so that we can get a bitmap representation compatible with 34 // Paint the image, so that we can get a bitmap representation compatible with
35 // current context. For example, in the retina display, we are going to get an 35 // current context. For example, in the retina display, we are going to get an
36 // image with same visual size but underlying pixel size conforms to the retina 36 // image with same visual size but underlying pixel size conforms to the retina
37 // setting. 37 // setting.
38 NSImage* PaintInCurrentContext(NSImage* source) { 38 NSImage* PaintInCurrentContext(NSImage* source) {
39 NSSize size = [source size]; 39 NSSize size = [source size];
40 NSImage* new_image = [[NSImage alloc] initWithSize:size]; 40 NSImage* new_image = [[[NSImage alloc] initWithSize:size] autorelease];
41 [new_image lockFocus]; 41 [new_image lockFocus];
42 NSRect frame = NSMakeRect(0, 0, size.width, size.height); 42 NSRect frame = NSMakeRect(0, 0, size.width, size.height);
43 [source drawInRect:frame 43 [source drawInRect:frame
44 fromRect:frame 44 fromRect:frame
45 operation:NSCompositeCopy 45 operation:NSCompositeCopy
46 fraction:1.0]; 46 fraction:1.0];
47 [new_image unlockFocus]; 47 [new_image unlockFocus];
48 return new_image; 48 return new_image;
49 } 49 }
50 } // namespace 50 } // namespace
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 return new MouseCursorMonitorMac(options, window, kInvalidScreenId); 318 return new MouseCursorMonitorMac(options, window, kInvalidScreenId);
319 } 319 }
320 320
321 MouseCursorMonitor* MouseCursorMonitor::CreateForScreen( 321 MouseCursorMonitor* MouseCursorMonitor::CreateForScreen(
322 const DesktopCaptureOptions& options, 322 const DesktopCaptureOptions& options,
323 ScreenId screen) { 323 ScreenId screen) {
324 return new MouseCursorMonitorMac(options, kCGNullWindowID, screen); 324 return new MouseCursorMonitorMac(options, kCGNullWindowID, screen);
325 } 325 }
326 326
327 } // namespace webrtc 327 } // 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