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

* fix: osr stutter fix backport for electron.

* nit: chromium upstream patch link
This commit is contained in:
reito 2025-04-22 16:18:21 +08:00 committed by GitHub
parent 3ad87787f8
commit ac2c0c76fe
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