Sub-surface protocol

John Kåre Alsaker john.kare.alsaker at gmail.com
Mon Dec 17 17:01:20 PST 2012


On Mon, Dec 17, 2012 at 11:40 PM, Bill Spitzak <spitzak at gmail.com> wrote:
> That brings up an interesting possibility: can a subsurface (or any surface)
> image be a subrectangle of an image used for another surface? I'm thinking
> this would be possible, provided the client can tell the wayland server to
> use an arbitrary stride between rows.
You should be able to attach the same wl_buffer to multiple
wl_surfaces and set clipping (when that is added) accordingly.

>
> Then a client such as gimp could draw all it's display into a single buffer.
> To get the different color correction of the center display, it would
> declare a subsurface containing this and set it's color correction
> differently using the wayland api. This would only allocate one buffer,
> which would save memory, but more importantly it should make internal code
> in gimp easier as you could work around a toolkit that assumes only one
> output buffer.
My approach to color correct rendering in Wayland is to let the
compositor handle it and have the clients simply specify which color
space they are using. Only the compositor can render clients correctly
when they are displayed on multiple monitors (unless we introduce a
way to set a buffer per-output).

>
> The main problem I see is that the subsurface has to be opaque, because any
> transparent parts would just show the same data with the wrong color
> correction. But that would cover a lot of uses.
>
>
> Richard Hughes 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. :)
>>
>> Thanks,
>>
>> Richard
>> _______________________________________________
>> wayland-devel mailing list
>> wayland-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
> _______________________________________________
> 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