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 10 matching lines...) Expand all Loading... |
21 namespace webrtc { | 21 namespace webrtc { |
22 | 22 |
23 // A DxgiTexture which directly maps bitmap from IDXGIResource. This class is | 23 // A DxgiTexture which directly maps bitmap from IDXGIResource. This class is |
24 // used when DXGI_OUTDUPL_DESC.DesktopImageInSystemMemory is true. (This usually | 24 // used when DXGI_OUTDUPL_DESC.DesktopImageInSystemMemory is true. (This usually |
25 // means the video card shares main memory with CPU, instead of having its own | 25 // means the video card shares main memory with CPU, instead of having its own |
26 // individual memory.) | 26 // individual memory.) |
27 class DxgiTextureMapping : public DxgiTexture { | 27 class DxgiTextureMapping : public DxgiTexture { |
28 public: | 28 public: |
29 // Creates a DxgiTextureMapping instance. Caller must maintain the lifetime | 29 // Creates a DxgiTextureMapping instance. Caller must maintain the lifetime |
30 // of input duplication to make sure it outlives this instance. | 30 // of input duplication to make sure it outlives this instance. |
31 DxgiTextureMapping(const DesktopRect& desktop_rect, | 31 DxgiTextureMapping(const DesktopSize& desktop_size, |
32 IDXGIOutputDuplication* duplication); | 32 IDXGIOutputDuplication* duplication); |
33 | 33 |
34 ~DxgiTextureMapping() override; | 34 ~DxgiTextureMapping() override; |
35 | 35 |
36 bool CopyFrom(const DXGI_OUTDUPL_FRAME_INFO& frame_info, | 36 bool CopyFrom(const DXGI_OUTDUPL_FRAME_INFO& frame_info, |
37 IDXGIResource* resource, | 37 IDXGIResource* resource) override; |
38 const DesktopRegion& region) override; | |
39 | 38 |
40 bool DoRelease() override; | 39 bool DoRelease() override; |
41 | 40 |
42 private: | 41 private: |
43 IDXGIOutputDuplication* const duplication_; | 42 IDXGIOutputDuplication* const duplication_; |
44 }; | 43 }; |
45 | 44 |
46 } // namespace webrtc | 45 } // namespace webrtc |
47 | 46 |
48 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_TEXTURE_MAPPING_H_ | 47 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_TEXTURE_MAPPING_H_ |
OLD | NEW |