Commit 5bea5085 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

drm: Readability, no need to copy the modifiers vector

parent 52900dc2
Pipeline #188689 passed with stage
in 13 minutes and 18 seconds
......@@ -34,12 +34,7 @@ bool DrmLeaseEglGbmLayer::checkTestBuffer()
if (mods.isEmpty()) {
newBo = gbm_bo_create(m_pipeline->gpu()->gbmDevice(), size.width(), size.height(), DRM_FORMAT_XRGB8888, GBM_BO_USE_SCANOUT);
} else {
QVector<uint64_t> modifiers;
modifiers.reserve(mods.count());
for (const auto &mod : mods) {
modifiers << mod;
}
newBo = gbm_bo_create_with_modifiers(m_pipeline->gpu()->gbmDevice(), size.width(), size.height(), DRM_FORMAT_XRGB8888, modifiers.constData(), mods.count());
newBo = gbm_bo_create_with_modifiers(m_pipeline->gpu()->gbmDevice(), size.width(), size.height(), DRM_FORMAT_XRGB8888, mods.constData(), mods.count());
if (!newBo && errno == ENOSYS) {
// gbm implementation doesn't support modifiers
newBo = gbm_bo_create(m_pipeline->gpu()->gbmDevice(), size.width(), size.height(), DRM_FORMAT_XRGB8888, GBM_BO_USE_SCANOUT);
......
Supports Markdown
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