[prev in list] [next in list] [prev in thread] [next in thread]
List: kwin
Subject: Re: Review Request: Implement color correction (per output)
From: Thomas_Lübking <thomas.luebking () web ! de>
Date: 2012-11-10 14:23:14
Message-ID: 20121110142314.12083.26648 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
> On Nov. 9, 2012, 8:17 a.m., Martin Gräßlin wrote:
> > @Kai-Uwe: it was pretty much uncool that you merged in the changes by yourself. \
> > This created quite some mess in the git repository and we have to live with that \
> > now.
>
> Kai-Uwe Behrmann wrote:
> @Martin and @Casian I am sorry for the form and time of the commit.
>
> However, Casian had several open questions, which appeared non answered and that \
> caused a delay to the "last minute". So my impression was to get the colour \
> management changes in before midnight or delay one more KDE release.
> Thomas Lübking wrote:
> For whatever reason you did not get a "ship it" ok "in time", so you acted \
> pre-emptive. That's wrong (correct approach would have been to nag Fredrik directly \
> and in time about the pending question), but excusable.
> There's however actually no excuse for the form, sorry. And period.
>
> You're holding a GSoC students hand, so you can not be considered a noob - at least \
> you need the experience to act responsible. The diff isn't that large and most of \
> it is in the added files, so it would have been reasonable and very easy and taken \
> less than a minute to condense it into one commit instead of pushing all 25(!) \
> approaches into the history - not to mention the unreviewed commit messages. You \
> *must* have seen the mess before the push.
> Also we just very recently had the very same incident reg. dolphin [1] which was \
> escalated to k-c-d
> So please don't try to blame anyone else for the mess you created, you're \
> embarrassing yourself.
> FWWI:
> Breaking the feature/string "freeze" by a day or so would not have been remotely as \
> problematic as what has happened now.
> So much for this particular incident.
> It happened, everybody has hopefully learned sth. out of it.
> Done.
>
> Now in general:
> I'm not sure whether this is caused by GSoC making ppl. nervous and hasty or \
> whatever, but in case it becomes a recurring issue i'd actually propose to \
> blacklist any merge from user branches into origin/* but for white-listed component \
> maintainers (notice: not commits in general, just branch merges) because we cannot \
> post-teach that thrice a year - makes git usage completely pointless.
> And ftr: by the above i mean in this case "... but for Martin", explicitly \
> excluding eg. myself.
> [1] http://lists.kde.org/?l=kfm-devel&m=134835190200718&w=4
>
> PS: one more on the personal "GSoC sucks" list. *sigh*
> PPS: now let's wait and see when /I/ will push messy commits ;-)
>
> Casian Andrei wrote:
> Looked at the changes after the merge...
>
> It seems that merge is incomplete, btw. Since I was not expecting this kind of \
> thing to happen, I wasn't keeping the color2 branch in my repo clone up to date on \
> a regular basis. It looks like the last commit in that is on 23 oct. and I remember \
> working and fixing the color stuff in the weekend around 27 oct. And the part that \
> removes the forceAlpha is clearly missing from the merge.
> So, the changes of this merge are incomplete and possibly flawed. A commit with the \
> remaining changes can be done, closing this review request and fixing the possible \
> flaws.
> And the forceAlpha review can be also closed properly with one commit.
>
> I can't see what I've changed during that 27 oct weekend because the changes are \
> only on the big computer back home and I don't remember exactly what I've done :( . \
> Clearly, the forceAlpha thing is there. I will be back home on Tuesday.
>
> Martin Gräßlin wrote:
> > I will be back home on Tuesday.
> no big deal, just make sure that it's all in before the beta 1 tagging, which \
> happens on November 15th. If you need more time to find out what has gone in, \
> please let me know. We can get additional time from the release team.
Should we as soon as Casian has his patch in place revert the broken merge commits \
*now* and push the final commit on top of it so that in case this is eg. at some day \
implemented in the toolkits, FutureMartin (tm) will not have a hard time reverting n+ \
commits from x months/years ago?
- Thomas
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/106141/#review21677
-----------------------------------------------------------
On Oct. 27, 2012, 9:56 a.m., Casian Andrei wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106141/
> -----------------------------------------------------------
>
> (Updated Oct. 27, 2012, 9:56 a.m.)
>
>
> Review request for kwin, Thomas Lübking and Martin Gräßlin.
>
>
> Description
> -------
>
> These are the results of my GSoC project, for KWin.
>
> This color correction needs KolorManager installed, master branch. That one needs \
> Oyranos and additional color management dependencies. \
> git://anongit.kde.org/kolor-manager.git http://www.oyranos.org/downloads
> If it's not installed, the ColorCorrection class should fail without causing any \
> issues to the user (that's if it's enabled from the KCM). Probably a notification \
> could be appropriate in that case? "Failed to initialize CC because cannot contact \
> Kolor-Server KDED..." something like that?
> Change summary:
> --
> Add an option to kcmcompositing in the 'Advanced' tab, to enable or disable color \
> correction. It is specified that it's experimental and it needs Kolor Manager. This \
> implies some small changes to options.h and cpp.
> Scene::finalPaintWindow code is moved into SceneOpenGL::performPaint.
> SceneOpenGL has the declarations of some methods changed to include the screen \
> number - those could be changed to pass around PaintData's probably. SceneOpenGL's \
> newly implemented finalDrawWindow splits the rendering if color correction is \
> enabled and there are multiple screens. Before painting for a particular screen, \
> ColorCorrection::setupForOutput should be called.
> There was a problem with the blending function causing artifacts with color \
> correction enabled so it is set up to src_alpha, one_minus_src alpha in that case.
> Now, inside KWinEffects:
> --
> A screen property is added for WindowPaintData.
> In kwinglutils, The fragment shaders are intercepted before being compiled and they \
> get a couple of lines of code inserted in order to do the color stuff. This happens \
> only when color correction is enabled, of course.
> And there is the big ColorCorrection class. The public and private stuff are well \
> separated.
> The private stuff consists of the private data and the D-Bus interface. Regarding \
> D-Bus, everything is async.
> The implementation basically manages a set of color lookup tables for different \
> outputs and for different window regions. These are taken via D-Bus. Each lookup \
> table has around 700 KB. I hope I am not wrong in assuming it's not that big of an \
> issue time-wise, since they are transferred only once or twice for an entire \
> session. I hope D-Bus doesn't do any time consuming business to transfer those \
> QVector's.
> In case of problems, it should not affect the rest of KWin in any way.
>
> Next priorities:
> --
> Implement per-window-region stuff. It should be a matter of extending KolorServer's \
> capabilities and doing some small modifications in SceneOpenGL::Window. The \
> ColorCorrection class from KWinEffects has everything prepared.
>
> Diffs
> -----
>
> kwin/kcmkwin/kwincompositing/main.cpp 7a89db4
> kwin/kcmkwin/kwincompositing/main.ui cff0f63
> kwin/libkwineffects/CMakeLists.txt f95d40e
> kwin/libkwineffects/kwineffects.h eb09d51
> kwin/libkwineffects/kwineffects.cpp 9cd9987
> kwin/libkwineffects/kwinglcolorcorrection.h PRE-CREATION
> kwin/libkwineffects/kwinglcolorcorrection.cpp PRE-CREATION
> kwin/libkwineffects/kwinglcolorcorrection_p.h PRE-CREATION
> kwin/libkwineffects/kwinglplatform.h 249ecdb
> kwin/libkwineffects/kwinglplatform.cpp 59ce7b2
> kwin/libkwineffects/kwinglutils.h 9b175b9
> kwin/libkwineffects/kwinglutils.cpp da0e7cc
> kwin/options.h 8069d7b
> kwin/options.cpp 50db58d
> kwin/scene-fragment.glsl 4b5424b
> kwin/scene.h be3acc4
> kwin/scene.cpp 28136b6
> kwin/scene_opengl.h dce2b7c
> kwin/scene_opengl.cpp 3f130b9
>
> Diff: http://git.reviewboard.kde.org/r/106141/diff/
>
>
> Testing
> -------
>
> Restarted KDED making sure Kolor-Manager is installed properly - this should make \
> the KDED module available.
> Restarted KWin, enabled color correction in KCM compositing, advanced tab.
>
> Played a bit with commands like:
> oyranos-monitor -d 0 XYZ.icc
> oyranos-monitor -d 1 Lab.icc
> Those set up particular profiles for the monitors. However, it seems there is a \
> problem with reverting to the normal ones. The code regarding that is taken \
> directly from CompICC, so I don't know whether it's a bug or a feature. Anyway, \
> it's from Kolor-Server.
> Apparently, everything works as planned. But I cannot distinguish visible \
> differences for the profiles used for the different monitors by default.
>
> After testing with the newest Oyranos, there is an issue at login, the custom color \
> profiles are not loaded at first because of an issue in Oyranos probably. It will \
> be fixed soon.
>
> Screenshots
> -----------
>
> Output 0 Lab.icc Output 1 XYZ.icc
> http://git.reviewboard.kde.org/r/106141/s/695/
>
>
> Thanks,
>
> Casian Andrei
>
>
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/106141/">http://git.reviewboard.kde.org/r/106141/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On November 9th, 2012, 8:17 a.m., <b>Martin \
Gräßlin</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;"> <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">@Kai-Uwe: it was pretty much uncool that you merged in the changes by \
yourself. This created quite some mess in the git repository and we have to live with \
that now.</pre> </blockquote>
<p>On November 9th, 2012, 3:24 p.m., <b>Kai-Uwe Behrmann</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">@Martin and @Casian I am \
sorry for the form and time of the commit.
However, Casian had several open questions, which appeared non answered and that \
caused a delay to the "last minute". So my impression was to get the colour \
management changes in before midnight or delay one more KDE release.</pre> \
</blockquote>
<p>On November 9th, 2012, 5:54 p.m., <b>Thomas Lübking</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">For whatever reason you \
did not get a "ship it" ok "in time", so you acted pre-emptive. \
That's wrong (correct approach would have been to nag Fredrik directly and in \
time about the pending question), but excusable.
There's however actually no excuse for the form, sorry. And period.
You're holding a GSoC students hand, so you can not be considered a noob - at \
least you need the experience to act responsible. The diff isn't that large and \
most of it is in the added files, so it would have been reasonable and very easy and \
taken less than a minute to condense it into one commit instead of pushing all 25(!) \
approaches into the history - not to mention the unreviewed commit messages. You \
*must* have seen the mess before the push.
Also we just very recently had the very same incident reg. dolphin [1] which was \
escalated to k-c-d
So please don't try to blame anyone else for the mess you created, you're \
embarrassing yourself.
FWWI:
Breaking the feature/string "freeze" by a day or so would not have been \
remotely as problematic as what has happened now.
So much for this particular incident.
It happened, everybody has hopefully learned sth. out of it.
Done.
Now in general:
I'm not sure whether this is caused by GSoC making ppl. nervous and hasty or \
whatever, but in case it becomes a recurring issue i'd actually propose to \
blacklist any merge from user branches into origin/* but for white-listed component \
maintainers (notice: not commits in general, just branch merges) because we cannot \
post-teach that thrice a year - makes git usage completely pointless.
And ftr: by the above i mean in this case "... but for Martin", explicitly \
excluding eg. myself.
[1] http://lists.kde.org/?l=kfm-devel&m=134835190200718&w=4
PS: one more on the personal "GSoC sucks" list. *sigh*
PPS: now let's wait and see when /I/ will push messy commits ;-)</pre>
</blockquote>
<p>On November 10th, 2012, 8:46 a.m., <b>Casian Andrei</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Looked at the changes \
after the merge...
It seems that merge is incomplete, btw. Since I was not expecting this kind of thing \
to happen, I wasn't keeping the color2 branch in my repo clone up to date on a \
regular basis. It looks like the last commit in that is on 23 oct. and I remember \
working and fixing the color stuff in the weekend around 27 oct. And the part that \
removes the forceAlpha is clearly missing from the merge.
So, the changes of this merge are incomplete and possibly flawed. A commit with the \
remaining changes can be done, closing this review request and fixing the possible \
flaws.
And the forceAlpha review can be also closed properly with one commit.
I can't see what I've changed during that 27 oct weekend because the changes \
are only on the big computer back home and I don't remember exactly what I've \
done :( . Clearly, the forceAlpha thing is there. I will be back home on Tuesday. \
</pre> </blockquote>
<p>On November 10th, 2012, 10:35 a.m., <b>Martin Gräßlin</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">> I will be back home \
on Tuesday. no big deal, just make sure that it's all in before the beta 1 \
tagging, which happens on November 15th. If you need more time to find out what has \
gone in, please let me know. We can get additional time from the release team.</pre> \
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Should we as soon as \
Casian has his patch in place revert the broken merge commits *now* and push the \
final commit on top of it so that in case this is eg. at some day implemented in the \
toolkits, FutureMartin (tm) will not have a hard time reverting n+ commits from x \
months/years ago?</pre> <br />
<p>- Thomas</p>
<br />
<p>On October 27th, 2012, 9:56 a.m., Casian Andrei wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for kwin, Thomas Lübking and Martin Gräßlin.</div>
<div>By Casian Andrei.</div>
<p style="color: grey;"><i>Updated Oct. 27, 2012, 9:56 a.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">These are the results of my GSoC project, for KWin.
This color correction needs KolorManager installed, master branch. That one needs \
Oyranos and additional color management dependencies. \
git://anongit.kde.org/kolor-manager.git http://www.oyranos.org/downloads
If it's not installed, the ColorCorrection class should fail without causing any \
issues to the user (that's if it's enabled from the KCM). Probably a \
notification could be appropriate in that case? "Failed to initialize CC because \
cannot contact Kolor-Server KDED..." something like that?
Change summary:
--
Add an option to kcmcompositing in the 'Advanced' tab, to enable or disable \
color correction. It is specified that it's experimental and it needs Kolor \
Manager. This implies some small changes to options.h and cpp.
Scene::finalPaintWindow code is moved into SceneOpenGL::performPaint.
SceneOpenGL has the declarations of some methods changed to include the screen number \
- those could be changed to pass around PaintData's probably. SceneOpenGL's \
newly implemented finalDrawWindow splits the rendering if color correction is enabled \
and there are multiple screens. Before painting for a particular screen, \
ColorCorrection::setupForOutput should be called.
There was a problem with the blending function causing artifacts with color \
correction enabled so it is set up to src_alpha, one_minus_src alpha in that case.
Now, inside KWinEffects:
--
A screen property is added for WindowPaintData.
In kwinglutils, The fragment shaders are intercepted before being compiled and they \
get a couple of lines of code inserted in order to do the color stuff. This happens \
only when color correction is enabled, of course.
And there is the big ColorCorrection class. The public and private stuff are well \
separated.
The private stuff consists of the private data and the D-Bus interface. Regarding \
D-Bus, everything is async.
The implementation basically manages a set of color lookup tables for different \
outputs and for different window regions. These are taken via D-Bus. Each lookup \
table has around 700 KB. I hope I am not wrong in assuming it's not that big of \
an issue time-wise, since they are transferred only once or twice for an entire \
session. I hope D-Bus doesn't do any time consuming business to transfer those \
QVector's.
In case of problems, it should not affect the rest of KWin in any way.
Next priorities:
--
Implement per-window-region stuff. It should be a matter of extending \
KolorServer's capabilities and doing some small modifications in \
SceneOpenGL::Window. The ColorCorrection class from KWinEffects has everything \
prepared. </pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Restarted KDED making sure Kolor-Manager is installed properly - this \
should make the KDED module available.
Restarted KWin, enabled color correction in KCM compositing, advanced tab.
Played a bit with commands like:
oyranos-monitor -d 0 XYZ.icc
oyranos-monitor -d 1 Lab.icc
Those set up particular profiles for the monitors. However, it seems there is a \
problem with reverting to the normal ones. The code regarding that is taken directly \
from CompICC, so I don't know whether it's a bug or a feature. Anyway, \
it's from Kolor-Server.
Apparently, everything works as planned. But I cannot distinguish visible differences \
for the profiles used for the different monitors by default.
After testing with the newest Oyranos, there is an issue at login, the custom color \
profiles are not loaded at first because of an issue in Oyranos probably. It will be \
fixed soon.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>kwin/kcmkwin/kwincompositing/main.cpp <span style="color: \
grey">(7a89db4)</span></li>
<li>kwin/kcmkwin/kwincompositing/main.ui <span style="color: \
grey">(cff0f63)</span></li>
<li>kwin/libkwineffects/CMakeLists.txt <span style="color: \
grey">(f95d40e)</span></li>
<li>kwin/libkwineffects/kwineffects.h <span style="color: \
grey">(eb09d51)</span></li>
<li>kwin/libkwineffects/kwineffects.cpp <span style="color: \
grey">(9cd9987)</span></li>
<li>kwin/libkwineffects/kwinglcolorcorrection.h <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>kwin/libkwineffects/kwinglcolorcorrection.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>kwin/libkwineffects/kwinglcolorcorrection_p.h <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>kwin/libkwineffects/kwinglplatform.h <span style="color: \
grey">(249ecdb)</span></li>
<li>kwin/libkwineffects/kwinglplatform.cpp <span style="color: \
grey">(59ce7b2)</span></li>
<li>kwin/libkwineffects/kwinglutils.h <span style="color: \
grey">(9b175b9)</span></li>
<li>kwin/libkwineffects/kwinglutils.cpp <span style="color: \
grey">(da0e7cc)</span></li>
<li>kwin/options.h <span style="color: grey">(8069d7b)</span></li>
<li>kwin/options.cpp <span style="color: grey">(50db58d)</span></li>
<li>kwin/scene-fragment.glsl <span style="color: grey">(4b5424b)</span></li>
<li>kwin/scene.h <span style="color: grey">(be3acc4)</span></li>
<li>kwin/scene.cpp <span style="color: grey">(28136b6)</span></li>
<li>kwin/scene_opengl.h <span style="color: grey">(dce2b7c)</span></li>
<li>kwin/scene_opengl.cpp <span style="color: grey">(3f130b9)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/106141/diff/" style="margin-left: \
3em;">View Diff</a></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Screenshots </h1>
<div>
<a href="http://git.reviewboard.kde.org/r/106141/s/695/"><img \
src="http://git.reviewboard.kde.org/media/uploaded/images/2012/08/23/cc_alter_6_400x100.png" \
style="border: 1px black solid;" alt="Output 0 Lab.icc Output 1 XYZ.icc" /></a>
</div>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic