File indexing completed on 2024-11-10 04:56:27
0001 /* 0002 KWin - the KDE window manager 0003 This file is part of the KDE project. 0004 0005 SPDX-FileCopyrightText: 2022 Xaver Hugl <xaver.hugl@gmail.com> 0006 0007 SPDX-License-Identifier: GPL-2.0-or-later 0008 */ 0009 #pragma once 0010 0011 #include <QList> 0012 #include <QMap> 0013 #include <QPointer> 0014 0015 namespace KWin 0016 { 0017 0018 class EglGbmBackend; 0019 class DrmGpu; 0020 class SurfaceInterface; 0021 0022 class DmabufFeedback 0023 { 0024 public: 0025 DmabufFeedback(DrmGpu *gpu, EglGbmBackend *eglBackend); 0026 0027 void renderingSurface(); 0028 void scanoutSuccessful(SurfaceInterface *surface); 0029 void scanoutFailed(SurfaceInterface *surface, const QMap<uint32_t, QList<uint64_t>> &formats); 0030 0031 private: 0032 QPointer<SurfaceInterface> m_surface; 0033 QMap<uint32_t, QList<uint64_t>> m_attemptedFormats; 0034 bool m_attemptedThisFrame = false; 0035 0036 DrmGpu *const m_gpu; 0037 EglGbmBackend *const m_eglBackend; 0038 }; 0039 0040 }