libkwineffects/colorspace: rename maxHdrBrightness
The name doesn't really reflect what it's actually about, which is the maximum average brightness the display can sustain without dimming
This commit is contained in:
parent
94b74cff96
commit
2fa80c6a3e
4 changed files with 14 additions and 14 deletions
|
@ -98,7 +98,7 @@ std::optional<OutputLayerBeginFrameInfo> EglGbmLayerSurface::startRendering(cons
|
|||
if (enableColormanagement) {
|
||||
m_surface->intermediaryColorDescription = ColorDescription(colorDescription.colorimetry(), NamedTransferFunction::linear,
|
||||
colorDescription.sdrBrightness(), colorDescription.minHdrBrightness(),
|
||||
colorDescription.maxHdrBrightness(), colorDescription.maxHdrHighlightBrightness());
|
||||
colorDescription.maxFrameAverageBrightness(), colorDescription.maxHdrHighlightBrightness());
|
||||
} else {
|
||||
m_surface->intermediaryColorDescription = colorDescription;
|
||||
}
|
||||
|
|
|
@ -100,22 +100,22 @@ constexpr Colorimetry Colorimetry::createFromName(NamedColorimetry name)
|
|||
|
||||
const ColorDescription ColorDescription::sRGB = ColorDescription(NamedColorimetry::BT709, NamedTransferFunction::sRGB, 100, 0, 100, 100);
|
||||
|
||||
ColorDescription::ColorDescription(const Colorimetry &colorimety, NamedTransferFunction tf, double sdrBrightness, double minHdrBrightness, double maxHdrBrightness, double maxHdrHighlightBrightness)
|
||||
ColorDescription::ColorDescription(const Colorimetry &colorimety, NamedTransferFunction tf, double sdrBrightness, double minHdrBrightness, double maxFrameAverageBrightness, double maxHdrHighlightBrightness)
|
||||
: m_colorimetry(colorimety)
|
||||
, m_transferFunction(tf)
|
||||
, m_sdrBrightness(sdrBrightness)
|
||||
, m_minHdrBrightness(minHdrBrightness)
|
||||
, m_maxHdrBrightness(maxHdrBrightness)
|
||||
, m_maxFrameAverageBrightness(maxFrameAverageBrightness)
|
||||
, m_maxHdrHighlightBrightness(maxHdrHighlightBrightness)
|
||||
{
|
||||
}
|
||||
|
||||
ColorDescription::ColorDescription(NamedColorimetry colorimetry, NamedTransferFunction tf, double sdrBrightness, double minHdrBrightness, double maxHdrBrightness, double maxHdrHighlightBrightness)
|
||||
ColorDescription::ColorDescription(NamedColorimetry colorimetry, NamedTransferFunction tf, double sdrBrightness, double minHdrBrightness, double maxFrameAverageBrightness, double maxHdrHighlightBrightness)
|
||||
: m_colorimetry(Colorimetry::createFromName(colorimetry))
|
||||
, m_transferFunction(tf)
|
||||
, m_sdrBrightness(sdrBrightness)
|
||||
, m_minHdrBrightness(minHdrBrightness)
|
||||
, m_maxHdrBrightness(maxHdrBrightness)
|
||||
, m_maxFrameAverageBrightness(maxFrameAverageBrightness)
|
||||
, m_maxHdrHighlightBrightness(maxHdrHighlightBrightness)
|
||||
{
|
||||
}
|
||||
|
@ -140,9 +140,9 @@ double ColorDescription::minHdrBrightness() const
|
|||
return m_minHdrBrightness;
|
||||
}
|
||||
|
||||
double ColorDescription::maxHdrBrightness() const
|
||||
double ColorDescription::maxFrameAverageBrightness() const
|
||||
{
|
||||
return m_maxHdrBrightness;
|
||||
return m_maxFrameAverageBrightness;
|
||||
}
|
||||
|
||||
double ColorDescription::maxHdrHighlightBrightness() const
|
||||
|
@ -156,7 +156,7 @@ bool ColorDescription::operator==(const ColorDescription &other) const
|
|||
&& m_transferFunction == other.transferFunction()
|
||||
&& m_sdrBrightness == other.sdrBrightness()
|
||||
&& m_minHdrBrightness == other.minHdrBrightness()
|
||||
&& m_maxHdrBrightness == other.maxHdrBrightness()
|
||||
&& m_maxFrameAverageBrightness == other.maxFrameAverageBrightness()
|
||||
&& m_maxHdrHighlightBrightness == other.maxHdrHighlightBrightness();
|
||||
}
|
||||
|
||||
|
|
|
@ -61,17 +61,17 @@ public:
|
|||
* @param tf the transfer function of this description
|
||||
* @param sdrBrightness the brightness of SDR content
|
||||
* @param minHdrBrightness the minimum brightness of HDR content
|
||||
* @param maxHdrBrightness the maximum brightness of HDR content, if the whole screen is white
|
||||
* @param maxFrameAverageBrightness the maximum brightness of HDR content, if the whole screen is white
|
||||
* @param maxHdrHighlightBrightness the maximum brightness of HDR content, for a small part of the screen only
|
||||
*/
|
||||
explicit ColorDescription(const Colorimetry &colorimety, NamedTransferFunction tf, double sdrBrightness, double minHdrBrightness, double maxHdrBrightness, double maxHdrHighlightBrightness);
|
||||
explicit ColorDescription(NamedColorimetry colorimetry, NamedTransferFunction tf, double sdrBrightness, double minHdrBrightness, double maxHdrBrightness, double maxHdrHighlightBrightness);
|
||||
explicit ColorDescription(const Colorimetry &colorimety, NamedTransferFunction tf, double sdrBrightness, double minHdrBrightness, double maxFrameAverageBrightness, double maxHdrHighlightBrightness);
|
||||
explicit ColorDescription(NamedColorimetry colorimetry, NamedTransferFunction tf, double sdrBrightness, double minHdrBrightness, double maxFrameAverageBrightness, double maxHdrHighlightBrightness);
|
||||
|
||||
const Colorimetry &colorimetry() const;
|
||||
NamedTransferFunction transferFunction() const;
|
||||
double sdrBrightness() const;
|
||||
double minHdrBrightness() const;
|
||||
double maxHdrBrightness() const;
|
||||
double maxFrameAverageBrightness() const;
|
||||
double maxHdrHighlightBrightness() const;
|
||||
|
||||
bool operator==(const ColorDescription &other) const;
|
||||
|
@ -85,7 +85,7 @@ private:
|
|||
NamedTransferFunction m_transferFunction;
|
||||
double m_sdrBrightness;
|
||||
double m_minHdrBrightness;
|
||||
double m_maxHdrBrightness;
|
||||
double m_maxFrameAverageBrightness;
|
||||
double m_maxHdrHighlightBrightness;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -435,7 +435,7 @@ bool GLShader::setColorspaceUniforms(const ColorDescription &src, const ColorDes
|
|||
&& setUniform(GLShader::IntUniform::SourceNamedTransferFunction, int(src.transferFunction()))
|
||||
&& setUniform(GLShader::IntUniform::DestinationNamedTransferFunction, int(dst.transferFunction()))
|
||||
&& setUniform(IntUniform::SdrBrightness, dst.sdrBrightness())
|
||||
&& setUniform(FloatUniform::MaxHdrBrightness, dst.maxHdrBrightness());
|
||||
&& setUniform(FloatUniform::MaxHdrBrightness, dst.maxFrameAverageBrightness());
|
||||
}
|
||||
|
||||
bool GLShader::setColorspaceUniformsFromSRGB(const ColorDescription &dst)
|
||||
|
|
Loading…
Reference in a new issue