| Index: webrtc/modules/desktop_capture/win/dxgi_texture.h
|
| diff --git a/webrtc/modules/desktop_capture/win/dxgi_texture.h b/webrtc/modules/desktop_capture/win/dxgi_texture.h
|
| index a4bd237e01e33fea4615b1538654399c56449748..6f3e29b07f8c4b5858e558f222b2a20821c5d2fd 100644
|
| --- a/webrtc/modules/desktop_capture/win/dxgi_texture.h
|
| +++ b/webrtc/modules/desktop_capture/win/dxgi_texture.h
|
| @@ -11,12 +11,14 @@
|
| #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_TEXTURE_H_
|
| #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_TEXTURE_H_
|
|
|
| +#include <D3D11.h>
|
| #include <DXGI1_2.h>
|
|
|
| #include <memory>
|
|
|
| #include "webrtc/modules/desktop_capture/desktop_frame.h"
|
| #include "webrtc/modules/desktop_capture/desktop_geometry.h"
|
| +#include "webrtc/modules/desktop_capture/resolution_change_detector.h"
|
|
|
| namespace webrtc {
|
|
|
| @@ -27,14 +29,14 @@ class DxgiTexture {
|
| public:
|
| // Creates a DxgiTexture instance, which represents the |desktop_size| area of
|
| // entire screen -- usually a monitor on the system.
|
| - explicit DxgiTexture(const DesktopSize& desktop_size);
|
| + DxgiTexture();
|
|
|
| virtual ~DxgiTexture();
|
|
|
| // Copies selected regions of a frame represented by frame_info and resource.
|
| // Returns false if anything wrong.
|
| - virtual bool CopyFrom(const DXGI_OUTDUPL_FRAME_INFO& frame_info,
|
| - IDXGIResource* resource) = 0;
|
| + bool CopyFrom(const DXGI_OUTDUPL_FRAME_INFO& frame_info,
|
| + IDXGIResource* resource);
|
|
|
| const DesktopSize& desktop_size() const { return desktop_size_; }
|
|
|
| @@ -54,13 +56,18 @@ class DxgiTexture {
|
| const DesktopFrame& AsDesktopFrame();
|
|
|
| protected:
|
| - DXGI_MAPPED_RECT rect_ = {0};
|
| + DXGI_MAPPED_RECT* rect();
|
| +
|
| + virtual bool CopyFromTexture(const DXGI_OUTDUPL_FRAME_INFO& frame_info,
|
| + ID3D11Texture2D* texture) = 0;
|
|
|
| - private:
|
| virtual bool DoRelease() = 0;
|
|
|
| - const DesktopSize desktop_size_;
|
| + private:
|
| + DXGI_MAPPED_RECT rect_ = {0};
|
| + DesktopSize desktop_size_;
|
| std::unique_ptr<DesktopFrame> frame_;
|
| + ResolutionChangeDetector resolution_change_detector_;
|
| };
|
|
|
| } // namespace webrtc
|
|
|