kwin/src/dmabufattributes.h
Aleix Pol 538b848f80 backends: Split out a DmaBufParams class
Instead of using a DmaBufAttributes instance to communicate the settings
to create a new dmabuf, use a smaller DmaBufParams class that only
contains the information we need after destroying the BO.
2022-06-16 13:18:32 +00:00

36 lines
589 B
C++

/*
SPDX-FileCopyrightText: 2022 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include <cstdint>
namespace KWin
{
struct DmaBufParams
{
int planeCount = 0;
int width = 0;
int height = 0;
uint32_t format = 0;
uint64_t modifier = 0;
};
struct DmaBufAttributes
{
int planeCount = 0;
int width = 0;
int height = 0;
uint32_t format = 0;
uint64_t modifier = 0;
int fd[4] = {-1, -1, -1, -1};
int offset[4] = {0, 0, 0, 0};
int pitch[4] = {0, 0, 0, 0};
};
} // namespace KWin