Commit 43da5d9c authored by Kramer Ge's avatar Kramer Ge Committed by Commit Bot

[ozone/wayland] Change kImmedVerstion to 2

create_immed is available since protocol version 2. Exo is at version 2.
This method implicitly enables committing a frame of buffers atomically.

Change-Id: I46c25af1e257dbef68cc3c810a87ba2dd10b26ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2381652
Commit-Queue: Kramer Ge <fangzhoug@chromium.org>
Reviewed-by: default avatarMaksim Sisov (GMT+3) <msisov@igalia.com>
Cr-Commit-Position: refs/heads/master@{#802879}
parent bafef18d
...@@ -12,10 +12,6 @@ ...@@ -12,10 +12,6 @@
namespace ui { namespace ui {
namespace {
constexpr uint32_t kImmedVerstion = 3;
}
WaylandZwpLinuxDmabuf::WaylandZwpLinuxDmabuf( WaylandZwpLinuxDmabuf::WaylandZwpLinuxDmabuf(
zwp_linux_dmabuf_v1* zwp_linux_dmabuf, zwp_linux_dmabuf_v1* zwp_linux_dmabuf,
WaylandConnection* connection) WaylandConnection* connection)
...@@ -56,8 +52,9 @@ void WaylandZwpLinuxDmabuf::CreateBuffer(base::ScopedFD fd, ...@@ -56,8 +52,9 @@ void WaylandZwpLinuxDmabuf::CreateBuffer(base::ScopedFD fd,
} }
// It's possible to avoid waiting until the buffer is created and have it // It's possible to avoid waiting until the buffer is created and have it
// immediately. This method is only available since the protocol version 3. // immediately. This method is only available since the protocol version 2.
if (wl::get_version_of_object(zwp_linux_dmabuf_.get()) >= kImmedVerstion) { if (wl::get_version_of_object(zwp_linux_dmabuf_.get()) >=
ZWP_LINUX_BUFFER_PARAMS_V1_CREATE_IMMED_SINCE_VERSION) {
wl::Object<wl_buffer> buffer(zwp_linux_buffer_params_v1_create_immed( wl::Object<wl_buffer> buffer(zwp_linux_buffer_params_v1_create_immed(
params, size.width(), size.height(), format, 0)); params, size.width(), size.height(), format, 0));
std::move(callback).Run(std::move(buffer)); std::move(callback).Run(std::move(buffer));
......
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