OLD | NEW |
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 |
11 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h" | 11 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h" |
12 | 12 |
13 #include <memory> | 13 #include <memory> |
14 | 14 |
15 #include "webrtc/base/constructormagic.h" | 15 #include "webrtc/base/constructormagic.h" |
16 #include "webrtc/system_wrappers/include/atomic32.h" | |
17 | 16 |
18 namespace webrtc { | 17 namespace webrtc { |
19 | 18 |
20 SharedDesktopFrame::~SharedDesktopFrame() {} | 19 SharedDesktopFrame::~SharedDesktopFrame() {} |
21 | 20 |
22 // static | 21 // static |
23 std::unique_ptr<SharedDesktopFrame> SharedDesktopFrame::Wrap( | 22 std::unique_ptr<SharedDesktopFrame> SharedDesktopFrame::Wrap( |
24 std::unique_ptr<DesktopFrame> desktop_frame) { | 23 std::unique_ptr<DesktopFrame> desktop_frame) { |
25 return std::unique_ptr<SharedDesktopFrame>( | 24 return std::unique_ptr<SharedDesktopFrame>( |
26 new SharedDesktopFrame(new Core(std::move(desktop_frame)))); | 25 new SharedDesktopFrame(new Core(std::move(desktop_frame)))); |
(...skipping 20 matching lines...) Expand all Loading... |
47 } | 46 } |
48 | 47 |
49 SharedDesktopFrame::SharedDesktopFrame(rtc::scoped_refptr<Core> core) | 48 SharedDesktopFrame::SharedDesktopFrame(rtc::scoped_refptr<Core> core) |
50 : DesktopFrame((*core)->size(), | 49 : DesktopFrame((*core)->size(), |
51 (*core)->stride(), | 50 (*core)->stride(), |
52 (*core)->data(), | 51 (*core)->data(), |
53 (*core)->shared_memory()), | 52 (*core)->shared_memory()), |
54 core_(core) {} | 53 core_(core) {} |
55 | 54 |
56 } // namespace webrtc | 55 } // namespace webrtc |
OLD | NEW |