| 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 122ad1f6e159cab692eb28394588145173f075f2..9c0f14c43d2a8a1552d9c0c619a81a0ef7c2b218 100644
|
| --- a/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc
|
| +++ b/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc
|
| @@ -163,8 +163,8 @@ bool DxgiOutputDuplicator::Duplicate(Context* context,
|
| const DesktopFrame& source = texture_->AsDesktopFrame();
|
| for (DesktopRegion::Iterator it(updated_region); !it.IsAtEnd();
|
| it.Advance()) {
|
| - target->CopyPixelsFrom(source, SourceRect(it.rect()).top_left(),
|
| - TargetRect(it.rect(), offset));
|
| + target->CopyPixelsFrom(
|
| + source, SourceRect(it.rect()).top_left(), it.rect());
|
| }
|
| last_frame_ = target->Share();
|
| last_frame_offset_ = offset;
|
| @@ -177,8 +177,7 @@ bool DxgiOutputDuplicator::Duplicate(Context* context,
|
| // export last frame to the target.
|
| for (DesktopRegion::Iterator it(updated_region); !it.IsAtEnd();
|
| it.Advance()) {
|
| - target->CopyPixelsFrom(*last_frame_, SourceRect(it.rect()).top_left(),
|
| - TargetRect(it.rect(), offset));
|
| + target->CopyPixelsFrom(*last_frame_, it.rect().top_left(), it.rect());
|
| }
|
| target->mutable_updated_region()->AddRegion(updated_region);
|
| }
|
| @@ -302,11 +301,4 @@ DesktopRect DxgiOutputDuplicator::SourceRect(DesktopRect rect) {
|
| return rect;
|
| }
|
|
|
| -DesktopRect DxgiOutputDuplicator::TargetRect(DesktopRect rect,
|
| - DesktopVector offset) {
|
| - rect = SourceRect(rect);
|
| - rect.Translate(offset);
|
| - return rect;
|
| -}
|
| -
|
| } // namespace webrtc
|
|
|