diff options
3 files changed, 3 insertions, 32 deletions
diff --git a/chromium/third_party/blink/renderer/modules/mediastream/webmediaplayer_ms.cc b/chromium/third_party/blink/renderer/modules/mediastream/webmediaplayer_ms.cc index d73c02e43fb..4d4d7e98871 100644 --- a/chromium/third_party/blink/renderer/modules/mediastream/webmediaplayer_ms.cc +++ b/chromium/third_party/blink/renderer/modules/mediastream/webmediaplayer_ms.cc @@ -403,9 +403,6 @@ WebMediaPlayerMS::~WebMediaPlayerMS() { if (frame_deliverer_) io_task_runner_->DeleteSoon(FROM_HERE, frame_deliverer_.release()); - if (compositor_) - compositor_->StopUsingProvider(); - if (video_frame_provider_) video_frame_provider_->Stop(); diff --git a/chromium/third_party/blink/renderer/modules/mediastream/webmediaplayer_ms_compositor.cc b/chromium/third_party/blink/renderer/modules/mediastream/webmediaplayer_ms_compositor.cc index ccec5c67f5b..7ac02b2b986 100644 --- a/chromium/third_party/blink/renderer/modules/mediastream/webmediaplayer_ms_compositor.cc +++ b/chromium/third_party/blink/renderer/modules/mediastream/webmediaplayer_ms_compositor.cc @@ -236,13 +236,8 @@ WebMediaPlayerMSCompositor::WebMediaPlayerMSCompositor( WebMediaPlayerMSCompositor::~WebMediaPlayerMSCompositor() { // Ensured by destructor traits. DCHECK(video_frame_compositor_task_runner_->BelongsToCurrentThread()); - - if (submitter_) { - video_frame_compositor_task_runner_->DeleteSoon(FROM_HERE, - std::move(submitter_)); - } else { - DCHECK(!video_frame_provider_client_) - << "Must call StopUsingProvider() before dtor!"; + if (video_frame_provider_client_) { + video_frame_provider_client_->StopUsingProvider(); } } @@ -262,7 +257,7 @@ void WebMediaPlayerMSCompositorTraits::Destruct( void WebMediaPlayerMSCompositor::InitializeSubmitter() { DCHECK(video_frame_compositor_task_runner_->BelongsToCurrentThread()); - submitter_->Initialize(this, /* is_media_stream = */ true); + submitter_->Initialize(this, /*is_media_stream=*/true); } void WebMediaPlayerMSCompositor::SetIsSurfaceVisible( @@ -609,15 +604,6 @@ void WebMediaPlayerMSCompositor::ReplaceCurrentFrameWithACopy() { WrapRefCounted(this)))); } -void WebMediaPlayerMSCompositor::StopUsingProvider() { - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); - PostCrossThreadTask( - *video_frame_compositor_task_runner_, FROM_HERE, - CrossThreadBindOnce( - &WebMediaPlayerMSCompositor::StopUsingProviderInternal, - WrapRefCounted(this))); -} - bool WebMediaPlayerMSCompositor::MapTimestampsToRenderTimeTicks( const std::vector<base::TimeDelta>& timestamps, std::vector<base::TimeTicks>* wall_clock_times) { @@ -853,13 +839,6 @@ void WebMediaPlayerMSCompositor::StopRenderingInternal() { video_frame_provider_client_->StopRendering(); } -void WebMediaPlayerMSCompositor::StopUsingProviderInternal() { - DCHECK(video_frame_compositor_task_runner_->BelongsToCurrentThread()); - if (video_frame_provider_client_) - video_frame_provider_client_->StopUsingProvider(); - video_frame_provider_client_ = nullptr; -} - void WebMediaPlayerMSCompositor::ReplaceCurrentFrameWithACopyInternal() { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); scoped_refptr<media::VideoFrame> current_frame_ref; diff --git a/chromium/third_party/blink/renderer/modules/mediastream/webmediaplayer_ms_compositor.h b/chromium/third_party/blink/renderer/modules/mediastream/webmediaplayer_ms_compositor.h index 59b1a60b7bc..a2d8761d561 100644 --- a/chromium/third_party/blink/renderer/modules/mediastream/webmediaplayer_ms_compositor.h +++ b/chromium/third_party/blink/renderer/modules/mediastream/webmediaplayer_ms_compositor.h @@ -116,10 +116,6 @@ class MODULES_EXPORT WebMediaPlayerMSCompositor void StopRendering(); void ReplaceCurrentFrameWithACopy(); - // Tell |video_frame_provider_client_| to stop using this instance in - // preparation for dtor. - void StopUsingProvider(); - // Sets a hook to be notified when a new frame is presented, to fulfill a // prending video.requestAnimationFrame() request. // Can be called from any thread. @@ -202,7 +198,6 @@ class MODULES_EXPORT WebMediaPlayerMSCompositor void StartRenderingInternal(); void StopRenderingInternal(); - void StopUsingProviderInternal(); void ReplaceCurrentFrameWithACopyInternal(); void SetAlgorithmEnabledForTesting(bool algorithm_enabled); |