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

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, 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/shared_impl/ppb_video_decoder_shared.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 if (!platform_video_decoder_.get()) 209 FlushCommandBuffer();
210 return;
211 210
212 FlushCommandBuffer(); 211 if (platform_video_decoder_)
213 platform_video_decoder_.release()->Destroy(); 212 platform_video_decoder_.release()->Destroy();
213 ppp_videodecoder_ = NULL;
214
214 ::ppapi::PPB_VideoDecoder_Shared::Destroy(); 215 ::ppapi::PPB_VideoDecoder_Shared::Destroy();
215 ppp_videodecoder_ = NULL;
216 } 216 }
217 217
218 void PPB_VideoDecoder_Impl::ProvidePictureBuffers( 218 void PPB_VideoDecoder_Impl::ProvidePictureBuffers(
219 uint32 requested_num_of_buffers, 219 uint32 requested_num_of_buffers,
220 const gfx::Size& dimensions, 220 const gfx::Size& dimensions,
221 uint32 texture_target) { 221 uint32 texture_target) {
222 if (!ppp_videodecoder_) 222 if (!ppp_videodecoder_)
223 return; 223 return;
224 224
225 PP_Size out_dim = PP_MakeSize(dimensions.width(), dimensions.height()); 225 PP_Size out_dim = PP_MakeSize(dimensions.width(), dimensions.height());
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 void PPB_VideoDecoder_Impl::NotifyFlushDone() { 269 void PPB_VideoDecoder_Impl::NotifyFlushDone() {
270 RunFlushCallback(PP_OK); 270 RunFlushCallback(PP_OK);
271 } 271 }
272 272
273 void PPB_VideoDecoder_Impl::NotifyInitializeDone() { 273 void PPB_VideoDecoder_Impl::NotifyInitializeDone() {
274 NOTREACHED() << "PlatformVideoDecoder::Initialize() is synchronous!"; 274 NOTREACHED() << "PlatformVideoDecoder::Initialize() is synchronous!";
275 } 275 }
276 276
277 } // namespace ppapi 277 } // namespace ppapi
278 } // namespace webkit 278 } // namespace webkit
OLDNEW
« no previous file with comments | « ppapi/shared_impl/ppb_video_decoder_shared.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698