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 11 matching lines...) Expand all Loading... |
22 | 22 |
23 class DesktopRegion; | 23 class DesktopRegion; |
24 | 24 |
25 // A texture copied or mapped from a DXGI_OUTDUPL_FRAME_INFO and IDXGIResource. | 25 // A texture copied or mapped from a DXGI_OUTDUPL_FRAME_INFO and IDXGIResource. |
26 class DxgiTexture { | 26 class DxgiTexture { |
27 public: | 27 public: |
28 // Creates a DxgiTexture instance, which represents the DesktopRect area of | 28 // Creates a DxgiTexture instance, which represents the DesktopRect area of |
29 // entire screen -- usually a monitor on the system. | 29 // entire screen -- usually a monitor on the system. |
30 explicit DxgiTexture(const DesktopRect& desktop_rect); | 30 explicit DxgiTexture(const DesktopRect& desktop_rect); |
31 | 31 |
32 virtual ~DxgiTexture() = default; | 32 ~DxgiTexture() override = default; |
33 | 33 |
34 // Copies selected regions of a frame represented by frame_info and resource. | 34 // Copies selected regions of a frame represented by frame_info and resource. |
35 // Returns false if anything wrong. | 35 // Returns false if anything wrong. |
36 virtual bool CopyFrom(const DXGI_OUTDUPL_FRAME_INFO& frame_info, | 36 virtual bool CopyFrom(const DXGI_OUTDUPL_FRAME_INFO& frame_info, |
37 IDXGIResource* resource, | 37 IDXGIResource* resource, |
38 const DesktopRegion& region) = 0; | 38 const DesktopRegion& region) = 0; |
39 | 39 |
40 const DesktopRect& desktop_rect() const { return desktop_rect_; } | 40 const DesktopRect& desktop_rect() const { return desktop_rect_; } |
41 | 41 |
42 uint8_t* bits() const { return static_cast<uint8_t*>(rect_.pBits); } | 42 uint8_t* bits() const { return static_cast<uint8_t*>(rect_.pBits); } |
(...skipping 17 matching lines...) Expand all Loading... |
60 private: | 60 private: |
61 virtual bool DoRelease() = 0; | 61 virtual bool DoRelease() = 0; |
62 | 62 |
63 const DesktopRect desktop_rect_; | 63 const DesktopRect desktop_rect_; |
64 std::unique_ptr<DesktopFrame> frame_; | 64 std::unique_ptr<DesktopFrame> frame_; |
65 }; | 65 }; |
66 | 66 |
67 } // namespace webrtc | 67 } // namespace webrtc |
68 | 68 |
69 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_TEXTURE_H_ | 69 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_TEXTURE_H_ |
OLD | NEW |