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..c9838ad7a1e5d63c918da9b22fcde0c0276d0dac 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,12 @@ class DxgiDuplicatorController { |
// during first several capture attempts. |
bool EnsureFrameCaptured(Context* context, SharedDesktopFrame* target); |
+ // Moves |desktop_rect_| and all underlying |duplicators_|, putting top left |
+ // corner of the desktop at (0, 0). This is necessary because DXGI_OUTPUT_DESC |
+ // may return negative coordinates. Called from DoInitialize() after all |
+ // DxgiAdapterDuplicator and DxgiOutputDuplicator instances are initialized. |
+ void TranslateRect(); |
+ |
// This lock must be locked whenever accessing any of the following objects. |
rtc::CriticalSection lock_; |