Sub-surface protocol

John Kåre Alsaker john.kare.alsaker at gmail.com
Tue Dec 18 11:12:29 PST 2012


On Tue, Dec 18, 2012 at 10:29 AM, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> On Mon, 17 Dec 2012 15:47:43 +0000
> Richard Hughes <hughsient at gmail.com> wrote:
>
>> On 5 December 2012 14:32, Pekka Paalanen <ppaalanen at gmail.com> wrote:
>> > One of the most important use cases is a video player in a window. It
>> > has XRGB or ARGB window decorations, usually the video content in YUV,
>> > and possibly an ARGB overlay for subtitles etc. Currently, the client
>> > has to color-convert the video, and merge it with the decorations and
>> > subtitles, before sending the grand ARGB buffer to the compositor.
>>
>> Sorry to be late to the party. A subsurface idea was what Øyvind and I
>> were discussing at the OpenICC hackfest when we were talking about
>> tagging a surface with a known ICC profile. This would allow a toolkit
>> to declare a window area to be AdobeRGB or some home-created camera
>> profile from a jpeg that has been tagged with an embedded color
>> profile.
>>
>> The use case are image viewers like EOG or editors like GIMP. Gimp
>> wants to color correct the main preview window converting from source
>> ICC profile to monitor ICC profile, but we really don't want to "turn
>> off" the sRGB->monitor profile for the selector widgets. By using a
>> subsurface we get the behaviour we want without adding tons of code.
>> At the moment Oyranos has some kind of xatom protocol to let the
>> compositor know an opt-out-region and this isn't ideal or suited at
>> all to wayland.
>>
>> Anyway, I just wanted to say "rock on" and maybe to keep ICC color
>> correction at the back of your mind for the sub-surface. :)
>
> Cool, yeah, I think color management of individual sub-surfaces will
> not be a problem, as long as the color management interfaces deal with
> wl_surface and wl_buffer objects from the core protocol. In my current
> plan, sub-surfaces are wl_surface objects with a particular role, so
> color management should interact in obvious ways, and work with minimal
> additional changes.
>
>
> Thanks,
> pq
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
My plan has always been to attach color space profiles to wl_surfaces,
which will just end to working with subsurfaces. When combined with
clipping, you can attach color profiles to any part of your surface.

On Tue, Dec 18, 2012 at 10:45 AM, Kai-Uwe Behrmann <ku.b at gmx.de> wrote:
> Am 17.12.2012 16:47, schrieb Richard Hughes:
>>
>> On 5 December 2012 14:32, Pekka Paalanen <ppaalanen at gmail.com> wrote:
>>>
>>> One of the most important use cases is a video player in a window. It
>>> has XRGB or ARGB window decorations, usually the video content in YUV,
>>> and possibly an ARGB overlay for subtitles etc. Currently, the client
>>> has to color-convert the video, and merge it with the decorations and
>>> subtitles, before sending the grand ARGB buffer to the compositor.
>>
>>
>> A subsurface idea was what Øyvind and I
>> were discussing at the OpenICC hackfest when we were talking about
>> tagging a surface with a known ICC profile. This would allow a toolkit
>> to declare a window area to be AdobeRGB or some home-created camera
>> profile from a jpeg that has been tagged with an embedded color
>> profile.
>
>
> Sounds natural to help with CM compositing needs and was therefore discussed
> [1] for OpenICC's Color Management Near X project in 2008.
>
> However, we had seen quite some objections around subwindows at that time.
> Did something substancial change on that matter?
I don't see anything there that applies to Wayland. The link to the
original proposal is also dead.

>
> To put the question in other words, do Qt and Gtk developers now or soon
> play with the idea to use wayland as the internal compositing core?
I believe both have paths to use subwindows/subsurfaces for video and
OpenGL. These can probably be used for clients with special needs,
such as image viewers and editors which would simply attach an ICC
profile to the subsurface. For compositing they could use subsurfaces
to optimize scrolling performance. I expect that to happen with
browsers first and I believe Android already does that.

>
> kind regards
> Kai-Uwe Behrmann
>
> [1] https://mail.gnome.org/archives/gtk-devel-list/2008-June/msg00150.html
>
>
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list