GSoC Color Correction in KWin week 5 report

I have continued working on color correction support in KWin. Last week we had the first results that have visible effects on how things look, but of course, at the moment, this is rather about color incorrection than correction. Now, it is possible to accelerate development and move on to other areas.

To make CC possible, KWin’s shaders needed to be altered. More specifically, the fragment shaders. In order to do this, their source code is intercepted before sending to the graphics card for compilation, and a couple of lines are inserted in the appropriate places. There is a special algorithm for parsing the sources, and if it finds anything fishy, it abandons making any changes to the shader source. However, it should be robust enough to handle any valid GLSL 1.2 fragment shader thrown at it.

There are no big modifications to KWin’s rendering process. The only ones are the painting split for multiple screens inside SceneOpenGL::Window::performPaint(), mentioned in the previous posts.

The code related to CC will be organized in a separate class, and enabling or disabling it will be possible at compile time, and on runtime (from one of KWin’s KCM). Now I am working on refurbishing these latest modifications and making the enabling and disabling possible.

Soon work will start on the KDED module (color server) that should do most of the hard work involved with CC.


3 thoughts on “GSoC Color Correction in KWin week 5 report

  1. Please take care when implementing your kded module. Do not use things like waitForFinished and QDBusReply for instance. Remember that any delay in kded affects the whole KDE session. By the way, great job, the screenshot is pretty cool indeed.

  2. @lamarque: don’t be afraid, at KWin we will do a very careful review especially for async D-Bus calls. We don’t want the compositor to be blocked by waiting for something 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s