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

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

Issue 7629004: Fix typo in PPB_VideoDecoder_Impl::Decode causing performance degradation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 const PP_VideoBitstreamBuffer_Dev* bitstream_buffer, 93 const PP_VideoBitstreamBuffer_Dev* bitstream_buffer,
94 PP_CompletionCallback callback) { 94 PP_CompletionCallback callback) {
95 if (!platform_video_decoder_) 95 if (!platform_video_decoder_)
96 return PP_ERROR_BADRESOURCE; 96 return PP_ERROR_BADRESOURCE;
97 97
98 EnterResourceNoLock<PPB_Buffer_API> enter(bitstream_buffer->data, true); 98 EnterResourceNoLock<PPB_Buffer_API> enter(bitstream_buffer->data, true);
99 if (enter.failed()) 99 if (enter.failed())
100 return PP_ERROR_FAILED; 100 return PP_ERROR_FAILED;
101 101
102 PPB_Buffer_Impl* buffer = static_cast<PPB_Buffer_Impl*>(enter.object()); 102 PPB_Buffer_Impl* buffer = static_cast<PPB_Buffer_Impl*>(enter.object());
103 media::BitstreamBuffer decode_buffer(bitstream_buffer->id, 103 media::BitstreamBuffer decode_buffer(
104 buffer->shared_memory()->handle(), 104 bitstream_buffer->id,
105 static_cast<size_t>(buffer->size())); 105 buffer->shared_memory()->handle(),
106 static_cast<size_t>(bitstream_buffer->size));
106 SetBitstreamBufferCallback(bitstream_buffer->id, callback); 107 SetBitstreamBufferCallback(bitstream_buffer->id, callback);
107 108
108 FlushCommandBuffer(); 109 FlushCommandBuffer();
109 platform_video_decoder_->Decode(decode_buffer); 110 platform_video_decoder_->Decode(decode_buffer);
110 return PP_OK_COMPLETIONPENDING; 111 return PP_OK_COMPLETIONPENDING;
111 } 112 }
112 113
113 void PPB_VideoDecoder_Impl::AssignPictureBuffers( 114 void PPB_VideoDecoder_Impl::AssignPictureBuffers(
114 uint32_t no_of_buffers, 115 uint32_t no_of_buffers,
115 const PP_PictureBuffer_Dev* buffers) { 116 const PP_PictureBuffer_Dev* buffers) {
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 void PPB_VideoDecoder_Impl::AddRefResource(PP_Resource resource) { 246 void PPB_VideoDecoder_Impl::AddRefResource(PP_Resource resource) {
246 ResourceTracker::Get()->AddRefResource(resource); 247 ResourceTracker::Get()->AddRefResource(resource);
247 } 248 }
248 249
249 void PPB_VideoDecoder_Impl::UnrefResource(PP_Resource resource) { 250 void PPB_VideoDecoder_Impl::UnrefResource(PP_Resource resource) {
250 ResourceTracker::Get()->UnrefResource(resource); 251 ResourceTracker::Get()->UnrefResource(resource);
251 } 252 }
252 253
253 } // namespace ppapi 254 } // namespace ppapi
254 } // namespace webkit 255 } // namespace webkit
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698