backends/wayland: Port away from gbm_bo_create_with_modifiers2()
gbm_bo_create_with_modifiers2() is quite new and there are still distros that ship 21.2 and older.
This commit is contained in:
parent
fc2447071e
commit
a14998b790
1 changed files with 10 additions and 9 deletions
|
@ -49,20 +49,21 @@ WaylandEglLayerBuffer::WaylandEglLayerBuffer(const QSize &size, uint32_t format,
|
|||
{
|
||||
gbm_device *gbmDevice = backend->backend()->gbmDevice();
|
||||
|
||||
if (modifiers.isEmpty()) {
|
||||
if (!modifiers.isEmpty()) {
|
||||
m_bo = gbm_bo_create_with_modifiers(gbmDevice,
|
||||
size.width(),
|
||||
size.height(),
|
||||
format,
|
||||
modifiers.constData(),
|
||||
modifiers.size());
|
||||
}
|
||||
|
||||
if (!m_bo) {
|
||||
m_bo = gbm_bo_create(gbmDevice,
|
||||
size.width(),
|
||||
size.height(),
|
||||
format,
|
||||
GBM_BO_USE_RENDERING);
|
||||
} else {
|
||||
m_bo = gbm_bo_create_with_modifiers2(gbmDevice,
|
||||
size.width(),
|
||||
size.height(),
|
||||
format,
|
||||
modifiers.constData(),
|
||||
modifiers.size(),
|
||||
GBM_BO_USE_RENDERING);
|
||||
}
|
||||
|
||||
if (!m_bo) {
|
||||
|
|
Loading…
Reference in a new issue