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

Side by Side Diff: ppapi/proxy/ppb_video_decoder_proxy.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 | « no previous file | ppapi/shared_impl/ppb_video_decoder_shared.cc » ('j') | 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 "ppapi/proxy/ppb_video_decoder_proxy.h" 5 #include "ppapi/proxy/ppb_video_decoder_proxy.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "gpu/command_buffer/client/gles2_implementation.h" 8 #include "gpu/command_buffer/client/gles2_implementation.h"
9 #include "ppapi/proxy/enter_proxy.h" 9 #include "ppapi/proxy/enter_proxy.h"
10 #include "ppapi/proxy/plugin_dispatcher.h" 10 #include "ppapi/proxy/plugin_dispatcher.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 void EndOfBitstreamACK(int32_t buffer_id, int32_t result); 54 void EndOfBitstreamACK(int32_t buffer_id, int32_t result);
55 55
56 DISALLOW_COPY_AND_ASSIGN(VideoDecoder); 56 DISALLOW_COPY_AND_ASSIGN(VideoDecoder);
57 }; 57 };
58 58
59 VideoDecoder::VideoDecoder(const HostResource& decoder) 59 VideoDecoder::VideoDecoder(const HostResource& decoder)
60 : PPB_VideoDecoder_Shared(decoder) { 60 : PPB_VideoDecoder_Shared(decoder) {
61 } 61 }
62 62
63 VideoDecoder::~VideoDecoder() { 63 VideoDecoder::~VideoDecoder() {
64 FlushCommandBuffer();
65 PPB_VideoDecoder_Shared::Destroy();
64 } 66 }
65 67
66 int32_t VideoDecoder::Decode( 68 int32_t VideoDecoder::Decode(
67 const PP_VideoBitstreamBuffer_Dev* bitstream_buffer, 69 const PP_VideoBitstreamBuffer_Dev* bitstream_buffer,
68 scoped_refptr<TrackedCallback> callback) { 70 scoped_refptr<TrackedCallback> callback) {
69 EnterResourceNoLock<PPB_Buffer_API> 71 EnterResourceNoLock<PPB_Buffer_API>
70 enter_buffer(bitstream_buffer->data, true); 72 enter_buffer(bitstream_buffer->data, true);
71 if (enter_buffer.failed()) 73 if (enter_buffer.failed())
72 return PP_ERROR_BADRESOURCE; 74 return PP_ERROR_BADRESOURCE;
73 75
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 311
310 void PPB_VideoDecoder_Proxy::OnMsgResetACK( 312 void PPB_VideoDecoder_Proxy::OnMsgResetACK(
311 const HostResource& decoder, int32_t result) { 313 const HostResource& decoder, int32_t result) {
312 EnterPluginFromHostResource<PPB_VideoDecoder_API> enter(decoder); 314 EnterPluginFromHostResource<PPB_VideoDecoder_API> enter(decoder);
313 if (enter.succeeded()) 315 if (enter.succeeded())
314 static_cast<VideoDecoder*>(enter.object())->ResetACK(result); 316 static_cast<VideoDecoder*>(enter.object())->ResetACK(result);
315 } 317 }
316 318
317 } // namespace proxy 319 } // namespace proxy
318 } // namespace ppapi 320 } // namespace ppapi
OLDNEW
« no previous file with comments | « no previous file | ppapi/shared_impl/ppb_video_decoder_shared.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698