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

Unified Diff: media/filters/video_renderer_base.cc

Issue 9717021: Make Callback::Reset() return a copy to support use-cases where Run() ends up modifying |*this|. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 9 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
« base/callback_unittest.cc ('K') | « media/filters/gpu_video_decoder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/video_renderer_base.cc
diff --git a/media/filters/video_renderer_base.cc b/media/filters/video_renderer_base.cc
index b4c256846a9912ce99d5fad96f75a7f6ab52406a..9e4d54320a6923f9b48485e8c54a46b554403fad 100644
--- a/media/filters/video_renderer_base.cc
+++ b/media/filters/video_renderer_base.cc
@@ -362,7 +362,7 @@ void VideoRendererBase::FrameReady(scoped_refptr<VideoFrame> frame) {
// A new seek will be requested after this one completes so there is no
// point trying to collect more frames.
state_ = kPrerolled;
- ResetAndRunCB(&seek_cb_, PIPELINE_OK);
+ seek_cb_.ResetAndRun(PIPELINE_OK);
return;
}
@@ -421,7 +421,7 @@ void VideoRendererBase::FrameReady(scoped_refptr<VideoFrame> frame) {
// ...and we're done seeking!
DCHECK(!seek_cb_.is_null());
- ResetAndRunCB(&seek_cb_, PIPELINE_OK);
+ seek_cb_.ResetAndRun(PIPELINE_OK);
base::AutoUnlock ul(lock_);
paint_cb_.Run();
@@ -452,7 +452,7 @@ void VideoRendererBase::AttemptFlush_Locked() {
if (!pending_paint_ && !pending_read_) {
state_ = kFlushed;
current_frame_ = NULL;
- ResetAndRunCB(&flush_cb_);
+ flush_cb_.ResetAndRun();
}
}
« base/callback_unittest.cc ('K') | « media/filters/gpu_video_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698