KWin
Loading...
Searching...
No Matches
windowscreencastsource.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "screencastsource.h"
10#include "window.h"
11
12#include <QPointer>
13#include <QTimer>
14
15namespace KWin
16{
17
19{
20 Q_OBJECT
21
22public:
23 explicit WindowScreenCastSource(Window *window, QObject *parent = nullptr);
24
25 quint32 drmFormat() const override;
26 bool hasAlphaChannel() const override;
27 QSize textureSize() const override;
28 uint refreshRate() const override;
29
30 void render(GLFramebuffer *target) override;
31 void render(spa_data *spa, spa_video_format format) override;
32 std::chrono::nanoseconds clock() const override;
33
34private:
35 QPointer<Window> m_window;
36 WindowOffscreenRenderRef m_offscreenRef;
37};
38
39} // namespace KWin
OpenGL framebuffer object.
std::chrono::nanoseconds clock() const override
void render(GLFramebuffer *target) override
WindowScreenCastSource(Window *window, QObject *parent=nullptr)
GLenum format
Definition gltexture.cpp:49