Title: [285754] branches/safari-612.3.6.1-branch/Source/WebCore
- Revision
- 285754
- Author
- repst...@apple.com
- Date
- 2021-11-12 15:54:32 -0800 (Fri, 12 Nov 2021)
Log Message
Revert r285680. rdar://problem/85004449
Modified Paths
Diff
Modified: branches/safari-612.3.6.1-branch/Source/WebCore/ChangeLog (285753 => 285754)
--- branches/safari-612.3.6.1-branch/Source/WebCore/ChangeLog 2021-11-12 23:54:15 UTC (rev 285753)
+++ branches/safari-612.3.6.1-branch/Source/WebCore/ChangeLog 2021-11-12 23:54:32 UTC (rev 285754)
@@ -1,3 +1,7 @@
+2021-11-12 Russell Epstein <repst...@apple.com>
+
+ Revert r285680. rdar://problem/85004449
+
2021-11-11 Alan Coon <alanc...@apple.com>
Cherry-pick r285531. rdar://problem/83381842
Modified: branches/safari-612.3.6.1-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h (285753 => 285754)
--- branches/safari-612.3.6.1-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h 2021-11-12 23:54:15 UTC (rev 285753)
+++ branches/safari-612.3.6.1-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h 2021-11-12 23:54:32 UTC (rev 285754)
@@ -419,7 +419,6 @@
mutable long long m_cachedTotalBytes { 0 };
unsigned m_pendingStatusChanges { 0 };
int m_cachedItemStatus;
- int m_runLoopNestingLevel { 0 };
MediaPlayer::BufferingPolicy m_bufferingPolicy { MediaPlayer::BufferingPolicy::Default };
bool m_cachedLikelyToKeepUp { false };
bool m_cachedBufferEmpty { false };
@@ -439,6 +438,7 @@
mutable bool m_allowsWirelessVideoPlayback { true };
bool m_shouldPlayToPlaybackTarget { false };
#endif
+ bool m_runningModalPaint { false };
bool m_waitForVideoOutputMediaDataWillChangeTimedOut { false };
bool m_haveBeenAskedToPaint { false };
};
Modified: branches/safari-612.3.6.1-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (285753 => 285754)
--- branches/safari-612.3.6.1-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2021-11-12 23:54:15 UTC (rev 285753)
+++ branches/safari-612.3.6.1-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2021-11-12 23:54:32 UTC (rev 285754)
@@ -2563,31 +2563,21 @@
{
if (m_waitForVideoOutputMediaDataWillChangeTimedOut)
return;
+ [m_videoOutput requestNotificationOfMediaDataChangeWithAdvanceInterval:0];
// Wait for 1 second.
MonotonicTime start = MonotonicTime::now();
- std::optional<RunLoop::Timer<MediaPlayerPrivateAVFoundationObjC>> timeoutTimer;
+ RunLoop::Timer<MediaPlayerPrivateAVFoundationObjC> timeoutTimer { RunLoop::main(), [] {
+ RunLoop::main().stop();
+ } };
+ timeoutTimer.startOneShot(1_s);
- if (!m_runLoopNestingLevel) {
- [m_videoOutput requestNotificationOfMediaDataChangeWithAdvanceInterval:0];
-
- timeoutTimer.emplace(RunLoop::main(), [&] {
- RunLoop::main().stop();
- });
- timeoutTimer->startOneShot(1_s);
- }
-
- ++m_runLoopNestingLevel;
+ m_runningModalPaint = true;
RunLoop::run();
- --m_runLoopNestingLevel;
+ m_runningModalPaint = false;
- if (m_runLoopNestingLevel) {
- RunLoop::main().stop();
- return;
- }
-
- bool satisfied = timeoutTimer->isActive();
+ bool satisfied = timeoutTimer.isActive();
if (!satisfied) {
ERROR_LOG(LOGIDENTIFIER, "timed out");
m_waitForVideoOutputMediaDataWillChangeTimedOut = true;
@@ -2597,7 +2587,7 @@
void MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange()
{
- if (m_runLoopNestingLevel)
+ if (m_runningModalPaint)
RunLoop::main().stop();
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes