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

Side by Side Diff: webkit/plugins/ppapi/ppb_video_decoder_impl.cc

Issue 13123003: Flash: Don't lose a reference to the Graphics3D from the VideoDecoder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
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 "webkit/plugins/ppapi/ppb_video_decoder_impl.h" 5 #include "webkit/plugins/ppapi/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.h" 10 #include "base/message_loop.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 if (!SetResetCallback(callback)) 200 if (!SetResetCallback(callback))
201 return PP_ERROR_INPROGRESS; 201 return PP_ERROR_INPROGRESS;
202 202
203 FlushCommandBuffer(); 203 FlushCommandBuffer();
204 platform_video_decoder_->Reset(); 204 platform_video_decoder_->Reset();
205 return PP_OK_COMPLETIONPENDING; 205 return PP_OK_COMPLETIONPENDING;
206 } 206 }
207 207
208 void PPB_VideoDecoder_Impl::Destroy() { 208 void PPB_VideoDecoder_Impl::Destroy() {
209 FlushCommandBuffer();
210 PPB_VideoDecoder_Shared::Destroy();
piman 2013/03/27 22:48:31 Because this will release the context, I'd be some
danakj 2013/03/27 22:54:52 Oh, sounds good! Done.
211
209 if (!platform_video_decoder_.get()) 212 if (!platform_video_decoder_.get())
210 return; 213 return;
211 214
212 FlushCommandBuffer();
213 platform_video_decoder_.release()->Destroy(); 215 platform_video_decoder_.release()->Destroy();
214 ::ppapi::PPB_VideoDecoder_Shared::Destroy();
215 ppp_videodecoder_ = NULL; 216 ppp_videodecoder_ = NULL;
216 } 217 }
217 218
218 void PPB_VideoDecoder_Impl::ProvidePictureBuffers( 219 void PPB_VideoDecoder_Impl::ProvidePictureBuffers(
219 uint32 requested_num_of_buffers, 220 uint32 requested_num_of_buffers,
220 const gfx::Size& dimensions, 221 const gfx::Size& dimensions,
221 uint32 texture_target) { 222 uint32 texture_target) {
222 if (!ppp_videodecoder_) 223 if (!ppp_videodecoder_)
223 return; 224 return;
224 225
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 void PPB_VideoDecoder_Impl::NotifyFlushDone() { 270 void PPB_VideoDecoder_Impl::NotifyFlushDone() {
270 RunFlushCallback(PP_OK); 271 RunFlushCallback(PP_OK);
271 } 272 }
272 273
273 void PPB_VideoDecoder_Impl::NotifyInitializeDone() { 274 void PPB_VideoDecoder_Impl::NotifyInitializeDone() {
274 NOTREACHED() << "PlatformVideoDecoder::Initialize() is synchronous!"; 275 NOTREACHED() << "PlatformVideoDecoder::Initialize() is synchronous!";
275 } 276 }
276 277
277 } // namespace ppapi 278 } // namespace ppapi
278 } // namespace webkit 279 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698