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

Unified Diff: content/common/gpu/media/vaapi_h264_decoder.cc

Issue 11092054: Teach BindToLoop to create callbacks that accept scoped parameters. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: xhwang CR Created 8 years, 2 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
Index: content/common/gpu/media/vaapi_h264_decoder.cc
diff --git a/content/common/gpu/media/vaapi_h264_decoder.cc b/content/common/gpu/media/vaapi_h264_decoder.cc
index ca107e130ecff2e41930a890e69fd9877446a62c..c832609e2f7d53753ced4b33edc9d7ffdc58edfd 100644
--- a/content/common/gpu/media/vaapi_h264_decoder.cc
+++ b/content/common/gpu/media/vaapi_h264_decoder.cc
@@ -1062,15 +1062,16 @@ bool VaapiH264Decoder::DecodePicture() {
DVLOG(4) << "Pending slice bufs to commit: " << pending_slice_bufs_.size();
DCHECK(pending_slice_bufs_.size());
- std::queue<VABufferID>* va_bufs = new std::queue<VABufferID>();
+ scoped_ptr<std::queue<VABufferID> > va_bufs(new std::queue<VABufferID>());
std::swap(*va_bufs, pending_va_bufs_);
- std::queue<VABufferID>* slice_bufs = new std::queue<VABufferID>();
+ scoped_ptr<std::queue<VABufferID> > slice_bufs(new std::queue<VABufferID>());
std::swap(*slice_bufs, pending_slice_bufs_);
// Fire up a parallel job on the GPU on the ChildThread to decode and put
// the decoded/converted/scaled picture into the pixmap.
// Callee will take care of freeing the buffer queues.
- submit_decode_cb_.Run(dec_surface->picture_buffer_id(), va_bufs, slice_bufs);
+ submit_decode_cb_.Run(
+ dec_surface->picture_buffer_id(), va_bufs.Pass(), slice_bufs.Pass());
// Used to notify clients that we had sufficient data to start decoding
// a new frame.
« no previous file with comments | « content/common/gpu/media/vaapi_h264_decoder.h ('k') | content/common/gpu/media/vaapi_video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698