kwin/plugins/platforms/x11/standalone/x11xrenderbackend.h
Vlad Zahorodnii d99e6b5d2a platforms/x11: Move XRenderBackend to platformsupport directory
This change moves the XRender backend to platformsupport directory,
similar to the OpenGL and the QPainter backend. This allows to put
platform-specific logic in XRenderBackend.
2020-12-08 08:50:19 +00:00

43 lines
1 KiB
C++

/*
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