2023-05-25 07:40:01 +00:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2023 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2023-06-05 10:44:48 +00:00
|
|
|
#include "core/graphicsbuffer.h"
|
2023-05-25 07:40:01 +00:00
|
|
|
|
|
|
|
#include <QImage>
|
|
|
|
|
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
|
|
|
|
class KWIN_EXPORT GraphicsBufferView
|
|
|
|
{
|
|
|
|
public:
|
2023-06-05 10:44:48 +00:00
|
|
|
explicit GraphicsBufferView(GraphicsBuffer *buffer, GraphicsBuffer::MapFlags accessFlags = GraphicsBuffer::Read);
|
2023-05-25 07:40:01 +00:00
|
|
|
~GraphicsBufferView();
|
|
|
|
|
|
|
|
QImage *image();
|
|
|
|
const QImage *image() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
GraphicsBuffer *m_buffer;
|
|
|
|
QImage m_image;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace KWin
|