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 25 matching lines...) Expand all Loading... |
36 | 36 |
37 // Returns all D3dDevice instances on the system. Returns an empty vector if | 37 // Returns all D3dDevice instances on the system. Returns an empty vector if |
38 // anything wrong. | 38 // anything wrong. |
39 static std::vector<D3dDevice> EnumDevices(); | 39 static std::vector<D3dDevice> EnumDevices(); |
40 | 40 |
41 private: | 41 private: |
42 // Instances of D3dDevice should only be created by EnumDevices() static | 42 // Instances of D3dDevice should only be created by EnumDevices() static |
43 // function. | 43 // function. |
44 D3dDevice(); | 44 D3dDevice(); |
45 | 45 |
46 // Initialize the D3dDevice from an IDXGIAdapter. | 46 // Initializes the D3dDevice from an IDXGIAdapter. |
47 bool Initialize(const Microsoft::WRL::ComPtr<IDXGIAdapter>& adapter); | 47 bool Initialize(const Microsoft::WRL::ComPtr<IDXGIAdapter>& adapter); |
48 | 48 |
49 Microsoft::WRL::ComPtr<ID3D11Device> d3d_device_; | 49 Microsoft::WRL::ComPtr<ID3D11Device> d3d_device_; |
50 Microsoft::WRL::ComPtr<ID3D11DeviceContext> context_; | 50 Microsoft::WRL::ComPtr<ID3D11DeviceContext> context_; |
51 Microsoft::WRL::ComPtr<IDXGIDevice> dxgi_device_; | 51 Microsoft::WRL::ComPtr<IDXGIDevice> dxgi_device_; |
52 Microsoft::WRL::ComPtr<IDXGIAdapter> dxgi_adapter_; | 52 Microsoft::WRL::ComPtr<IDXGIAdapter> dxgi_adapter_; |
53 }; | 53 }; |
54 | 54 |
55 } // namespace webrtc | 55 } // namespace webrtc |
56 | 56 |
57 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_D3D_DEVICE_H_ | 57 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_D3D_DEVICE_H_ |
OLD | NEW |