Chromium Code Reviews| Index: webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h |
| diff --git a/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h b/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h |
| index 364690bcb933ed667038993210cb4943e6ad4cc7..c28eeb4bd39df8ed1b51d3939e63a528f6530484 100644 |
| --- a/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h |
| +++ b/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h |
| @@ -158,9 +158,7 @@ class DxgiDuplicatorController { |
| // The minimum GetNumFramesCaptured() returned by |duplicators_|. |
| int64_t GetNumFramesCaptured() const; |
| - // Returns a DesktopSize to cover entire desktop_rect. This may be different |
| - // than desktop_rect().size(), since top-left of the screen does not need to |
| - // be started from (0, 0). |
| + // Returns a DesktopSize to cover entire |desktop_rect_|. |
| DesktopSize desktop_size() const; |
| // Returns the size of one screen. |id| should be >= 0. If system does not |
| @@ -181,6 +179,16 @@ class DxgiDuplicatorController { |
| // during first several capture attempts. |
| bool EnsureFrameCaptured(Context* context, SharedDesktopFrame* target); |
| + // Moves |desktop_rect_| and all underlying |duplicators_| to (0, 0). |
| + // DXGI_OUTPUT_DESC may return negative values in DesktopCoordinate, which is |
| + // not consistent with the requirement of DesktopFrame. But we cannot get the |
| + // size of desktop without initializing all the DxgiAdapterDuplicator and |
| + // DxgiOutputDuplicator instances. So this is a helper function to "move" the |
| + // entire screen from any quadrant to (0, 0). This function is expected to be |
| + // executed in DoInitialize() only. |
|
Sergey Ulanov
2017/04/28 01:15:02
Suggest rewording it a bit to simplify:
// Move
Hzj_jie
2017/04/28 01:58:32
Done.
|
| + // This comment makes this piece of logic deserve a standalone function. |
|
Sergey Ulanov
2017/04/28 01:15:02
I don't think you need this sentence.
Hzj_jie
2017/04/28 01:58:32
Done.
|
| + void Translate(); |
|
Sergey Ulanov
2017/04/28 01:15:02
TranslateDesktopRect()?
Hzj_jie
2017/04/28 01:58:32
Done.
|
| + |
| // This lock must be locked whenever accessing any of the following objects. |
| rtc::CriticalSection lock_; |