Chromium Code Reviews| 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::num_frames_captured() const { | |
|
Sergey Ulanov
2017/02/23 19:07:30
It should be called GetNumFramesCaptured()
Hzj_jie
2017/02/23 20:52:11
Done.
| |
| 152 int64_t min = INT64_MAX; | |
| 153 for (size_t i = 0; i < duplicators_.size(); i++) { | |
|
Sergey Ulanov
2017/02/23 19:07:30
for (auto& duplicator : duplicators_)
Hzj_jie
2017/02/23 20:52:11
Done.
| |
| 154 if (duplicators_[i].num_frames_captured() < min) { | |
|
Sergey Ulanov
2017/02/23 19:07:30
min = std::min(min, duplicator.num_frames_captured
Hzj_jie
2017/02/23 20:52:11
Done.
| |
| 155 min = duplicators_[i].num_frames_captured(); | |
| 156 } | |
| 157 } | |
| 158 | |
| 159 return min; | |
| 160 } | |
| 161 | |
| 147 } // namespace webrtc | 162 } // namespace webrtc |
| OLD | NEW |