Commit 3fd9f284 authored by Maksim Sisov's avatar Maksim Sisov Committed by Commit Bot

ozone/wayland: do not return supported buffer formats if gbm disabled.

if use_wayland_gbm set to false, Chromium doesn't use dmabuf path.
However, it still gets supported buffer formats that it got
from either wl_drm or zwp_linux_dmabuf protocols.

This is incorrect. Instead, it must report all the buffer formats
as "software only" (can be checked in the about://gpu page).

Bug: 578890
Change-Id: I44234af9b1b5b8960b2f698f815a62d95922660b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2404922
Commit-Queue: Robert Kroeger <rjkroege@chromium.org>
Reviewed-by: default avatarRobert Kroeger <rjkroege@chromium.org>
Auto-Submit: Maksim Sisov (GMT+3) <msisov@igalia.com>
Cr-Commit-Position: refs/heads/master@{#806284}
parent afbbeff6
...@@ -662,12 +662,13 @@ void WaylandBufferManagerHost::OnChannelDestroyed() { ...@@ -662,12 +662,13 @@ void WaylandBufferManagerHost::OnChannelDestroyed() {
wl::BufferFormatsWithModifiersMap wl::BufferFormatsWithModifiersMap
WaylandBufferManagerHost::GetSupportedBufferFormats() const { WaylandBufferManagerHost::GetSupportedBufferFormats() const {
#if defined(WAYLAND_GBM)
if (connection_->zwp_dmabuf()) if (connection_->zwp_dmabuf())
return connection_->zwp_dmabuf()->supported_buffer_formats(); return connection_->zwp_dmabuf()->supported_buffer_formats();
else if (connection_->drm()) else if (connection_->drm())
return connection_->drm()->supported_buffer_formats(); return connection_->drm()->supported_buffer_formats();
else #endif
return {}; return {};
} }
bool WaylandBufferManagerHost::SupportsDmabuf() const { bool WaylandBufferManagerHost::SupportsDmabuf() const {
......
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