OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | |
3 * | |
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 | |
6 * tree. An additional intellectual property rights grant can be found | |
7 * in the file PATENTS. All contributing project authors may | |
8 * be found in the AUTHORS file in the root of the source tree. | |
9 */ | |
10 | |
11 #ifndef MODULES_DESKTOP_CAPTURE_WIN_DXGI_TEXTURE_MAPPING_H_ | |
12 #define MODULES_DESKTOP_CAPTURE_WIN_DXGI_TEXTURE_MAPPING_H_ | |
13 | |
14 #include <D3D11.h> | |
15 #include <DXGI1_2.h> | |
16 | |
17 #include "webrtc/modules/desktop_capture/desktop_geometry.h" | |
18 #include "webrtc/modules/desktop_capture/desktop_region.h" | |
19 #include "webrtc/modules/desktop_capture/win/dxgi_texture.h" | |
20 | |
21 namespace webrtc { | |
22 | |
23 // A DxgiTexture which directly maps bitmap from IDXGIResource. This class is | |
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 | |
26 // individual memory.) | |
27 class DxgiTextureMapping : public DxgiTexture { | |
28 public: | |
29 // Creates a DxgiTextureMapping instance. Caller must maintain the lifetime | |
30 // of input duplication to make sure it outlives this instance. | |
31 DxgiTextureMapping(const DesktopRect& desktop_rect, | |
32 IDXGIOutputDuplication* duplication); | |
33 | |
34 virtual ~DxgiTextureMapping() = default; | |
Sergey Ulanov
2016/08/06 01:27:58
override {} and remove virtual
Hzj_jie
2016/08/08 00:16:09
virtual has been replaced with override.
| |
35 | |
36 bool CopyFrom(const DXGI_OUTDUPL_FRAME_INFO& frame_info, | |
37 IDXGIResource* resource, | |
38 const DesktopRegion& region) override; | |
39 | |
40 bool DoRelease() override; | |
41 | |
42 private: | |
43 IDXGIOutputDuplication* const duplication_; | |
44 }; | |
45 | |
46 } // namespace webrtc | |
47 | |
48 #endif // MODULES_DESKTOP_CAPTURE_WIN_DXGI_TEXTURE_MAPPING_H_ | |
OLD | NEW |