Index: webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc |
diff --git a/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc b/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc |
index 13087cc9285daa71fcdc992c714144f36f0d4e0d..ba8d6257413dd6555c92be56ddb7a9b5cdde47cd 100644 |
--- a/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc |
+++ b/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc |
@@ -288,20 +288,23 @@ bool DxgiOutputDuplicator::DoDetectUpdatedRegion( |
dirty_rects_count = buff_size / sizeof(RECT); |
while (move_rects_count > 0) { |
- updated_region->AddRect( |
- RotateRect(DesktopRect::MakeXYWH(move_rects->SourcePoint.x, |
- move_rects->SourcePoint.y, |
- move_rects->DestinationRect.right - |
- move_rects->DestinationRect.left, |
- move_rects->DestinationRect.bottom - |
- move_rects->DestinationRect.top), |
- unrotated_size_, rotation_)); |
- updated_region->AddRect( |
- RotateRect(DesktopRect::MakeLTRB(move_rects->DestinationRect.left, |
- move_rects->DestinationRect.top, |
- move_rects->DestinationRect.right, |
- move_rects->DestinationRect.bottom), |
- unrotated_size_, rotation_)); |
+ if (move_rects->SourcePoint.x != move_rects->DestinationRect.left || |
Sergey Ulanov
2017/03/14 19:47:27
Do you know why the API returns unmoved rects? Do
Hzj_jie
2017/03/14 23:22:49
No idea about this. I just randomly tried this ide
|
+ move_rects->SourcePoint.y != move_rects->DestinationRect.top) { |
+ updated_region->AddRect( |
+ RotateRect(DesktopRect::MakeXYWH(move_rects->SourcePoint.x, |
+ move_rects->SourcePoint.y, |
+ move_rects->DestinationRect.right - |
+ move_rects->DestinationRect.left, |
+ move_rects->DestinationRect.bottom - |
+ move_rects->DestinationRect.top), |
+ unrotated_size_, rotation_)); |
+ updated_region->AddRect( |
+ RotateRect(DesktopRect::MakeLTRB(move_rects->DestinationRect.left, |
+ move_rects->DestinationRect.top, |
+ move_rects->DestinationRect.right, |
+ move_rects->DestinationRect.bottom), |
+ unrotated_size_, rotation_)); |
+ } |
move_rects++; |
move_rects_count--; |
} |