fix: osr stutter fix backport for electron. (#46709)

* fix: osr stutter fix backport for electron.

* nit: chromium upstream patch link

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: reito <cnschwarzer@qq.com>
This commit is contained in:
trop[bot] 2025-04-22 11:40:35 -05:00 committed by GitHub
parent 8f40f8126e
commit b0d4c12247
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 296 additions and 0 deletions

View file

@ -28,6 +28,11 @@ OffScreenVideoConsumer::OffScreenVideoConsumer(
video_capturer_->SetMinSizeChangePeriod(base::TimeDelta());
video_capturer_->SetFormat(media::PIXEL_FORMAT_ARGB);
// https://crrev.org/c/6438681
// Disable capturer's animation lock-in feature for offscreen capture to
// avoid output stutter.
video_capturer_->SetAnimationFpsLockIn(false, 1);
// Previous design of OSR try to set the resolution constraint to match the
// view's size. It is actually not necessary and creates faulty textures
// when the window/view's size changes frequently. The constraint may not