Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ScreenCaptureKitCaptureSource should not reconfigure if video effect …
…is on but overlay rect is not filled rdar://127882407 https://bugs.webkit.org/show_bug.cgi?id=274076 Reviewed by Eric Carlson and Jean-Yves Avenard. In rdar://125925090, https://commits.webkit.org/278390@main, we started detecting presenter overlay mode by looking at SCStreamFrameInfoPresenterOverlayContentRect. We were checking whether the origin was not (0, 0) and not (Inf, Inf). (0, 0) is to ensure we are not in small overlay mode. (Inf, Inf) was to ensure there was some overlay. When starting large presenter overlay mode, (Inf, Inf) may be used for a couple of video frames, in particular when going from small to large overlay mode. This triggered sometimes reconfiguration, which was further delaying a correct overlay, ending in a loop of reconfiguration. To prevent this, we only allow reconfiguration when we are sure we are in small presenter overlay mode, thus origin is (0, 0). We rename hasLargePresenterOverlay to shouldDisallowReconfiguration as this is more consistent. Manually tested. * Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm: (WebCore::ScreenCaptureKitCaptureSource::streamDidOutputVideoSampleBuffer): Canonical link: https://commits.webkit.org/278685@main
- Loading branch information