Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1488)

Unified Diff: cc/layers/video_frame_provider_client_impl.cc

Issue 2692873003: Mark Layer Damaged When The Client Is Gone (Closed)
Patch Set: Add unit test Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/layers/video_frame_provider_client_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/video_frame_provider_client_impl.cc
diff --git a/cc/layers/video_frame_provider_client_impl.cc b/cc/layers/video_frame_provider_client_impl.cc
index 751d32f83b29ee471b68dc2ba897464837f79fb0..35822333beb8a9966b6c58e3fe660d93626cc9b4 100644
--- a/cc/layers/video_frame_provider_client_impl.cc
+++ b/cc/layers/video_frame_provider_client_impl.cc
@@ -56,6 +56,7 @@ void VideoFrameProviderClientImpl::SetActiveVideoLayer(
void VideoFrameProviderClientImpl::Stop() {
DCHECK(thread_checker_.CalledOnValidThread());
+ active_video_layer_ = nullptr;
// It's called when the main thread is blocked, so lock isn't needed.
if (provider_) {
provider_->SetVideoFrameProviderClient(nullptr);
@@ -63,7 +64,6 @@ void VideoFrameProviderClientImpl::Stop() {
}
if (rendering_)
StopRendering();
- active_video_layer_ = nullptr;
stopped_ = true;
}
@@ -127,6 +127,8 @@ void VideoFrameProviderClientImpl::StopRendering() {
DCHECK(!stopped_);
client_->RemoveVideoFrameController(this);
rendering_ = false;
+ if (active_video_layer_)
+ active_video_layer_->SetNeedsRedraw();
}
void VideoFrameProviderClientImpl::DidReceiveFrame() {
« no previous file with comments | « no previous file | cc/layers/video_frame_provider_client_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698