| 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 14 matching lines...) Expand all Loading... |
| 25 #include "webrtc/modules/desktop_capture/desktop_region.h" | 25 #include "webrtc/modules/desktop_capture/desktop_region.h" |
| 26 #include "webrtc/modules/desktop_capture/desktop_frame_rotation.h" | 26 #include "webrtc/modules/desktop_capture/desktop_frame_rotation.h" |
| 27 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h" | 27 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h" |
| 28 #include "webrtc/modules/desktop_capture/win/d3d_device.h" | 28 #include "webrtc/modules/desktop_capture/win/d3d_device.h" |
| 29 #include "webrtc/modules/desktop_capture/win/dxgi_texture.h" | 29 #include "webrtc/modules/desktop_capture/win/dxgi_texture.h" |
| 30 | 30 |
| 31 namespace webrtc { | 31 namespace webrtc { |
| 32 | 32 |
| 33 // Duplicates the content on one IDXGIOutput, i.e. one monitor attached to one | 33 // Duplicates the content on one IDXGIOutput, i.e. one monitor attached to one |
| 34 // video card. None of functions in this class is thread-safe. | 34 // video card. None of functions in this class is thread-safe. |
| 35 // TODO(zijiehe): Understand the meaning of rotation. | |
| 36 class DxgiOutputDuplicator { | 35 class DxgiOutputDuplicator { |
| 37 public: | 36 public: |
| 38 struct Context { | 37 struct Context { |
| 39 // The updated region DxgiOutputDuplicator::DetectUpdatedRegion() output | 38 // The updated region DxgiOutputDuplicator::DetectUpdatedRegion() output |
| 40 // during last Duplicate() function call. It's a DesktopRegion translated by | 39 // during last Duplicate() function call. It's a DesktopRegion translated by |
| 41 // offset of each DxgiOutputDuplicator instance. | 40 // offset of each DxgiOutputDuplicator instance. |
| 42 DesktopRegion updated_region; | 41 DesktopRegion updated_region; |
| 43 }; | 42 }; |
| 44 | 43 |
| 45 // Creates an instance of DxgiOutputDuplicator from a D3dDevice and one of its | 44 // Creates an instance of DxgiOutputDuplicator from a D3dDevice and one of its |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 // The last full frame of this output and its offset. If on AcquireNextFrame() | 124 // The last full frame of this output and its offset. If on AcquireNextFrame() |
| 126 // failed because of timeout, i.e. no update, we can copy content from | 125 // failed because of timeout, i.e. no update, we can copy content from |
| 127 // |last_frame_|. | 126 // |last_frame_|. |
| 128 std::unique_ptr<SharedDesktopFrame> last_frame_; | 127 std::unique_ptr<SharedDesktopFrame> last_frame_; |
| 129 DesktopVector last_frame_offset_; | 128 DesktopVector last_frame_offset_; |
| 130 }; | 129 }; |
| 131 | 130 |
| 132 } // namespace webrtc | 131 } // namespace webrtc |
| 133 | 132 |
| 134 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_OUTPUT_DUPLICATOR_H_ | 133 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_OUTPUT_DUPLICATOR_H_ |
| OLD | NEW |