File indexing completed on 2024-11-10 04:56:56

0001 /*
0002     KWin - the KDE window manager
0003     This file is part of the KDE project.
0004 
0005     SPDX-FileCopyrightText: 2013 Martin Gräßlin <mgraesslin@kde.org>
0006 
0007     SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 #include "platformsupport/scenes/qpainter/qpainterbackend.h"
0010 #include "qpaintersurfacetexture_wayland.h"
0011 #include "utils/common.h"
0012 
0013 #include <QtGlobal>
0014 
0015 namespace KWin
0016 {
0017 
0018 QPainterBackend::QPainterBackend()
0019     : m_failed(false)
0020 {
0021 }
0022 
0023 QPainterBackend::~QPainterBackend()
0024 {
0025 }
0026 
0027 CompositingType QPainterBackend::compositingType() const
0028 {
0029     return QPainterCompositing;
0030 }
0031 
0032 std::unique_ptr<SurfaceTexture> QPainterBackend::createSurfaceTextureWayland(SurfacePixmap *pixmap)
0033 {
0034     return std::make_unique<QPainterSurfaceTextureWayland>(this, pixmap);
0035 }
0036 
0037 void QPainterBackend::setFailed(const QString &reason)
0038 {
0039     qCWarning(KWIN_QPAINTER) << "Creating the QPainter backend failed: " << reason;
0040     m_failed = true;
0041 }
0042 
0043 }
0044 
0045 #include "moc_qpainterbackend.cpp"