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

Unified Diff: content/renderer/pepper/pepper_video_decoder_host.cc

Issue 703753002: Pepper: Expose visible_rect to PPB_VideoDecoder.GetPicture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ppapi/api/pp_codecs.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_video_decoder_host.cc
diff --git a/content/renderer/pepper/pepper_video_decoder_host.cc b/content/renderer/pepper/pepper_video_decoder_host.cc
index 086c15093c10fd8b481b95285c4dc0a2e1c15d34..02e14f3be5cf9506ea8259970d15084930cc7a0d 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) {
« no previous file with comments | « no previous file | ppapi/api/pp_codecs.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698