News for hackers. Stuff that matters.
Re:Window System X (1984) by kaba0 on Tuesday January 18, 2022 @09:31AM (#29979657)
I tried looking at how is it done in Apple’s Quartz compositor but couldn’t find it.

But more asking than telling, why wouldn’t defaulting to sRGB for unlabeled buffers work? The compositor knows that this monitor is in C color space, and it knows how to convert between the two, than a simple shader can trivially convert the sRGB hello world app to the monitor’s color space - even in the multiple monitor with different spaces case.

Of course that might not be the intention of the client, but if they didn’t bother with it than they likely are okay with whatever is the default.

Re:Window System X (1984) by magicalhippo on Tuesday January 18, 2022 @10:55AM (#29980976)
> But more asking than telling, why wouldn’t defaulting to sRGB for unlabeled buffers work?

If Wayland is to do color management, that's a reasonable approach. Doesn't work at all if the client is supposed to do it.

But are you sure Wayland uses sRGB now? I couldn't find any information regarding the implicit color space currently used by Wayland...

> but if they didn’t bother with it than they likely are okay with whatever is the default

Not like they had a choice now is it?

Re:Window System X (1984) by kaba0 on Tuesday January 18, 2022 @12:34PM (#29982615)
I don’t think it has any implicit color space in use right now, I mentioned/asked for confirmation whether this approach could work.
Re:Window System X (1984) by magicalhippo on Tuesday January 18, 2022 @04:03PM (#29985769)
Yeah it's the best approach given the current state, and that seems to be what they're going for in the MR.

However you're still in a bit of a mess due to lack of an explicitly documented implicit color space. And it's still a bit of a footgun for developers who don't know they need to care about this.

It's a bit like XML files without the encoding attribute. Except for text you can try to analyze the bytes and find a likely encoding, no such thing for pixel data.