diff --git a/src/backends/x11/windowed/egl_x11_backend.cpp b/src/backends/x11/windowed/egl_x11_backend.cpp index 701383f529..b83ff1a210 100644 --- a/src/backends/x11/windowed/egl_x11_backend.cpp +++ b/src/backends/x11/windowed/egl_x11_backend.cpp @@ -21,26 +21,26 @@ namespace KWin { -EglX11Output::EglX11Output(EglX11Backend *backend, Output *output, EGLSurface surface) +X11WindowedEglOutput::X11WindowedEglOutput(X11WindowedEglBackend *backend, Output *output, EGLSurface surface) : m_eglSurface(surface) , m_output(output) , m_backend(backend) { } -EglX11Output::~EglX11Output() +X11WindowedEglOutput::~X11WindowedEglOutput() { eglDestroySurface(m_backend->eglDisplay(), m_eglSurface); } -void EglX11Output::ensureFbo() +void X11WindowedEglOutput::ensureFbo() { if (!m_fbo || m_fbo->size() != m_output->pixelSize()) { m_fbo.reset(new GLFramebuffer(0, m_output->pixelSize())); } } -OutputLayerBeginFrameInfo EglX11Output::beginFrame() +OutputLayerBeginFrameInfo X11WindowedEglOutput::beginFrame() { eglMakeCurrent(m_backend->eglDisplay(), m_eglSurface, m_eglSurface, m_backend->context()); ensureFbo(); @@ -51,7 +51,7 @@ OutputLayerBeginFrameInfo EglX11Output::beginFrame() }; } -bool EglX11Output::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion) +bool X11WindowedEglOutput::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion) { Q_UNUSED(renderedRegion) m_lastDamage = damagedRegion; @@ -59,25 +59,25 @@ bool EglX11Output::endFrame(const QRegion &renderedRegion, const QRegion &damage return true; } -EGLSurface EglX11Output::surface() const +EGLSurface X11WindowedEglOutput::surface() const { return m_eglSurface; } -QRegion EglX11Output::lastDamage() const +QRegion X11WindowedEglOutput::lastDamage() const { return m_lastDamage; } -EglX11Backend::EglX11Backend(X11WindowedBackend *backend) +X11WindowedEglBackend::X11WindowedEglBackend(X11WindowedBackend *backend) : EglOnXBackend(backend->connection(), backend->display(), backend->rootWindow(), backend->screenNumer(), XCB_WINDOW_NONE) , m_backend(backend) { } -EglX11Backend::~EglX11Backend() = default; +X11WindowedEglBackend::~X11WindowedEglBackend() = default; -void EglX11Backend::init() +void X11WindowedEglBackend::init() { EglOnXBackend::init(); @@ -86,12 +86,12 @@ void EglX11Backend::init() } } -void EglX11Backend::cleanupSurfaces() +void X11WindowedEglBackend::cleanupSurfaces() { m_outputs.clear(); } -bool EglX11Backend::createSurfaces() +bool X11WindowedEglBackend::createSurfaces() { const auto &outputs = m_backend->outputs(); for (const auto &output : outputs) { @@ -99,7 +99,7 @@ bool EglX11Backend::createSurfaces() if (s == EGL_NO_SURFACE) { return false; } - m_outputs[output] = std::make_shared(this, output, s); + m_outputs[output] = std::make_shared(this, output, s); } if (m_outputs.isEmpty()) { return false; @@ -108,7 +108,7 @@ bool EglX11Backend::createSurfaces() return true; } -void EglX11Backend::present(Output *output) +void X11WindowedEglBackend::present(Output *output) { static_cast(output)->vsyncMonitor()->arm(); @@ -116,7 +116,7 @@ void EglX11Backend::present(Output *output) presentSurface(renderOutput->surface(), renderOutput->lastDamage(), output->geometry()); } -void EglX11Backend::presentSurface(EGLSurface surface, const QRegion &damage, const QRect &screenGeometry) +void X11WindowedEglBackend::presentSurface(EGLSurface surface, const QRegion &damage, const QRect &screenGeometry) { if (damage.isEmpty()) { return; @@ -134,17 +134,17 @@ void EglX11Backend::presentSurface(EGLSurface surface, const QRegion &damage, co } } -OutputLayer *EglX11Backend::primaryLayer(Output *output) +OutputLayer *X11WindowedEglBackend::primaryLayer(Output *output) { return m_outputs[output].get(); } -std::unique_ptr EglX11Backend::createSurfaceTextureWayland(SurfacePixmapWayland *pixmap) +std::unique_ptr X11WindowedEglBackend::createSurfaceTextureWayland(SurfacePixmapWayland *pixmap) { return std::make_unique(this, pixmap); } -std::unique_ptr EglX11Backend::createSurfaceTextureInternal(SurfacePixmapInternal *pixmap) +std::unique_ptr X11WindowedEglBackend::createSurfaceTextureInternal(SurfacePixmapInternal *pixmap) { return std::make_unique(this, pixmap); } diff --git a/src/backends/x11/windowed/egl_x11_backend.h b/src/backends/x11/windowed/egl_x11_backend.h index 76274b033b..1d1f392f7f 100644 --- a/src/backends/x11/windowed/egl_x11_backend.h +++ b/src/backends/x11/windowed/egl_x11_backend.h @@ -18,13 +18,13 @@ namespace KWin { class X11WindowedBackend; -class EglX11Backend; +class X11WindowedEglBackend; -class EglX11Output : public OutputLayer +class X11WindowedEglOutput : public OutputLayer { public: - EglX11Output(EglX11Backend *backend, Output *output, EGLSurface surface); - ~EglX11Output(); + X11WindowedEglOutput(X11WindowedEglBackend *backend, Output *output, EGLSurface surface); + ~X11WindowedEglOutput(); OutputLayerBeginFrameInfo beginFrame() override; bool endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion) override; @@ -39,19 +39,19 @@ private: QRegion m_lastDamage; Output *const m_output; - EglX11Backend *const m_backend; + X11WindowedEglBackend *const m_backend; }; /** * @brief OpenGL Backend using Egl windowing system over an X overlay window. */ -class EglX11Backend : public EglOnXBackend +class X11WindowedEglBackend : public EglOnXBackend { Q_OBJECT public: - explicit EglX11Backend(X11WindowedBackend *backend); - ~EglX11Backend() override; + explicit X11WindowedEglBackend(X11WindowedBackend *backend); + ~X11WindowedEglBackend() override; std::unique_ptr createSurfaceTextureInternal(SurfacePixmapInternal *pixmap) override; std::unique_ptr createSurfaceTextureWayland(SurfacePixmapWayland *pixmap) override; @@ -67,7 +67,7 @@ protected: private: void presentSurface(EGLSurface surface, const QRegion &damage, const QRect &screenGeometry); - QMap> m_outputs; + QMap> m_outputs; X11WindowedBackend *m_backend; }; diff --git a/src/backends/x11/windowed/x11windowed_backend.cpp b/src/backends/x11/windowed/x11windowed_backend.cpp index bc4c4ac9ba..cb13f20d83 100644 --- a/src/backends/x11/windowed/x11windowed_backend.cpp +++ b/src/backends/x11/windowed/x11windowed_backend.cpp @@ -664,7 +664,7 @@ X11WindowedInputDevice *X11WindowedBackend::touchDevice() const OpenGLBackend *X11WindowedBackend::createOpenGLBackend() { - return new EglX11Backend(this); + return new X11WindowedEglBackend(this); } QPainterBackend *X11WindowedBackend::createQPainterBackend()