Index: content/renderer/pepper/video_decoder_shim.cc |
diff --git a/content/renderer/pepper/video_decoder_shim.cc b/content/renderer/pepper/video_decoder_shim.cc |
index d213ac9f5a277c34949d0dd081cac2184628b928..c52c285a10291e218bf3db516f915aa50fc8244e 100644 |
--- a/content/renderer/pepper/video_decoder_shim.cc |
+++ b/content/renderer/pepper/video_decoder_shim.cc |
@@ -47,14 +47,11 @@ |
struct VideoDecoderShim::PendingFrame { |
explicit PendingFrame(uint32_t decode_id); |
- PendingFrame(uint32_t decode_id, |
- const gfx::Size& coded_size, |
- const gfx::Rect& visible_rect); |
+ PendingFrame(uint32_t decode_id, const gfx::Size& size); |
~PendingFrame(); |
const uint32_t decode_id; |
- const gfx::Size coded_size; |
- const gfx::Rect visible_rect; |
+ const gfx::Size size; |
std::vector<uint8_t> argb_pixels; |
private: |
@@ -67,12 +64,10 @@ |
} |
VideoDecoderShim::PendingFrame::PendingFrame(uint32_t decode_id, |
- const gfx::Size& coded_size, |
- const gfx::Rect& visible_rect) |
+ const gfx::Size& size) |
: decode_id(decode_id), |
- coded_size(coded_size), |
- visible_rect(visible_rect), |
- argb_pixels(coded_size.width() * coded_size.height() * 4) { |
+ size(size), |
+ argb_pixels(size.width() * size.height() * 4) { |
} |
VideoDecoderShim::PendingFrame::~PendingFrame() { |
@@ -263,8 +258,7 @@ |
const scoped_refptr<media::VideoFrame>& frame) { |
scoped_ptr<PendingFrame> pending_frame; |
if (!frame->end_of_stream()) { |
- pending_frame.reset(new PendingFrame( |
- decode_id_, frame->coded_size(), frame->visible_rect())); |
+ pending_frame.reset(new PendingFrame(decode_id_, frame->coded_size())); |
// Convert the VideoFrame pixels to ABGR to match VideoDecodeAccelerator. |
libyuv::I420ToABGR(frame->data(media::VideoFrame::kYPlane), |
frame->stride(media::VideoFrame::kYPlane), |
@@ -476,7 +470,7 @@ |
DCHECK(host_); |
if (!frame->argb_pixels.empty()) { |
- if (texture_size_ != frame->coded_size) { |
+ if (texture_size_ != frame->size) { |
// If the size has changed, all current textures must be dismissed. Add |
// all textures to |textures_to_dismiss_| and dismiss any that aren't in |
// use by the plugin. We will dismiss the rest as they are recycled. |
@@ -498,10 +492,10 @@ |
pending_texture_mailboxes_.push_back(gpu::Mailbox::Generate()); |
host_->RequestTextures(texture_pool_size_, |
- frame->coded_size, |
+ frame->size, |
GL_TEXTURE_2D, |
pending_texture_mailboxes_); |
- texture_size_ = frame->coded_size; |
+ texture_size_ = frame->size; |
} |
pending_frames_.push(linked_ptr<PendingFrame>(frame.release())); |
@@ -533,8 +527,7 @@ |
GL_UNSIGNED_BYTE, |
&frame->argb_pixels.front()); |
- host_->PictureReady( |
- media::Picture(texture_id, frame->decode_id, frame->visible_rect)); |
+ host_->PictureReady(media::Picture(texture_id, frame->decode_id)); |
pending_frames_.pop(); |
} |