Move DmaBufAttributes struct to GraphicsBuffer header
The main motivation is to avoid scattering graphics buffer things around kwin. DmaBufParams struct has been moved to the OutputBackend, but with the introduction of buffer allocators, we need to port screencasting code to the new abstractions some time in the future.
This commit is contained in:
parent
22b10c4055
commit
67b898b803
14 changed files with 35 additions and 52 deletions
|
@ -14,6 +14,7 @@
|
||||||
#include "core/outputconfiguration.h"
|
#include "core/outputconfiguration.h"
|
||||||
#include "core/renderloop.h"
|
#include "core/renderloop.h"
|
||||||
#include "core/session.h"
|
#include "core/session.h"
|
||||||
|
#include "dmabuftexture.h"
|
||||||
#include "drm_connector.h"
|
#include "drm_connector.h"
|
||||||
#include "drm_crtc.h"
|
#include "drm_crtc.h"
|
||||||
#include "drm_egl_backend.h"
|
#include "drm_egl_backend.h"
|
||||||
|
|
|
@ -7,9 +7,11 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "config-kwin.h"
|
#include "config-kwin.h"
|
||||||
#include "dmabuftexture.h"
|
|
||||||
#include <libdrm/drm_fourcc.h>
|
|
||||||
|
|
||||||
|
#include "core/graphicsbuffer.h"
|
||||||
|
#include "core/outputbackend.h"
|
||||||
|
|
||||||
|
#include <drm_fourcc.h>
|
||||||
#include <gbm.h>
|
#include <gbm.h>
|
||||||
|
|
||||||
namespace KWin
|
namespace KWin
|
||||||
|
|
|
@ -8,16 +8,15 @@
|
||||||
SPDX-License-Identifier: GPL-2.0-or-later
|
SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
*/
|
*/
|
||||||
#include "wayland_backend.h"
|
#include "wayland_backend.h"
|
||||||
|
#include "dmabuftexture.h"
|
||||||
|
#include "dpmsinputeventfilter.h"
|
||||||
|
#include "input.h"
|
||||||
#include "wayland_display.h"
|
#include "wayland_display.h"
|
||||||
#include "wayland_egl_backend.h"
|
#include "wayland_egl_backend.h"
|
||||||
#include "wayland_logging.h"
|
#include "wayland_logging.h"
|
||||||
#include "wayland_output.h"
|
#include "wayland_output.h"
|
||||||
#include "wayland_qpainter_backend.h"
|
#include "wayland_qpainter_backend.h"
|
||||||
|
|
||||||
#include "dpmsinputeventfilter.h"
|
|
||||||
#include "input.h"
|
|
||||||
|
|
||||||
#include <KWayland/Client/keyboard.h>
|
#include <KWayland/Client/keyboard.h>
|
||||||
#include <KWayland/Client/pointer.h>
|
#include <KWayland/Client/pointer.h>
|
||||||
#include <KWayland/Client/pointergestures.h>
|
#include <KWayland/Client/pointergestures.h>
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
/*
|
|
||||||
SPDX-FileCopyrightText: 2022 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "utils/filedescriptor.h"
|
|
||||||
#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;
|
|
||||||
|
|
||||||
FileDescriptor fd[4];
|
|
||||||
int offset[4] = {0, 0, 0, 0};
|
|
||||||
int pitch[4] = {0, 0, 0, 0};
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace KWin
|
|
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "core/dmabufattributes.h"
|
|
||||||
#include "core/graphicsbuffer.h"
|
#include "core/graphicsbuffer.h"
|
||||||
#include "core/graphicsbufferallocator.h"
|
#include "core/graphicsbufferallocator.h"
|
||||||
|
|
||||||
|
|
|
@ -7,13 +7,25 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "kwin_export.h"
|
#include "kwin_export.h"
|
||||||
|
#include "utils/filedescriptor.h"
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
namespace KWin
|
namespace KWin
|
||||||
{
|
{
|
||||||
|
|
||||||
struct DmaBufAttributes;
|
struct DmaBufAttributes
|
||||||
|
{
|
||||||
|
int planeCount = 0;
|
||||||
|
int width = 0;
|
||||||
|
int height = 0;
|
||||||
|
uint32_t format = 0;
|
||||||
|
uint64_t modifier = 0;
|
||||||
|
|
||||||
|
FileDescriptor fd[4];
|
||||||
|
int offset[4] = {0, 0, 0, 0};
|
||||||
|
int pitch[4] = {0, 0, 0, 0};
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The GraphicsBuffer class represents a chunk of memory containing graphics data.
|
* The GraphicsBuffer class represents a chunk of memory containing graphics data.
|
||||||
|
|
|
@ -27,9 +27,17 @@ class InputBackend;
|
||||||
class OpenGLBackend;
|
class OpenGLBackend;
|
||||||
class QPainterBackend;
|
class QPainterBackend;
|
||||||
class OutputConfiguration;
|
class OutputConfiguration;
|
||||||
struct DmaBufParams;
|
|
||||||
class EglDisplay;
|
class EglDisplay;
|
||||||
|
|
||||||
|
struct DmaBufParams
|
||||||
|
{
|
||||||
|
int planeCount = 0;
|
||||||
|
int width = 0;
|
||||||
|
int height = 0;
|
||||||
|
uint32_t format = 0;
|
||||||
|
uint64_t modifier = 0;
|
||||||
|
};
|
||||||
|
|
||||||
class KWIN_EXPORT Outputs : public QVector<Output *>
|
class KWIN_EXPORT Outputs : public QVector<Output *>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
#include "kwin_export.h"
|
#include "kwin_export.h"
|
||||||
|
|
||||||
#include "core/dmabufattributes.h"
|
#include "core/graphicsbuffer.h"
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
SPDX-License-Identifier: GPL-2.0-or-later
|
SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
*/
|
*/
|
||||||
#include "eglcontext.h"
|
#include "eglcontext.h"
|
||||||
|
#include "core/graphicsbuffer.h"
|
||||||
#include "egldisplay.h"
|
#include "egldisplay.h"
|
||||||
#include "kwineglimagetexture.h"
|
#include "kwineglimagetexture.h"
|
||||||
#include "kwineglutils_p.h"
|
#include "kwineglutils_p.h"
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "core/dmabufattributes.h"
|
|
||||||
#include "kwin_export.h"
|
#include "kwin_export.h"
|
||||||
#include "kwingltexture.h"
|
#include "kwingltexture.h"
|
||||||
#include "openglcontext.h"
|
#include "openglcontext.h"
|
||||||
|
@ -22,6 +21,7 @@ namespace KWin
|
||||||
|
|
||||||
class EglDisplay;
|
class EglDisplay;
|
||||||
class ShaderManager;
|
class ShaderManager;
|
||||||
|
struct DmaBufAttributes;
|
||||||
|
|
||||||
class KWIN_EXPORT EglContext : public OpenGlContext
|
class KWIN_EXPORT EglContext : public OpenGlContext
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
SPDX-License-Identifier: GPL-2.0-or-later
|
SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
*/
|
*/
|
||||||
#include "egldisplay.h"
|
#include "egldisplay.h"
|
||||||
#include "core/dmabufattributes.h"
|
#include "core/graphicsbuffer.h"
|
||||||
#include "kwineglimagetexture.h"
|
#include "kwineglimagetexture.h"
|
||||||
#include "kwineglutils_p.h"
|
#include "kwineglutils_p.h"
|
||||||
#include "libkwineffects/kwinglutils.h"
|
#include "libkwineffects/kwinglutils.h"
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
#include "screencaststream.h"
|
#include "screencaststream.h"
|
||||||
#include "composite.h"
|
#include "composite.h"
|
||||||
#include "core/outputbackend.h"
|
|
||||||
#include "core/renderbackend.h"
|
#include "core/renderbackend.h"
|
||||||
#include "cursor.h"
|
#include "cursor.h"
|
||||||
#include "dmabuftexture.h"
|
#include "dmabuftexture.h"
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
#include "config-kwin.h"
|
#include "config-kwin.h"
|
||||||
|
|
||||||
|
#include "core/outputbackend.h"
|
||||||
#include "dmabuftexture.h"
|
#include "dmabuftexture.h"
|
||||||
#include "libkwineffects/kwinglobals.h"
|
#include "libkwineffects/kwinglobals.h"
|
||||||
#include "wayland/screencast_v1_interface.h"
|
#include "wayland/screencast_v1_interface.h"
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
#include "clientbuffer.h"
|
#include "clientbuffer.h"
|
||||||
#include "clientbufferintegration.h"
|
#include "clientbufferintegration.h"
|
||||||
|
|
||||||
#include "core/dmabufattributes.h"
|
|
||||||
|
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
#include <QSet>
|
#include <QSet>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
Loading…
Reference in a new issue