| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 "content/renderer/pepper/pepper_video_decoder_host.h" | 5 #include "content/renderer/pepper/pepper_video_decoder_host.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/shared_memory.h" | 8 #include "base/memory/shared_memory.h" |
| 9 #include "content/common/gpu/client/gpu_channel_host.h" | 9 #include "content/common/gpu/client/gpu_channel_host.h" |
| 10 #include "content/public/renderer/render_thread.h" | 10 #include "content/public/renderer/render_thread.h" |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 decoder_->AssignPictureBuffers(picture_buffers); | 262 decoder_->AssignPictureBuffers(picture_buffers); |
| 263 return PP_OK; | 263 return PP_OK; |
| 264 } | 264 } |
| 265 | 265 |
| 266 int32_t PepperVideoDecoderHost::OnHostMsgRecyclePicture( | 266 int32_t PepperVideoDecoderHost::OnHostMsgRecyclePicture( |
| 267 ppapi::host::HostMessageContext* context, | 267 ppapi::host::HostMessageContext* context, |
| 268 uint32_t texture_id) { | 268 uint32_t texture_id) { |
| 269 if (!initialized_) | 269 if (!initialized_) |
| 270 return PP_ERROR_FAILED; | 270 return PP_ERROR_FAILED; |
| 271 DCHECK(decoder_); | 271 DCHECK(decoder_); |
| 272 if (reset_reply_context_.is_valid()) | |
| 273 return PP_ERROR_FAILED; | |
| 274 | 272 |
| 275 decoder_->ReusePictureBuffer(texture_id); | 273 decoder_->ReusePictureBuffer(texture_id); |
| 276 return PP_OK; | 274 return PP_OK; |
| 277 } | 275 } |
| 278 | 276 |
| 279 int32_t PepperVideoDecoderHost::OnHostMsgFlush( | 277 int32_t PepperVideoDecoderHost::OnHostMsgFlush( |
| 280 ppapi::host::HostMessageContext* context) { | 278 ppapi::host::HostMessageContext* context) { |
| 281 if (!initialized_) | 279 if (!initialized_) |
| 282 return PP_ERROR_FAILED; | 280 return PP_ERROR_FAILED; |
| 283 DCHECK(decoder_); | 281 DCHECK(decoder_); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 host()->SendUnsolicitedReply( | 398 host()->SendUnsolicitedReply( |
| 401 pp_resource(), | 399 pp_resource(), |
| 402 PpapiPluginMsg_VideoDecoder_RequestTextures( | 400 PpapiPluginMsg_VideoDecoder_RequestTextures( |
| 403 requested_num_of_buffers, | 401 requested_num_of_buffers, |
| 404 PP_MakeSize(dimensions.width(), dimensions.height()), | 402 PP_MakeSize(dimensions.width(), dimensions.height()), |
| 405 texture_target, | 403 texture_target, |
| 406 mailboxes)); | 404 mailboxes)); |
| 407 } | 405 } |
| 408 | 406 |
| 409 } // namespace content | 407 } // namespace content |
| OLD | NEW |