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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 uint32 requested_num_of_buffers, | 306 uint32 requested_num_of_buffers, |
307 const gfx::Size& dimensions, | 307 const gfx::Size& dimensions, |
308 uint32 texture_target) { | 308 uint32 texture_target) { |
309 RequestTextures(requested_num_of_buffers, | 309 RequestTextures(requested_num_of_buffers, |
310 dimensions, | 310 dimensions, |
311 texture_target, | 311 texture_target, |
312 std::vector<gpu::Mailbox>()); | 312 std::vector<gpu::Mailbox>()); |
313 } | 313 } |
314 | 314 |
315 void PepperVideoDecoderHost::PictureReady(const media::Picture& picture) { | 315 void PepperVideoDecoderHost::PictureReady(const media::Picture& picture) { |
316 // So far picture.visible_rect is not used. If used, visible_rect should | |
317 // be validated since it comes from GPU process and may not be trustworthy. | |
318 host()->SendUnsolicitedReply( | 316 host()->SendUnsolicitedReply( |
319 pp_resource(), | 317 pp_resource(), |
320 PpapiPluginMsg_VideoDecoder_PictureReady(picture.bitstream_buffer_id(), | 318 PpapiPluginMsg_VideoDecoder_PictureReady(picture.bitstream_buffer_id(), |
321 picture.picture_buffer_id())); | 319 picture.picture_buffer_id())); |
322 } | 320 } |
323 | 321 |
324 void PepperVideoDecoderHost::DismissPictureBuffer(int32 picture_buffer_id) { | 322 void PepperVideoDecoderHost::DismissPictureBuffer(int32 picture_buffer_id) { |
325 host()->SendUnsolicitedReply( | 323 host()->SendUnsolicitedReply( |
326 pp_resource(), | 324 pp_resource(), |
327 PpapiPluginMsg_VideoDecoder_DismissPicture(picture_buffer_id)); | 325 PpapiPluginMsg_VideoDecoder_DismissPicture(picture_buffer_id)); |
(...skipping 72 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 |