| Index: media/base/video_frame.cc
|
| diff --git a/media/base/video_frame.cc b/media/base/video_frame.cc
|
| index 9e5ff7a26dfaf09d359479463233c69fcca0145c..7b78467fc84c64d42d68a87ebdcf75705327da3b 100644
|
| --- a/media/base/video_frame.cc
|
| +++ b/media/base/video_frame.cc
|
| @@ -21,10 +21,11 @@ scoped_refptr<VideoFrame> VideoFrame::CreateFrame(
|
| VideoFrame::Format format,
|
| size_t width,
|
| size_t height,
|
| + const gfx::Size& natural_size,
|
| base::TimeDelta timestamp) {
|
| DCHECK(IsValidConfig(format, width, height));
|
| scoped_refptr<VideoFrame> frame(new VideoFrame(
|
| - format, width, height, timestamp));
|
| + format, width, height, natural_size, timestamp));
|
| switch (format) {
|
| case VideoFrame::RGB32:
|
| frame->AllocateRGB(4u);
|
| @@ -57,10 +58,11 @@ scoped_refptr<VideoFrame> VideoFrame::WrapNativeTexture(
|
| uint32 texture_target,
|
| size_t width,
|
| size_t height,
|
| + const gfx::Size& natural_size,
|
| base::TimeDelta timestamp,
|
| const base::Closure& no_longer_needed) {
|
| scoped_refptr<VideoFrame> frame(
|
| - new VideoFrame(NATIVE_TEXTURE, width, height, timestamp));
|
| + new VideoFrame(NATIVE_TEXTURE, width, height, natural_size, timestamp));
|
| frame->texture_id_ = texture_id;
|
| frame->texture_target_ = texture_target;
|
| frame->texture_no_longer_needed_ = no_longer_needed;
|
| @@ -70,7 +72,7 @@ scoped_refptr<VideoFrame> VideoFrame::WrapNativeTexture(
|
| // static
|
| scoped_refptr<VideoFrame> VideoFrame::CreateEmptyFrame() {
|
| return new VideoFrame(
|
| - VideoFrame::EMPTY, 0, 0, base::TimeDelta());
|
| + VideoFrame::EMPTY, 0, 0, gfx::Size(), base::TimeDelta());
|
| }
|
|
|
| // static
|
| @@ -81,7 +83,8 @@ scoped_refptr<VideoFrame> VideoFrame::CreateBlackFrame(int width, int height) {
|
| // Create our frame.
|
| const base::TimeDelta kZero;
|
| scoped_refptr<VideoFrame> frame =
|
| - VideoFrame::CreateFrame(VideoFrame::YV12, width, height, kZero);
|
| + VideoFrame::CreateFrame(VideoFrame::YV12, width, height,
|
| + gfx::Size(width, height), kZero);
|
|
|
| // Now set the data to YUV(0,128,128).
|
| const uint8 kBlackY = 0x00;
|
| @@ -165,10 +168,12 @@ void VideoFrame::AllocateYUV() {
|
| VideoFrame::VideoFrame(VideoFrame::Format format,
|
| size_t width,
|
| size_t height,
|
| + const gfx::Size& natural_size,
|
| base::TimeDelta timestamp)
|
| : format_(format),
|
| width_(width),
|
| height_(height),
|
| + natural_size_(natural_size),
|
| texture_id_(0),
|
| texture_target_(0),
|
| timestamp_(timestamp) {
|
|
|