diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 676595b22c..7ecd662b92 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -43,7 +43,6 @@ target_sources(kwin PRIVATE compositor.cpp compositor_wayland.cpp core/brightnessdevice.cpp - core/colorlut.cpp core/colorlut3d.cpp core/colorpipeline.cpp core/colorpipelinestage.cpp @@ -547,7 +546,6 @@ install(FILES DESTINATION ${KDE_INSTALL_INCLUDEDIR}/kwin COMPONENT Devel) install(FILES - core/colorlut.h core/colorlut3d.h core/colorpipeline.h core/colorpipelinestage.h diff --git a/src/backends/drm/drm_pipeline.h b/src/backends/drm/drm_pipeline.h index 2e734c2f92..1b77692ed0 100644 --- a/src/backends/drm/drm_pipeline.h +++ b/src/backends/drm/drm_pipeline.h @@ -16,7 +16,6 @@ #include #include -#include "core/colorlut.h" #include "core/colorpipeline.h" #include "core/colorspace.h" #include "core/output.h" diff --git a/src/backends/x11/standalone/x11_standalone_output.cpp b/src/backends/x11/standalone/x11_standalone_output.cpp index 60e1a480cb..ef1150c21c 100644 --- a/src/backends/x11/standalone/x11_standalone_output.cpp +++ b/src/backends/x11/standalone/x11_standalone_output.cpp @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-2.0-or-later */ #include "x11_standalone_output.h" -#include "core/colorlut.h" #include "core/colorpipeline.h" #include "core/colortransformation.h" #include "main.h" diff --git a/src/core/colorlut.cpp b/src/core/colorlut.cpp deleted file mode 100644 index 5516d782c3..0000000000 --- a/src/core/colorlut.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - KWin - the KDE window manager - This file is part of the KDE project. - - SPDX-FileCopyrightText: 2022 Xaver Hugl - - SPDX-License-Identifier: GPL-2.0-or-later -*/ -#include "colorlut.h" - -#include "colortransformation.h" - -namespace KWin -{ - -ColorLUT::ColorLUT(const std::shared_ptr &transformation, size_t size) - : m_transformation(transformation) -{ - m_data.fill(0, 3 * size); - for (uint64_t i = 0; i < size; i++) { - const uint16_t index = (i * 0xFFFF) / size; - std::tie(m_data[i], m_data[size + i], m_data[size * 2 + i]) = transformation->transform(index, index, index); - } -} - -uint16_t *ColorLUT::red() const -{ - return const_cast(m_data.constData()); -} - -uint16_t *ColorLUT::green() const -{ - return const_cast(m_data.constData() + size()); -} - -uint16_t *ColorLUT::blue() const -{ - return const_cast(m_data.constData() + 2 * size()); -} - -size_t ColorLUT::size() const -{ - return m_data.size() / 3; -} - -std::shared_ptr ColorLUT::transformation() const -{ - return m_transformation; -} - -} diff --git a/src/core/colorlut.h b/src/core/colorlut.h deleted file mode 100644 index 8ff50fd694..0000000000 --- a/src/core/colorlut.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - KWin - the KDE window manager - This file is part of the KDE project. - - SPDX-FileCopyrightText: 2022 Xaver Hugl - - SPDX-License-Identifier: GPL-2.0-or-later -*/ -#pragma once - -#include -#include - -#include "kwin_export.h" - -namespace KWin -{ - -class ColorTransformation; - -class KWIN_EXPORT ColorLUT -{ -public: - ColorLUT(const std::shared_ptr &transformation, size_t size); - - uint16_t *red() const; - uint16_t *green() const; - uint16_t *blue() const; - size_t size() const; - std::shared_ptr transformation() const; - -private: - QList m_data; - const std::shared_ptr m_transformation; -}; - -} diff --git a/src/core/iccprofile.cpp b/src/core/iccprofile.cpp index d2c53cd84a..92993f063e 100644 --- a/src/core/iccprofile.cpp +++ b/src/core/iccprofile.cpp @@ -4,7 +4,6 @@ SPDX-License-Identifier: GPL-2.0-or-later */ #include "iccprofile.h" -#include "colorlut.h" #include "colorlut3d.h" #include "colorpipelinestage.h" #include "colortransformation.h"