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

Side by Side Diff: content/renderer/pepper/ppb_video_decoder_impl.cc

Issue 1816203003: Add an additional VDA::Flush() mode to return all allocated buffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/pepper/ppb_video_decoder_impl.h" 5 #include "content/renderer/pepper/ppb_video_decoder_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 } 205 }
206 206
207 int32_t PPB_VideoDecoder_Impl::Flush(scoped_refptr<TrackedCallback> callback) { 207 int32_t PPB_VideoDecoder_Impl::Flush(scoped_refptr<TrackedCallback> callback) {
208 if (!decoder_) 208 if (!decoder_)
209 return PP_ERROR_BADRESOURCE; 209 return PP_ERROR_BADRESOURCE;
210 210
211 if (!SetFlushCallback(callback)) 211 if (!SetFlushCallback(callback))
212 return PP_ERROR_INPROGRESS; 212 return PP_ERROR_INPROGRESS;
213 213
214 FlushCommandBuffer(); 214 FlushCommandBuffer();
215 decoder_->Flush(); 215 decoder_->Flush(false);
216 return PP_OK_COMPLETIONPENDING; 216 return PP_OK_COMPLETIONPENDING;
217 } 217 }
218 218
219 int32_t PPB_VideoDecoder_Impl::Reset(scoped_refptr<TrackedCallback> callback) { 219 int32_t PPB_VideoDecoder_Impl::Reset(scoped_refptr<TrackedCallback> callback) {
220 if (!decoder_) 220 if (!decoder_)
221 return PP_ERROR_BADRESOURCE; 221 return PP_ERROR_BADRESOURCE;
222 222
223 if (!SetResetCallback(callback)) 223 if (!SetResetCallback(callback))
224 return PP_ERROR_INPROGRESS; 224 return PP_ERROR_INPROGRESS;
225 225
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 DCHECK(RenderThreadImpl::current()); 295 DCHECK(RenderThreadImpl::current());
296 RunBitstreamBufferCallback(bitstream_buffer_id, PP_OK); 296 RunBitstreamBufferCallback(bitstream_buffer_id, PP_OK);
297 } 297 }
298 298
299 void PPB_VideoDecoder_Impl::NotifyFlushDone() { 299 void PPB_VideoDecoder_Impl::NotifyFlushDone() {
300 DCHECK(RenderThreadImpl::current()); 300 DCHECK(RenderThreadImpl::current());
301 RunFlushCallback(PP_OK); 301 RunFlushCallback(PP_OK);
302 } 302 }
303 303
304 } // namespace content 304 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698