| Index: components/exo/wayland/server.cc
|
| diff --git a/components/exo/wayland/server.cc b/components/exo/wayland/server.cc
|
| index 7ee36ebf5b9b755d1f548b5bbaff6cd5a3c7ea88..d67da96ef1fbac542ffe2cfb0186d8e7dbf3bb0c 100644
|
| --- a/components/exo/wayland/server.cc
|
| +++ b/components/exo/wayland/server.cc
|
| @@ -521,21 +521,20 @@
|
| return;
|
| }
|
|
|
| - std::vector<gfx::NativePixmapPlane> planes;
|
| - planes.emplace_back(stride0, offset0, 0);
|
| - planes.emplace_back(stride1, offset1, 0);
|
| - planes.emplace_back(stride2, offset2, 0);
|
| + std::vector<int> strides{stride0, stride1, stride2};
|
| + std::vector<int> offsets{offset0, offset1, offset2};
|
| std::vector<base::ScopedFD> fds;
|
|
|
| - size_t num_planes =
|
| + int planes =
|
| gfx::NumberOfPlanesForBufferFormat(supported_format->buffer_format);
|
| - planes.resize(num_planes);
|
| + strides.resize(planes);
|
| + offsets.resize(planes);
|
| fds.push_back(base::ScopedFD(name));
|
|
|
| std::unique_ptr<Buffer> buffer =
|
| GetUserDataAs<Display>(resource)->CreateLinuxDMABufBuffer(
|
| - gfx::Size(width, height), supported_format->buffer_format, planes,
|
| - std::move(fds));
|
| + gfx::Size(width, height), supported_format->buffer_format, strides,
|
| + offsets, std::move(fds));
|
| if (!buffer) {
|
| wl_resource_post_no_memory(resource);
|
| return;
|
| @@ -668,7 +667,8 @@
|
| return;
|
| }
|
|
|
| - std::vector<gfx::NativePixmapPlane> planes;
|
| + std::vector<int> strides;
|
| + std::vector<int> offsets;
|
| std::vector<base::ScopedFD> fds;
|
|
|
| for (uint32_t i = 0; i < num_planes; ++i) {
|
| @@ -680,15 +680,16 @@
|
| return;
|
| }
|
| LinuxBufferParams::Plane& plane = plane_it->second;
|
| - planes.emplace_back(plane.stride, plane.offset, 0);
|
| + strides.push_back(plane.stride);
|
| + offsets.push_back(plane.offset);
|
| if (plane.fd.is_valid())
|
| fds.push_back(std::move(plane.fd));
|
| }
|
|
|
| std::unique_ptr<Buffer> buffer =
|
| linux_buffer_params->display->CreateLinuxDMABufBuffer(
|
| - gfx::Size(width, height), supported_format->buffer_format, planes,
|
| - std::move(fds));
|
| + gfx::Size(width, height), supported_format->buffer_format, strides,
|
| + offsets, std::move(fds));
|
| if (!buffer) {
|
| zwp_linux_buffer_params_v1_send_failed(resource);
|
| return;
|
|
|