| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 context->contexts.size() == duplicators_.size()); | 137 context->contexts.size() == duplicators_.size()); |
| 138 return duplicators_[monitor_id].Duplicate(&context->contexts[monitor_id], | 138 return duplicators_[monitor_id].Duplicate(&context->contexts[monitor_id], |
| 139 DesktopVector(), target); | 139 DesktopVector(), target); |
| 140 } | 140 } |
| 141 | 141 |
| 142 DesktopRect DxgiAdapterDuplicator::ScreenRect(int id) const { | 142 DesktopRect DxgiAdapterDuplicator::ScreenRect(int id) const { |
| 143 RTC_DCHECK(id >= 0 && id < static_cast<int>(duplicators_.size())); | 143 RTC_DCHECK(id >= 0 && id < static_cast<int>(duplicators_.size())); |
| 144 return duplicators_[id].desktop_rect(); | 144 return duplicators_[id].desktop_rect(); |
| 145 } | 145 } |
| 146 | 146 |
| 147 int DxgiAdapterDuplicator::screen_count() const { |
| 148 return static_cast<int>(duplicators_.size()); |
| 149 } |
| 150 |
| 151 int64_t DxgiAdapterDuplicator::GetNumFramesCaptured() const { |
| 152 int64_t min = INT64_MAX; |
| 153 for (const auto& duplicator : duplicators_) { |
| 154 min = std::min(min, duplicator.num_frames_captured()); |
| 155 } |
| 156 |
| 157 return min; |
| 158 } |
| 159 |
| 147 } // namespace webrtc | 160 } // namespace webrtc |
| OLD | NEW |