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

0001 /*
0002     SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "openglsurfacetexture.h"
0008 #include "opengl/gltexture.h"
0009 
0010 namespace KWin
0011 {
0012 
0013 OpenGLSurfaceTexture::OpenGLSurfaceTexture(OpenGLBackend *backend)
0014     : m_backend(backend)
0015 {
0016 }
0017 
0018 OpenGLSurfaceTexture::~OpenGLSurfaceTexture()
0019 {
0020 }
0021 
0022 bool OpenGLSurfaceTexture::isValid() const
0023 {
0024     return m_texture.isValid();
0025 }
0026 
0027 OpenGLBackend *OpenGLSurfaceTexture::backend() const
0028 {
0029     return m_backend;
0030 }
0031 
0032 OpenGLSurfaceContents OpenGLSurfaceTexture::texture() const
0033 {
0034     return m_texture;
0035 }
0036 
0037 void OpenGLSurfaceContents::setDirty()
0038 {
0039     for (auto &plane : planes) {
0040         plane->setDirty();
0041     }
0042 }
0043 
0044 } // namespace KWin