kwin/plugins/platforms/x11/standalone/x11xrenderbackend.h

44 lines
1 KiB
C
Raw Normal View History

/*
KWin - the KDE window manager
This file is part of the KDE project.
SPDX-FileCopyrightText: 2006 Lubos Lunak <l.lunak@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include "xrenderbackend.h"
namespace KWin
{
class X11StandalonePlatform;
/**
* @brief XRenderBackend using an X11 Overlay Window as compositing target.
*/
class X11XRenderBackend : public XRenderBackend
{
public:
explicit X11XRenderBackend(X11StandalonePlatform *backend);
~X11XRenderBackend() override;
void present(int mask, const QRegion &damage) override;
OverlayWindow *overlayWindow() override;
void showOverlay() override;
void screenGeometryChanged(const QSize &size) override;
bool usesOverlayWindow() const override;
private:
void init(bool createOverlay);
void createBuffer();
X11StandalonePlatform *m_backend;
QScopedPointer<OverlayWindow> m_overlayWindow;
xcb_render_picture_t m_front;
xcb_render_pictformat_t m_format;
};
} // namespace KWin