Commit ff63341d authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Commit Bot

media/base/video_frame_layout: remove set_buffer_sizes() method

This method has no user besides its own unit test, and we want to remove
all non-const methods from VideoFrameLayout.

BUG=876986
TEST=built vdatest and Chromium.

Change-Id: I5f332416c25a747685f2194989a61df225bb1159
Reviewed-on: https://chromium-review.googlesource.com/1186286
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Reviewed-by: default avatarJohn Rummell <jrummell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585758}
parent c8b8de95
...@@ -56,11 +56,6 @@ class MEDIA_EXPORT VideoFrameLayout { ...@@ -56,11 +56,6 @@ class MEDIA_EXPORT VideoFrameLayout {
strides_ = std::move(strides); strides_ = std::move(strides);
} }
// Sets buffer_sizes.
void set_buffer_sizes(std::vector<size_t> buffer_sizes) {
buffer_sizes_ = std::move(buffer_sizes);
}
// Clones this as a explicitly copy constructor. // Clones this as a explicitly copy constructor.
VideoFrameLayout Clone() const; VideoFrameLayout Clone() const;
......
...@@ -137,18 +137,16 @@ TEST(VideoFrameLayout, ToStringNoBufferInfo) { ...@@ -137,18 +137,16 @@ TEST(VideoFrameLayout, ToStringNoBufferInfo) {
"strides:[0, 0, 0, 0]"); "strides:[0, 0, 0, 0]");
} }
TEST(VideoFrameLayout, SetStrideBufferSize) { TEST(VideoFrameLayout, SetStrideSize) {
gfx::Size coded_size = gfx::Size(320, 180); gfx::Size coded_size = gfx::Size(320, 180);
VideoFrameLayout layout(PIXEL_FORMAT_NV12, coded_size); VideoFrameLayout layout(PIXEL_FORMAT_NV12, coded_size);
std::vector<int32_t> strides = {384, 192, 192}; std::vector<int32_t> strides = {384, 192, 192};
layout.set_strides(std::move(strides)); layout.set_strides(std::move(strides));
std::vector<size_t> buffer_sizes = {122880};
layout.set_buffer_sizes(std::move(buffer_sizes));
EXPECT_EQ(layout.ToString(), EXPECT_EQ(layout.ToString(),
"VideoFrameLayout format:PIXEL_FORMAT_NV12 coded_size:320x180 " "VideoFrameLayout format:PIXEL_FORMAT_NV12 coded_size:320x180 "
"num_buffers:1 buffer_sizes:[122880] num_strides:3 " "num_buffers:4 buffer_sizes:[0, 0, 0, 0] num_strides:3 "
"strides:[384, 192, 192]"); "strides:[384, 192, 192]");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment