KDE has been used SVG images for Themes for a long time. So i begun to have an interest in how i could optimize it and look in OpenVG.
The OpenVG definition by Khronos is:
Cross-platform API that provides a low-level hardware acceleration interface for vector graphics libraries such as Flash and SVG. OpenVG has many low level improvements that can be used in SVG like some blend operations. So i thought “what the best way to learn than implementing something?”
From there on i begun my journey. I started to learn about Vega, an opensource implementation of OpenVG done by Zack Rusin using Gallium3D, and studied the Khronos OpenVG specification. Studying OpenVG especification i discover about extesions espefications and read an interesting especification “advanced blending”.
Advanced Blending OpenVG specifies a larger set of blend modes than those in OpenVG. So i begun to implement it but to do it i need to do some refactoring in OpenVG shaders to use tgsi_ureg, right now i am still working in advanced blending but just in my spare time. I already have some advanced blending working like Blend Overlay and Blend Hardlight.
Blend Overlay is defined as: Multiplies or screens the colors, dependent on the destination color. Source colors overlay the destination whilst preserving its highlights and shadows. The destination color is not replaced, but is mixed with the source color to reflect the lightness or darkness of the destination. And
Blend Hardlight is defined as: Multiplies or screens the colors, dependent on the source color value. If the source color is lighter than 0.5, the destination is lightened as if it were screened. If the source color is darker than 0.5, the destination is darkened, as if it were multiplied. The degree of lightening or darkening is proportional to the difference between the source color and 0.5. If it is equal to 0.5 the destination is unchanged. Painting with pure black or white produces black or white.
To understand better i added support for those blending operations in an OpenVG demo called lion.
This is the default image without any advanced blending applied on it.
Applying Overlay Blending we have:
And applying Blend hardlight we have:
So, after all, what are the benefits in KDE?
Qt has a OpenVG paint engine. The last time that i saw it was in the early stages. Improving OpenVG paint Engine and OpenVG implementations we could improve KDE performance rendering themes and maybe in future we could use SVG icons.


