| OLD | NEW |
| 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 PP_VideoBitstreamBuffer_Dev bitstream = { id, buffer.host_resource(), size }; | 240 PP_VideoBitstreamBuffer_Dev bitstream = { id, buffer.host_resource(), size }; |
| 241 enter.SetResult(enter.object()->Decode(&bitstream, enter.callback())); | 241 enter.SetResult(enter.object()->Decode(&bitstream, enter.callback())); |
| 242 } | 242 } |
| 243 | 243 |
| 244 void PPB_VideoDecoder_Proxy::OnMsgAssignPictureBuffers( | 244 void PPB_VideoDecoder_Proxy::OnMsgAssignPictureBuffers( |
| 245 const HostResource& decoder, | 245 const HostResource& decoder, |
| 246 const std::vector<PP_PictureBuffer_Dev>& buffers) { | 246 const std::vector<PP_PictureBuffer_Dev>& buffers) { |
| 247 EnterHostFromHostResource<PPB_VideoDecoder_Dev_API> enter(decoder); | 247 EnterHostFromHostResource<PPB_VideoDecoder_Dev_API> enter(decoder); |
| 248 if (enter.succeeded() && !buffers.empty()) { | 248 if (enter.succeeded() && !buffers.empty()) { |
| 249 const PP_PictureBuffer_Dev* buffer_array = &buffers.front(); | 249 const PP_PictureBuffer_Dev* buffer_array = &buffers.front(); |
| 250 enter.object()->AssignPictureBuffers(buffers.size(), buffer_array); | 250 enter.object()->AssignPictureBuffers( |
| 251 static_cast<uint32_t>(buffers.size()), buffer_array); |
| 251 } | 252 } |
| 252 } | 253 } |
| 253 | 254 |
| 254 void PPB_VideoDecoder_Proxy::OnMsgReusePictureBuffer( | 255 void PPB_VideoDecoder_Proxy::OnMsgReusePictureBuffer( |
| 255 const HostResource& decoder, int32 picture_buffer_id) { | 256 const HostResource& decoder, int32 picture_buffer_id) { |
| 256 EnterHostFromHostResource<PPB_VideoDecoder_Dev_API> enter(decoder); | 257 EnterHostFromHostResource<PPB_VideoDecoder_Dev_API> enter(decoder); |
| 257 if (enter.succeeded()) | 258 if (enter.succeeded()) |
| 258 enter.object()->ReusePictureBuffer(picture_buffer_id); | 259 enter.object()->ReusePictureBuffer(picture_buffer_id); |
| 259 } | 260 } |
| 260 | 261 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 | 315 |
| 315 void PPB_VideoDecoder_Proxy::OnMsgResetACK( | 316 void PPB_VideoDecoder_Proxy::OnMsgResetACK( |
| 316 const HostResource& decoder, int32_t result) { | 317 const HostResource& decoder, int32_t result) { |
| 317 EnterPluginFromHostResource<PPB_VideoDecoder_Dev_API> enter(decoder); | 318 EnterPluginFromHostResource<PPB_VideoDecoder_Dev_API> enter(decoder); |
| 318 if (enter.succeeded()) | 319 if (enter.succeeded()) |
| 319 static_cast<VideoDecoder*>(enter.object())->ResetACK(result); | 320 static_cast<VideoDecoder*>(enter.object())->ResetACK(result); |
| 320 } | 321 } |
| 321 | 322 |
| 322 } // namespace proxy | 323 } // namespace proxy |
| 323 } // namespace ppapi | 324 } // namespace ppapi |
| OLD | NEW |