core: remove unused colorlut class
This commit is contained in:
parent
0260c2e9cd
commit
cb830957aa
6 changed files with 0 additions and 93 deletions
|
@ -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
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include <chrono>
|
||||
#include <xf86drmMode.h>
|
||||
|
||||
#include "core/colorlut.h"
|
||||
#include "core/colorpipeline.h"
|
||||
#include "core/colorspace.h"
|
||||
#include "core/output.h"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
/*
|
||||
KWin - the KDE window manager
|
||||
This file is part of the KDE project.
|
||||
|
||||
SPDX-FileCopyrightText: 2022 Xaver Hugl <xaver.hugl@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
#include "colorlut.h"
|
||||
|
||||
#include "colortransformation.h"
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
||||
ColorLUT::ColorLUT(const std::shared_ptr<ColorTransformation> &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<uint16_t *>(m_data.constData());
|
||||
}
|
||||
|
||||
uint16_t *ColorLUT::green() const
|
||||
{
|
||||
return const_cast<uint16_t *>(m_data.constData() + size());
|
||||
}
|
||||
|
||||
uint16_t *ColorLUT::blue() const
|
||||
{
|
||||
return const_cast<uint16_t *>(m_data.constData() + 2 * size());
|
||||
}
|
||||
|
||||
size_t ColorLUT::size() const
|
||||
{
|
||||
return m_data.size() / 3;
|
||||
}
|
||||
|
||||
std::shared_ptr<ColorTransformation> ColorLUT::transformation() const
|
||||
{
|
||||
return m_transformation;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
/*
|
||||
KWin - the KDE window manager
|
||||
This file is part of the KDE project.
|
||||
|
||||
SPDX-FileCopyrightText: 2022 Xaver Hugl <xaver.hugl@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QList>
|
||||
#include <memory>
|
||||
|
||||
#include "kwin_export.h"
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
||||
class ColorTransformation;
|
||||
|
||||
class KWIN_EXPORT ColorLUT
|
||||
{
|
||||
public:
|
||||
ColorLUT(const std::shared_ptr<ColorTransformation> &transformation, size_t size);
|
||||
|
||||
uint16_t *red() const;
|
||||
uint16_t *green() const;
|
||||
uint16_t *blue() const;
|
||||
size_t size() const;
|
||||
std::shared_ptr<ColorTransformation> transformation() const;
|
||||
|
||||
private:
|
||||
QList<uint16_t> m_data;
|
||||
const std::shared_ptr<ColorTransformation> m_transformation;
|
||||
};
|
||||
|
||||
}
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue