mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 13:20:44 +01:00
Fix 'Screen flickering on ScreenCapturerWinDirectx'
Bug: webrtc:15718 Change-Id: I230a0a7d196a4a3aea3b3e47cdf4f47c437e7196 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330800 Commit-Queue: Mark Foltz <mfoltz@chromium.org> Reviewed-by: Zijie He <zijiehe@chromium.org> Reviewed-by: Mark Foltz <mfoltz@chromium.org> Cr-Commit-Position: refs/heads/main@{#42177}
This commit is contained in:
parent
3772354f0c
commit
decc48fd97
2 changed files with 8 additions and 0 deletions
1
AUTHORS
1
AUTHORS
|
@ -121,6 +121,7 @@ Silviu Caragea <silviu.cpp@gmail.com>
|
|||
Stefan Gula <steweg@gmail.com>
|
||||
Stephan Hartmann <stha09@googlemail.com>
|
||||
Steve Reid <sreid@sea-to-sky.net>
|
||||
Tao chen <meemetao@gmail.com>
|
||||
Takaaki Suzuki <takaakisuzuki.14@gmail.com>
|
||||
Tarun Chawla <trnkumarchawla@gmail.com>
|
||||
Todd Wong <todd.wong.ndq@gmail.com>
|
||||
|
|
|
@ -500,6 +500,13 @@ bool DxgiDuplicatorController::EnsureFrameCaptured(Context* context,
|
|||
// ensure the video adapter has time to update the screen.
|
||||
webrtc::SleepMs(ms_per_frame);
|
||||
}
|
||||
// When capturing multiple monitors, we need to update the captured region to
|
||||
// prevent flickering by re-setting context. See
|
||||
// https://crbug.com/webrtc/15718 for details.
|
||||
if (shared_frame != target) {
|
||||
context->Reset();
|
||||
Setup(context);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue