[RFC wayland-protocols] Color management protocol

Pekka Paalanen ppaalanen at gmail.com
Wed Dec 21 09:38:41 UTC 2016


On Wed, 21 Dec 2016 11:08:06 +1100
Graeme Gill <graeme2 at argyllcms.com> wrote:

> Richard Hughes wrote:
> > Anything more and the application author will just
> > decide it's not worth the bother. To calibrate we just ask for a
> > surface that's not going to be tampered with, but we don't want to
> > optimize for this super-uncommon case.  
> 
> I disagree - leave it to be an afterthought, and it will be
> done badly or left out completely, crippling the practicality
> of color management for the system.

Designing that is trivial:

GLOBAL cms_calibrator
- request: create_calibration_surface(wl_surface, new cms_calibration_surface)
	# Assigns wl_surface role.

INTERFACE cms_calibration_surface
	# Surfaces with this role will only be shown on the set output,
	# with direct color path bypassing all color-management, and
	# and the hardware has been reset to neutral/identity settings.
	# (or whatever requirements are appropriate, you can decide
	# what to write here)
- request: set_output(wl_output)
	# Which output this surface targets. The compositor replies
	with a
	# configure event.
- event: configure(width, height)
	# delivers the width and height the application needs to use


How it operates from a client perspective:

1. create a wl_surface
2. bind to cms_calibrator
3. send create_calibration_surface
4. send set_output
5. wait for configure
6. draw the calibration surface in the correct size
7. use Presentation feedback interface to ensure the calibration
   surface is show with the latest content
8. do what you want to do with the colorimeter
9. go to 6 to update the image if necessary
10. destroy cms_calibration_surface and wl_surface; the display
    automatically returns to normal


To be user friendly, one probably wants to add an event in case the
user denies the request to show the calibration window as it will have
temporary global effects.

Whether the global needs to be privileged or not, and how privileges
are implemented are an orthogonal matter.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20161221/32024873/attachment-0001.sig>


More information about the wayland-devel mailing list