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 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |