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

Side by Side Diff: webrtc/modules/desktop_capture/shared_desktop_frame.cc

Issue 2796583002: Forward capturer_id to shared desktopframe (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 | « 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 /* 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 31
32 DesktopFrame* SharedDesktopFrame::GetUnderlyingFrame() { 32 DesktopFrame* SharedDesktopFrame::GetUnderlyingFrame() {
33 return core_->get(); 33 return core_->get();
34 } 34 }
35 35
36 std::unique_ptr<SharedDesktopFrame> SharedDesktopFrame::Share() { 36 std::unique_ptr<SharedDesktopFrame> SharedDesktopFrame::Share() {
37 std::unique_ptr<SharedDesktopFrame> result(new SharedDesktopFrame(core_)); 37 std::unique_ptr<SharedDesktopFrame> result(new SharedDesktopFrame(core_));
38 result->set_dpi(dpi()); 38 result->set_dpi(dpi());
39 result->set_capture_time_ms(capture_time_ms()); 39 result->set_capture_time_ms(capture_time_ms());
40 result->set_capturer_id(capturer_id());
40 *result->mutable_updated_region() = updated_region(); 41 *result->mutable_updated_region() = updated_region();
41 return result; 42 return result;
42 } 43 }
43 44
44 bool SharedDesktopFrame::IsShared() { 45 bool SharedDesktopFrame::IsShared() {
45 return !core_->HasOneRef(); 46 return !core_->HasOneRef();
46 } 47 }
47 48
48 SharedDesktopFrame::SharedDesktopFrame(rtc::scoped_refptr<Core> core) 49 SharedDesktopFrame::SharedDesktopFrame(rtc::scoped_refptr<Core> core)
49 : DesktopFrame((*core)->size(), 50 : DesktopFrame((*core)->size(),
50 (*core)->stride(), 51 (*core)->stride(),
51 (*core)->data(), 52 (*core)->data(),
52 (*core)->shared_memory()), 53 (*core)->shared_memory()),
53 core_(core) {} 54 core_(core) {}
54 55
55 } // namespace webrtc 56 } // namespace webrtc
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