| 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 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_D3D_DEVICE_H_ | 11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_D3D_DEVICE_H_ |
| 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_D3D_DEVICE_H_ | 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_D3D_DEVICE_H_ |
| 13 | 13 |
| 14 #include <comdef.h> | 14 #include <comdef.h> |
| 15 #include <wrl/client.h> | 15 #include <wrl/client.h> |
| 16 #include <D3D11.h> | 16 #include <D3D11.h> |
| 17 #include <DXGI.h> | 17 #include <DXGI.h> |
| 18 | 18 |
| 19 #include <vector> | 19 #include <vector> |
| 20 | 20 |
| 21 namespace webrtc { | 21 namespace webrtc { |
| 22 | 22 |
| 23 // A wrapper of ID3D11Device and its corresponding context and IDXGIAdapter. | 23 // A wrapper of ID3D11Device and its corresponding context and IDXGIAdapter. |
| 24 // This class represents one video card in the system. | 24 // This class represents one video card in the system. |
| 25 class D3dDevice { | 25 class D3dDevice { |
| 26 public: | 26 public: |
| 27 D3dDevice(const D3dDevice& other); |
| 28 D3dDevice(D3dDevice&& other); |
| 27 ~D3dDevice(); | 29 ~D3dDevice(); |
| 28 | 30 |
| 29 ID3D11Device* d3d_device() const { return d3d_device_.Get(); } | 31 ID3D11Device* d3d_device() const { return d3d_device_.Get(); } |
| 30 | 32 |
| 31 ID3D11DeviceContext* context() const { return context_.Get(); } | 33 ID3D11DeviceContext* context() const { return context_.Get(); } |
| 32 | 34 |
| 33 IDXGIDevice* dxgi_device() const { return dxgi_device_.Get(); } | 35 IDXGIDevice* dxgi_device() const { return dxgi_device_.Get(); } |
| 34 | 36 |
| 35 IDXGIAdapter* dxgi_adapter() const { return dxgi_adapter_.Get(); } | 37 IDXGIAdapter* dxgi_adapter() const { return dxgi_adapter_.Get(); } |
| 36 | 38 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 48 | 50 |
| 49 Microsoft::WRL::ComPtr<ID3D11Device> d3d_device_; | 51 Microsoft::WRL::ComPtr<ID3D11Device> d3d_device_; |
| 50 Microsoft::WRL::ComPtr<ID3D11DeviceContext> context_; | 52 Microsoft::WRL::ComPtr<ID3D11DeviceContext> context_; |
| 51 Microsoft::WRL::ComPtr<IDXGIDevice> dxgi_device_; | 53 Microsoft::WRL::ComPtr<IDXGIDevice> dxgi_device_; |
| 52 Microsoft::WRL::ComPtr<IDXGIAdapter> dxgi_adapter_; | 54 Microsoft::WRL::ComPtr<IDXGIAdapter> dxgi_adapter_; |
| 53 }; | 55 }; |
| 54 | 56 |
| 55 } // namespace webrtc | 57 } // namespace webrtc |
| 56 | 58 |
| 57 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_D3D_DEVICE_H_ | 59 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_D3D_DEVICE_H_ |
| OLD | NEW |