| 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 |
| 11 #include "webrtc/modules/desktop_capture/win/dxgi_output_duplicator.h" | 11 #include "webrtc/modules/desktop_capture/win/dxgi_output_duplicator.h" |
| 12 | 12 |
| 13 #include <string.h> | 13 #include <string.h> |
| 14 | 14 |
| 15 #include <unknwn.h> | 15 #include <unknwn.h> |
| 16 #include <DXGI.h> | 16 #include <DXGI.h> |
| 17 #include <DXGIFormat.h> | 17 #include <DXGIFormat.h> |
| 18 #include <Windows.h> | 18 #include <Windows.h> |
| 19 | 19 |
| 20 #include <algorithm> | 20 #include <algorithm> |
| 21 | 21 |
| 22 #include "webrtc/base/checks.h" |
| 23 #include "webrtc/base/logging.h" |
| 22 #include "webrtc/modules/desktop_capture/win/dxgi_texture_mapping.h" | 24 #include "webrtc/modules/desktop_capture/win/dxgi_texture_mapping.h" |
| 23 #include "webrtc/modules/desktop_capture/win/dxgi_texture_staging.h" | 25 #include "webrtc/modules/desktop_capture/win/dxgi_texture_staging.h" |
| 24 #include "webrtc/rtc_base/checks.h" | |
| 25 #include "webrtc/rtc_base/logging.h" | |
| 26 | 26 |
| 27 namespace webrtc { | 27 namespace webrtc { |
| 28 | 28 |
| 29 using Microsoft::WRL::ComPtr; | 29 using Microsoft::WRL::ComPtr; |
| 30 | 30 |
| 31 namespace { | 31 namespace { |
| 32 | 32 |
| 33 // Timeout for AcquireNextFrame() call. | 33 // Timeout for AcquireNextFrame() call. |
| 34 // DxgiDuplicatorController leverages external components to do the capture | 34 // DxgiDuplicatorController leverages external components to do the capture |
| 35 // scheduling. So here DxgiOutputDuplicator does not need to actively wait for a | 35 // scheduling. So here DxgiOutputDuplicator does not need to actively wait for a |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 #endif | 380 #endif |
| 381 return num_frames_captured_; | 381 return num_frames_captured_; |
| 382 } | 382 } |
| 383 | 383 |
| 384 void DxgiOutputDuplicator::TranslateRect(const DesktopVector& position) { | 384 void DxgiOutputDuplicator::TranslateRect(const DesktopVector& position) { |
| 385 desktop_rect_.Translate(position); | 385 desktop_rect_.Translate(position); |
| 386 RTC_DCHECK(desktop_rect_.left() >= 0 && desktop_rect_.top() >= 0); | 386 RTC_DCHECK(desktop_rect_.left() >= 0 && desktop_rect_.top() >= 0); |
| 387 } | 387 } |
| 388 | 388 |
| 389 } // namespace webrtc | 389 } // namespace webrtc |
| OLD | NEW |