Chromium Code Reviews| 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..06b49547f0b6d95458ad75d2efb0924046757851 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_; } |
| @@ -57,10 +59,14 @@ class DxgiTexture { |
| DXGI_MAPPED_RECT rect_ = {0}; |
|
Sergey Ulanov
2017/02/15 01:38:52
BTW, style guide doesn't allow protected data fiel
|
| private: |
| + virtual bool CopyFromTexture(const DXGI_OUTDUPL_FRAME_INFO& frame_info, |
| + ID3D11Texture2D* texture) = 0; |
| + |
| virtual bool DoRelease() = 0; |
|
Sergey Ulanov
2017/02/10 19:58:25
These two methods are intended to be overwritten b
Hzj_jie
2017/02/11 01:51:22
In C++, private functions are also overrideable, t
Sergey Ulanov
2017/02/15 01:38:51
Right, private methods can still be overridden, bu
Hzj_jie
2017/02/15 03:53:16
I have no opinion on this. Indeed, some modern lan
|
| - const DesktopSize desktop_size_; |
| + DesktopSize desktop_size_; |
| std::unique_ptr<DesktopFrame> frame_; |
| + ResolutionChangeDetector resolution_change_detector_; |
| }; |
| } // namespace webrtc |