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

Side by Side Diff: content/renderer/pepper/pepper_video_decoder_host.cc

Issue 426873004: Pass decoded picture size from VDA to client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: change visible_size to visible_rect; add comments for visible_rect validation Created 6 years, 4 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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.
316 host()->SendUnsolicitedReply( 318 host()->SendUnsolicitedReply(
317 pp_resource(), 319 pp_resource(),
318 PpapiPluginMsg_VideoDecoder_PictureReady(picture.bitstream_buffer_id(), 320 PpapiPluginMsg_VideoDecoder_PictureReady(picture.bitstream_buffer_id(),
319 picture.picture_buffer_id())); 321 picture.picture_buffer_id()));
320 } 322 }
321 323
322 void PepperVideoDecoderHost::DismissPictureBuffer(int32 picture_buffer_id) { 324 void PepperVideoDecoderHost::DismissPictureBuffer(int32 picture_buffer_id) {
323 host()->SendUnsolicitedReply( 325 host()->SendUnsolicitedReply(
324 pp_resource(), 326 pp_resource(),
325 PpapiPluginMsg_VideoDecoder_DismissPicture(picture_buffer_id)); 327 PpapiPluginMsg_VideoDecoder_DismissPicture(picture_buffer_id));
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 host()->SendUnsolicitedReply( 400 host()->SendUnsolicitedReply(
399 pp_resource(), 401 pp_resource(),
400 PpapiPluginMsg_VideoDecoder_RequestTextures( 402 PpapiPluginMsg_VideoDecoder_RequestTextures(
401 requested_num_of_buffers, 403 requested_num_of_buffers,
402 PP_MakeSize(dimensions.width(), dimensions.height()), 404 PP_MakeSize(dimensions.width(), dimensions.height()),
403 texture_target, 405 texture_target,
404 mailboxes)); 406 mailboxes));
405 } 407 }
406 408
407 } // namespace content 409 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698