core/colorspace: add qdebug operators for colorimetry and colordescription

Makes debugging easier
wilder/Plasma/6.3
Xaver Hugl 1 year ago
parent 1cd5235afe
commit a79c2139ae
  1. 12
      src/core/colorspace.cpp
  2. 2
      src/core/colorspace.h

@ -694,3 +694,15 @@ QDebug operator<<(QDebug debug, const KWin::XYZ &xyz)
debug << "XYZ(" << xyz.X << xyz.Y << xyz.Z << ")";
return debug;
}
QDebug operator<<(QDebug debug, const KWin::Colorimetry &color)
{
debug << "Colorimetry(" << color.red() << color.green() << color.blue() << color.white() << ")";
return debug;
}
QDebug operator<<(QDebug debug, const KWin::ColorDescription &color)
{
debug << "ColorDescription(" << color.containerColorimetry() << color.transferFunction() << "ref" << color.referenceLuminance() << "min" << color.minLuminance() << "max. avg" << color.maxAverageLuminance() << "max" << color.maxHdrLuminance() << ")";
return debug;
}

@ -255,3 +255,5 @@ private:
KWIN_EXPORT QDebug operator<<(QDebug debug, const KWin::TransferFunction &tf);
KWIN_EXPORT QDebug operator<<(QDebug debug, const KWin::XYZ &xyz);
KWIN_EXPORT QDebug operator<<(QDebug debug, const KWin::Colorimetry &color);
KWIN_EXPORT QDebug operator<<(QDebug debug, const KWin::ColorDescription &color);

Loading…
Cancel
Save