Commit ecc67359 authored by Alexandros Frantzis's avatar Alexandros Frantzis Committed by Commit Bot

ozone: Use a non-empty usage flag when checking formats with minigbm

minigbm doesn't support passing an empty usage flag to
gbm_device_is_format_supported(), which could happen with the
previous code if the format isn't scanout-able.

GBM_BO_USE_TEXTURING is an enum value and thus its existence
cannot be checked with the preprocessor.

Bug: 882429
Change-Id: I824dca82be65fdb6ffb8ab1e729af424e8969200
Reviewed-on: https://chromium-review.googlesource.com/1215947Reviewed-by: default avatarMaksim Sisov <msisov@igalia.com>
Reviewed-by: default avatarMichael Spang <spang@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589957}
parent b9ef2b6a
......@@ -308,7 +308,7 @@ class Device final : public ui::GbmDevice {
// Try to use scanout if supported.
int gbm_flags = GBM_BO_USE_SCANOUT;
#if defined(GBM_BO_USE_TEXTURING)
#if defined(USING_MINIGBM)
gbm_flags |= GBM_BO_USE_TEXTURING;
#endif
if (!gbm_device_is_format_supported(device_, format, gbm_flags))
......
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