subpixel rendering in wayland?
jonsmirl at gmail.com
jonsmirl at gmail.com
Tue Mar 1 05:31:18 PST 2011
On Tue, Mar 1, 2011 at 7:40 AM, Michal Suchanek <hramrach at centrum.cz> wrote:
> Hello,
>
> I was just wondering about subpixel rendering and how is that going do
> be done in Wayland.
There are discussions about this in the archives.
My understanding of the problem requires for Wayland to provide the
window transformation function and the screen geometry to the app
(which way the subpixels run), and then let the app generate a final,
transformed, subpixel antialiased bitmap. Wayland would only do
straight copies of this bitmap to the display surface since doing any
more transforms will mess up the antialiasing. In this case apps (via
toolkit libs) need to know how to do subpixel antialiasing for output
buffers that may be twisted in 3D space. The projection of the
transformed buffer is not necessarily a rectangle and a depth buffer
is needed.
A legacy mode could be provided where apps only render into rectangles
and then Wayland does the transform. The app still needs the screen
geometry info to know which way the subpixels run. That info is passed
into Freetype. Wayland can decide to do further transforms to this
buffer knowing that it will mess up the antialiasing.
As far as I know no one is looking at the first case. It would be
interesting to see some experimentation with adding improved
antialiasing to the various toolkits. A simple way to see the impact
of improved antialiasing is a cover flow type display for switching
between windows. The windows on the sides have been twisted in 3D
space and their projections are now trapezoids.
>
> In X an application is supposed to ask xrandr about current screen
> layout, determine on what screen(s) the window is placed, and use the
> subpixel order and screen rotation information to figure out how to
> lay out subpixels in antialiased objects.
>
> To the best of my knowledge no X toolkit does this. Last time I tried
> to look there was a global setting of horizontal RGB vs BGR so I
> turned off subpixel rendering completely.
>
> Wayland currently does not support multiscreen but rotation should be
> already possible.
>
> Is there any provision for applications to get the information about
> subpixel layout of their windows and is there any toolkit for Wayland
> that honors it? Are there any tests in place that would make sure
> toolkits render subpixels properly in various situations?
>
> Or is subpixel rendering considered superfluous and unsupported by wayland?
>
> Thanks
>
> Michal
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
--
Jon Smirl
jonsmirl at gmail.com
More information about the wayland-devel
mailing list