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

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

Issue 2851513003: Forward capturer_id between DesktopFrame and its implementations (Closed)
Patch Set: Created 3 years, 7 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 | webrtc/modules/desktop_capture/desktop_capturer_differ_wrapper.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 /* 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 DesktopFrameWithCursor::DesktopFrameWithCursor( 74 DesktopFrameWithCursor::DesktopFrameWithCursor(
75 std::unique_ptr<DesktopFrame> frame, 75 std::unique_ptr<DesktopFrame> frame,
76 const MouseCursor& cursor, 76 const MouseCursor& cursor,
77 const DesktopVector& position) 77 const DesktopVector& position)
78 : DesktopFrame(frame->size(), 78 : DesktopFrame(frame->size(),
79 frame->stride(), 79 frame->stride(),
80 frame->data(), 80 frame->data(),
81 frame->shared_memory()) { 81 frame->shared_memory()) {
82 set_dpi(frame->dpi()); 82 set_dpi(frame->dpi());
83 set_capture_time_ms(frame->capture_time_ms()); 83 set_capture_time_ms(frame->capture_time_ms());
84 set_capturer_id(frame->capturer_id());
84 mutable_updated_region()->Swap(frame->mutable_updated_region()); 85 mutable_updated_region()->Swap(frame->mutable_updated_region());
85 original_frame_ = std::move(frame); 86 original_frame_ = std::move(frame);
86 87
87 DesktopVector image_pos = position.subtract(cursor.hotspot()); 88 DesktopVector image_pos = position.subtract(cursor.hotspot());
88 DesktopRect target_rect = DesktopRect::MakeSize(cursor.image()->size()); 89 DesktopRect target_rect = DesktopRect::MakeSize(cursor.image()->size());
89 target_rect.Translate(image_pos); 90 target_rect.Translate(image_pos);
90 DesktopVector target_origin = target_rect.top_left(); 91 DesktopVector target_origin = target_rect.top_left();
91 target_rect.IntersectWith(DesktopRect::MakeSize(size())); 92 target_rect.IntersectWith(DesktopRect::MakeSize(size()));
92 93
93 if (target_rect.is_empty()) 94 if (target_rect.is_empty())
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 172 }
172 173
173 void DesktopAndCursorComposer::OnMouseCursorPosition( 174 void DesktopAndCursorComposer::OnMouseCursorPosition(
174 MouseCursorMonitor::CursorState state, 175 MouseCursorMonitor::CursorState state,
175 const DesktopVector& position) { 176 const DesktopVector& position) {
176 cursor_state_ = state; 177 cursor_state_ = state;
177 cursor_position_ = position; 178 cursor_position_ = position;
178 } 179 }
179 180
180 } // namespace webrtc 181 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/desktop_capture/desktop_capturer_differ_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698