diff options
author | Bill Budge <bbudge@google.com> | 2014-11-06 14:31:21 -0800 |
---|---|---|
committer | Bill Budge <bbudge@google.com> | 2014-11-06 22:33:05 +0000 |
commit | 2d4bf3a9f724cfc78d43b6b247397ca76d39b3f4 (patch) | |
tree | cc1a0628d5b00476df5bb8a25cca91ce5df3710a /content/renderer | |
parent | 0270f3e42d769d55807d925daaacf7cb4f60e807 (diff) | |
download | chromium_src-2d4bf3a9f724cfc78d43b6b247397ca76d39b3f4.zip chromium_src-2d4bf3a9f724cfc78d43b6b247397ca76d39b3f4.tar.gz chromium_src-2d4bf3a9f724cfc78d43b6b247397ca76d39b3f4.tar.bz2 |
Pepper: Expose visible_rect to PPB_VideoDecoder.GetPicture.
Adds an out parameter to GetPicture to return the subrectangle of
the picture texture that contains the picture.
Adds a new 0.3 version of PPB_VideoDecoder.
BUG=429071
NOPRESUBMIT=true
R=binji@chromium.org, dmichael@chromium.org, mpearson@chromium.org, tsepez@chromium.org
Review URL: https://codereview.chromium.org/703753002
Cr-Commit-Position: refs/heads/master@{#303102}
Diffstat (limited to 'content/renderer')
-rw-r--r-- | content/renderer/pepper/pepper_video_decoder_host.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/content/renderer/pepper/pepper_video_decoder_host.cc b/content/renderer/pepper/pepper_video_decoder_host.cc index 086c150..02e14f3 100644 --- a/content/renderer/pepper/pepper_video_decoder_host.cc +++ b/content/renderer/pepper/pepper_video_decoder_host.cc @@ -9,6 +9,7 @@ #include "content/common/gpu/client/gpu_channel_host.h" #include "content/public/renderer/render_thread.h" #include "content/public/renderer/renderer_ppapi_host.h" +#include "content/renderer/pepper/gfx_conversion.h" #include "content/renderer/pepper/ppb_graphics_3d_impl.h" #include "content/renderer/pepper/video_decoder_shim.h" #include "media/video/video_decode_accelerator.h" @@ -314,12 +315,13 @@ void PepperVideoDecoderHost::ProvidePictureBuffers( } void PepperVideoDecoderHost::PictureReady(const media::Picture& picture) { - // So far picture.visible_rect is not used. If used, visible_rect should - // be validated since it comes from GPU process and may not be trustworthy. - host()->SendUnsolicitedReply( - pp_resource(), - PpapiPluginMsg_VideoDecoder_PictureReady(picture.bitstream_buffer_id(), - picture.picture_buffer_id())); + // Don't bother validating the visible rect, since the plugin process is less + // trusted than the gpu process. + PP_Rect visible_rect = PP_FromGfxRect(picture.visible_rect()); + host()->SendUnsolicitedReply(pp_resource(), + PpapiPluginMsg_VideoDecoder_PictureReady( + picture.bitstream_buffer_id(), + picture.picture_buffer_id(), visible_rect)); } void PepperVideoDecoderHost::DismissPictureBuffer(int32 picture_buffer_id) { |